01/18/07
Procedural shaders
Created in maya.
Spot light
Cone angle:
Penumbra angle: softness of the cone edge. The line that separates the umbra (shadow area) from the area in the light. Positive values control the blur outwards. Negative value blurs inwards. This does not change the cone size
Drop off: it is a blur from the centre outwards.
The penumbra and the drop off makes it a soft light.
Light decay: naturally light falls off. Real life uses quadratic decay. But this would not be used in every case.
Colour: you cannot reach over expose a pure colour (RGB) by increasing the intensity. But if u increase the value (HSV) of the colour u can over expose it, this does not apply to pure colours.
Intensity: it’s the multiplier of colour of the light.
Shadows:
Depth map
In depth map shadows the resolution is the last thing that is tweaked. They directly influence the memory, the ram. The first thing one does is blur the shadow. To blur the shadow we add or change the filter size. Filtering affects the processor, and takes very long to process. The depth map shadow is a reusable image. Disk based Dmaps is what we use to save the map.
Raytraced shadows
To soften raytraced shadows u tweak the light radius and increase the shadow rays in the light attributes. It is processor intensive. And the quality is much better. It blurs on the basis of the distance from the object, therefore has a more realistic effect.
Shadow colour acts as a transparency. White is no shadow.
Point Light
They are the most expensive lights. A point light generates 6 shadow dmap lights.
A light that shld be used the least.
01/25/07
Projection Maps
Implicit and explicit projections
For polygons proj can be applied in 2 places, in the textures (implicit more expensive and are not actually on the surface, UV mapping) and also under UV’s (explicit on the UV co-ordinates and dependant on the surface).
Nurbs Plane
The placement node supports the projection. The coverage determines how much area the proj will cover on the screen. Translate allows movement. Rotate frame, it rotates the entire frame of the texture, rotate UV simulates the rotation of the surface UV’s.
If the surface changes then the texture will stretch. When u do not want the texture to deform with the object click fix texture wrap, it is still deforming the image.
Polygon plane
2d projections – planar, cylindrical etc. This is called an explicit way of texturing. The projection does not stick to the surface, they are independent of the surface. The texture will swim if the surface is moved. When projecting, if u switch off wrap in U & V and increase the repetition of the texture , it will not wrap.
Types of textures
2D,3D and 4D. the projection types only come under 2D textures. And 3D texture are explicit texture, they are volume containers. They are not an image. The placement of this container is very important.
UV Texture Editor
There is no relationship with the faces on the object and those in the UV tex editor.
Unitize makes all the faces that don’t have the texture or is off zero space area they will get the texture. The UV editor shows u the zero to one range. And anytime it goes beyond 0 or 1 the texture will repeat itself. So in the UV editor the texture beyond the 0-1 range is repeated infinitely. You can see this by changing the value in the UV editor under image- image range.
To move UV accurately from one shell to the next, nudge the UV’s then use that script to move it 1 or 2 shells over.
Assignment 2
Create a city street scene like in class. Surface shaders, add garbage cans etc.
Lay out UV’s, use projections etc.
02/01/07
Colour gain is a multiplier. So dropping a texture in it will multiply with the other texture.
If u already have a UV space created, and u want to do a layered texture, then the second texture u will project it and then put it into the colour gain. This will be independent of the UV placement of the floor. Or u can create a new uv set and assign the noise to it, using the UV linking editor. One texture can be linked only to one UV set. A single UV set however can have various textures linked to it.
Shark Scene
One way to do this is to first get a profile of the shark. Use planar mapping along the side.
Depending on the shot u will cut the edges. That means select an edge loop in the centre. In the UV tex editor cut UVs select the shell and move it over to one side. Make the 2 sides a mirror image of each other one on top of the other. Then select the mouth cavity using edge loop and cut those UVs. Then separate them too, for both the sides. After cutting the UV’s u go to UV then go to shell and then move it. U will still have some overlapping in the mouth those need to brought out or in. select the outer most UV’s of the mouth and scale them down.
Then u need to remove the fins, in the same way get an edge loop and then cut UV’s , select the shells and move them away. Do the same for the other ones. Separate them and move them in order.
Then select the edge of the full shark the outline that we cut first, just select the bottom line. Then go to UV’s and scale them together making a straight line. Then select the edges on that line and do a move and sew.
One good tool to use is the relax UV’s. it allows u to fix issues with space. U can pin something so that that will not move at all. So u can select the border and pin it, or even some UV’s. So pin the border, and also decide how I want the spacing of the UV’s. in relax UV’s use world space.
Three point lighting
Key, fill and back light. How many ever u want of the back and fill light but with three purposes. The key is usually one.
Fill lights – dealing with shadows. It adds the indirect light that’s missing in the scene.
A high light is usually on the edge (metallic objects), the brightest area on the surface which receives the most light on the surface.
Larger light sources provide softer lights except sunlight.
2 imp things to remember are
First where u r going to shoot from, so that ur key light does not become ur back light etc.
Second the first light is the key light.
First create a spot light as the key light, its range with respect to the camera is 45 degrees. As where the camera is placed within 45 degrees of that.
For a fill light make another spot light. We can remove the specular from the fill light.
The fill lights will have the color of the ground and wall to show the bounce of color happening.
The rim lights, use spot light again. And turn off the diffuse in that light. If u want a soft highlight turn off specular and turn on diffuse and increase the intensity. If u want the highlight to be softer but with a little glow, increase the glow intensity and in the shader glow increase the threshold. U can further control this by increasing or decreasing the glow and halo intensity or spread.
Assignment 3
Three different moods or scenario’s with 3 point lighting
Models on cadamedia\stockfootage\dosch 3d\poses take the OBJ and use them
02/08/2007
Assignment_04
Indoor scene day scene, daylight from window with inside lights too. 2 renders film sensitive to indoor light and film sensitive to outdoor lights, by changing colour and intensity of the lights itself.
F-Stop
It is the aperture in the lens. Reducing it or increasing it reduces or increases the ratio of light coming in. It reduces or increases in halves or doubles.
Diffuse surfaces
Like rock
02/15/07
Layering
Create shader, put fractal/ noise etc in color and adjust to see how u want the mask to be.
Bring in the images needed for layering. Now to connect 2 colors to a blend color node and drop in color.
Connect the fractal or noise to the blender out alpha – blender
Or u can use a layered shader
And connect the fractal or noise to the alpha of the layered shader.
Or the third option is to use a ramp. Put the two images into the 2 ramp colors. Change the ramp type so that u use the fractal to define the way the color of the images are used.
Connect fractal to ramp, by connecting outcolor R to U co-ord and outcolor B to V co-ord.
Clamp utility allows u too limit the 0 and 1 level.
The ramp gives a lot more freedom to change the variations in the colors of the images.
If u want to add another layer of dirt make another ramp, put first dirt layer in one color of new ramp and put sec dirt in the sec color. Then put the second ramp into one color of the first ramp.
U can add a road to the terrain. To do this, creat a ramp for the road, using a mutiply div node plug the road ramp in its input 1 and the ramp of the dirt and grass into input 2.
Then create a fractal for the color of the road, create a reverse node for the road ramp and connect the fractal in input 2 and the reverse in input 1 then connect that too a plus minus utility node to input 3D 0 and use the other multiply div to the input 3d 1 in the plus minus. Then drop that into the color of the shader.
02/22/2007
Render Settings
Two types of anti aliasing
Edge anti aliasing and shader anti aliasing
In the geometry under the render stats there r 2 anti aliasing overrides.
Geometry anti aliasing and shading samples override
Editing the actual Geometry anti aliasing is better than increasing it in the render globals. In the render globals the setting should be at least set to high.
Keeping the contrast threshold (render globals) low saves on areas that do not need to be sampled at all.
03/01/2007
Camera (Notes)
HD can film NTSC and PAL and at 24fps. Therefore is much better.
Depth of Field
Focal distance is the distance from the camera to the object.
Make a measurement with distance tool, parent one loc to camera and zero out the translate, then parent the other loc to the sphere and zero out again.
Then connect the distance in the distance tool to the focus distance of the camera using connection editor. Then the focus distance changes when the camera moves.
Motion Blur
2 types - 2d and 3d
In 3d increasing the blur by frames increases the blur. The number of samples (max 3d blur visibility) makes the render better in the render globals.
With 2d motion blur if u check keep vectors, then render the sequence.
If u run blur 2d from the command prompt
Then type blur2d –l (length of blur) –f (file name) (drag the frame) –n (start frame and end frame)
When u hit enter it will render out the sequence with 2d motion blur as a post process.
Or setup a batch render.
03/08/07
Bump and Normal Mapping
Bump maps reorient normals, whereas normal mapping redistributes the normals across the surface. It is more sophisticated
Displacement Maps
Actual change in the geometry.
Height field
Connect out alpha of texture to the displacement value. The alpha gain in the texture effects the displacement. In the surface, make sure feature displacement is checked and then click on calculate bounding box scale. The output is a combination of the color gain of the shader and the color value. We use a fractal in the color gain of the bulge but no change. This needs a luminance to add a value to the fractal. It does not pick up color. So connect the out color of the bulge to the value of the luminance and then connect the luminance into the displacement.
If the displacement is very detailed then we should convert it to a polygon.
For after spring break
Block out the pieces in the image that u want to create. And also lock the camera angle.
03/22/07
Rendering
Layers needed -
Color
Diffuse
Specular – specular glow and specular highlights
Reflection
Shadow
Masks
Volume light
Glow
Specialty passes
Lights – key, fill, rim global illumination etc
Subsurface scattering
Compositing passes
Z depth (preset in render layers)
Special gradient passess (Y Grad)
Diffuse + color
Diffuse is the light pass, rendered with key, and fill light, and then multiplied by the color pass. That is light x color. Then we would multiply by shadow. Then we would add it with reflection and specular. Specular + Reflection
Render layers
Master layer will have all
The new layer created with whatever is selected. Or u can assign it after creating the layer.
The buttons in the render layers
R means it is renderable.
Specular layer create a layer override on the diffuse (by right clicking the lights) and switching off the diffuse. In the render settings do an override for reflections too, and switch it off.
Color pass – no raytracing, while on the layer create an ambient light with value of 1 and no shade. This will remove the bump, diffuse and specular.
Diffuse layer – is just the color layer with the light, it will not be flat like the color layer. It has no reflections or specular. (maya preset)make colour of shader white, for all shaders. If man shaders have the same diffuse assign one shader to all and make the colour white. If color is set to black the diffuse will be black.
Key light pass – has the objects and the key light in the layer. Make layer override in the shader for the color, break the color connection make the color value white, and then also turn of the specular off in the light. No ray tracing, no specular, only the diffuse values and the light values matter.
Fill light pass will be the same as the key just remove the key light and change it to the fill light.
Reflection pass
Add the key and fill lights. Turn off the primary visibility of the objects that r reflecting but don’t need to be seen. Then break the connection of the key light (duplicate) to the car (so that the car is no more lit and has only reflection attributes) and also turn off the specular in the light. Reflections do not need light, but the objects that r being reflected need light.
Shadow pass
Add the key light to the layer and all the objects in the scene. Select objects and switch off primary visibility. Or use the maya preset to get self shadows also. The object casting a shadow, assign a surface shader to it, with no matte opacity and switch of the reflections and refractions.
Assignment
Key light, fill light, shadow pass, specular pass, color pass and background image.
03/29/07
Car Paint shader (clear coat shader)
Layered shader
one blinn shader with colour and diffuse and low specular, specular is tinted according to the colour but lighter, also make the highlight fairly diffused. Low reflectivity.
the second is a phong shader fully transparent, colour is black, it has high reflectivity high specular and high cosine power, with fresnel reflections
Fresnel Reflections – based on the camera. As the surface bends away from u it gets more reflective and more refractive.
For this we use a sampler info node.
Start by creating 2 ramps (dark grey on top and white on bot of ramp ) delete placement. Rename specular and reflection.
Create sampler info node. Take facing ratio and connect it to the V co-ordinate of the ramps (coz it’s a V ramp).
Connect to specular and to the reflectivity. To connect to reflectivity connect the reflectivity ramp to a luminance node (to convert RGB to luminance.) then u take the luminance and connect that to the reflectivity.
Assignment
Create a scene with car floor and environment and create all render passes
Color * key light + fill light + specular + shadow + environment +reflective
04/05/07
Reflection pass
If you want to generate the alpha of the reflection pass, then u will assign a background shader to the object, with the specular and the reflectivity must be the same (if there are maps then those need to be connected to the BG shader. This will generate the reflection and the alpha of it.
If u have an object which has multiple levels of reflections. Turn off primary visibility of that object, duplicate it, give the duplicate a BG shader, with visible in refls and refractions off and primary visibility on. U will get all the levels off relection.
Volume Lights
Light fog-spot light
Fog spread
Scale of the light affects the actual fog. Fog intensity increases the brightness of the fog. Increasing the light intensity makes the fog look brighter and the shader will also become brighter. The light intensity in the scene influences the fog. To match the fog to the shader, make a combination of the light intensity and the fog intensity.
Fog shadow intensity helps the shadow area become darker. And the fog shadow samples control the graininess, it helps with the anti aliasing.
To control the decay of the light fog use the light decay. But then we have to increase the intensity of the light. Or u can use decay regions. Press t and click on the manipulators till u get the decay regions then u can move them manually.
For raytraced shadows and volume light-
U need to adjust the volume samples override under the cone shape of the light. Fog works better with depth map shadows, ray traced shadows with fog are very expensive.
For a shadow pass for the fog layer, assign a surface shader to all the objects. It will create a mask of the fog layer.
U can put a texture in the fog density which will influence the density of the fog and not the actual light. But if u want it to affect the light also then u can put the texture in the light intensity.
04/12/07
Volume Lighting Contd.
3D textures follow the contours of the geometry. You can use ramps as a projection into the density of the light to control the fog drop off.
Shaders
Condition utility-
Color if true is the direction of the normals and color if false is the opp. But u have to tell the condition where the normals. First term and second term is what u r comparing with this operation to get the result.
Create a sampler info node and its called a state shader, it provides info on the state of the object. e.g. where the sample point is located in terms of world space.
Point camera is related to the camera the sample point’s position relative to the camera.
Connect the flipped normal of the sample info to the first term of the condition. Then set the second term to 0 and the operation is equal u get a 2 sided surface.
Co-ordinate spaces
Dot product equation between two products is the most important. In a vector (drawing) the dir and the magnitude are most important. In 3d we have 2 vectors the direction towards the camera, and the direction of the normal.
The dot product says that the magnitude of the normal and the direction of the camera multiplied with the cosine of those vectors. Since they are perpendicular to each other the dot product is 0.
Vector product
Connect a sampler info to the vector product. That is normal camera (sampler info) connect to input 1 and connect the ray direction to input 2. In the vector product the operation is dot product. Create a ramp and connect the vector output to the ramp’s V co-ordinate, then connect the ramp the color of the surface shader
Surface luminance shader-
Take a surface luminance, a surface shader, and a b/w ramp, and a lambert with diffuse to 1 and color is white.
Attach ramp to color of surface shader, connect the surface luminance to the ramp that is outvalue to v co-ordinate. This depends on ur light value if it exceeds the value of 1 then the ramp will repeat. So to rectify this we use a clamp, connect the surface luminance to the clamp and the clamp to the ramp. (output R to v co-ord)
04/19/07
Creating a dust layer on any surface
Use a ramp and a sampler info coz u see dust at glancing angles.
Take that ramp and put it in the color offset of ur texture or ramp that u r using for the color of the object. put a noise in the color gain to make the dust look a little broken up.
Glass shader
Shadow attenuation
Influences the raytraced shadow passes through the glass. 1 makes it darker.
Light absorbance depends on the surface thickness, and shows the light being absorbed.
Surface thickness is good with objects do not work well with objects that already have thickness.
To correct the refractions, make two glasses, outer and inner, both have thickness. For the outer one reverse the surface direction so that the normals are facing inwards. Remove cast and receive shadows from the inner one.
The glass shader, we use a phong with no diffuse, no color, and high specular. The refractions are higher than reflections. Reflections should be only at glancing angles, so we correct that using the sampler info with the facing ratio connected to a v ramp. So we put this in the specular. Take the same ramp, invert it and connect it to the samp-ler info and put it in the transparency so that we can control the refractions. To add color to the glass tint the color gain of the transparency ramp which will give us an overall color.
Glass panels
The sides should not be refractive at all, only the front face and the back face should.
Image based modeling
Project the stone etc texture on the plane. Then create a polygon cube, make the same size of the brick and make the height accordingly. Duplicate the cubes and make a wall of these cubes to match the projection. Start matching the polygons to the projection by pulling vertices. Then assign the same shader to the polygons, with the bump. Then we get a much better result. Shadows will be accurate.
04/26/07
Baking lights
Only for static BG and static objects. If the object is moving then u would only bake the light and not the shadows.
Assign a lambert with a white color to it, and then bake the shader into a texture.
Options for converting the texture - Fill texture seams, bake shading grp lighting and bake shadows. Open the script editor to see what maya does to bake the texture. Copy the script to use later.
Maya will create a surface shader with the new file texture. When u view it u will see a pattern. The light baking will need a separate UV mapping from the surface.
So select the surface and do a new projection, (automatic mapping, with create new UV set), this will make the surface have a unique space.
Then re-execute the script with specifying the UV set u want to use. By typing –uv (name of UV set.
Then assign the new file created with the baked light and shadows, and connect the file to the UV set. Then u can drop that new file (with the baked lights and shadows) and drop that into the ambient light of the shaders with all the textures in them.
Or u can use a surface shader and a multiply and divide node, put the baked image into input one and the texture into input 2 and connect the output of the multiply divide node to the outcolor of the surface shader.
Creating a ref texture for an object
Select the surface assign a projection texture to it, then go to texturing and create texture ref object. Maya creates a new object as the reference, put this new object into a layer.
This helps glue textures to surfaces.
Gamma correction –
Controls the brightness. The color space defines the luminance values.
Works within the range of 0 -1 on each channel RGB. A color space takes all the color visible, perceivable color and then maps it on a chart. So when testing a render in maya, test it with gamma correction on, but then render it out without the gamma correction and do it in post after color correction etc.
Maya shaders have gamma correction but the lights do not.
To correct gamma in maya, in the render globals,under render options, under color/compositing there is a gamma correction. The amount u put in there is 1 divided by the gamma of the monitor, which is usually 2.2
If u r using gamma correction in maya u need to connect a gamma correction to the shaders and the values u put in there is 0.454. u put the gamma correction node in the shaders
FINAL
3 high res images plus 2 images one side and top with lambert shader on it to show the layout. Camera motion of the scene. Put all this in gramercy, and also put all assignments and the final project on a CD and submit to class.
Tuesday, April 10, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment