Friday, June 21, 2013

Class09 - Texture map 3D set geo with HDR pano - continued

This class will continue the concept started last week with a different background in the light tent.  These things come with 4 different colored pads to get a variety of looks in your photography, so we will work with the blue floor and back wall.  






What are string options?

String Options are essential a tool for you to declare a variable to the mental ray renderer that is not directly built into the Maya/mentalray translator.  You can use string options to tell mental ray to turn on/off a feature and what settings to use.
Once you start using the user_ibl_rect for your area lights, you must add this string.
select miDefaultOptions
hit “add new item”
scroll down to the last new empty string in the attribute editor
name = light relative scale
value = 0.318
type = scalar
Spelling is important, and the value 0.318 is the recipricol of pi.


It has to do with how shaders work with light (and the amount, hence, scale) and that newer shaders handle light differently. By adding this string option you ensure scenes with old, new, or mixed shader types react the same way.
Lastly, and very important: you must use the string option for Light Relative Scale for this shader to correctly scale the light for non-BSDF or older (legacy) shaders. This value is 1/pi. This is added in the miDefaultOptions.
Light scaling. If using traditional materials, rather than bsdfs, etc., use the string option "light relative scale" with a scalar value of 0.318, which is roughly 1/pi
And make sure disable the spec from the mia
b) Rectangle type area light shape. For user_ibl_rect, ensure that the type of area light shape is rectangle.



There are 3 IBL systems in maya 2013.
(1) There is standard IBL that was in maya since decades.
(2) There is Native IBL that work with standard IBL just accelerate it better and importance sample the HDRI, also gives you direct lighting with shadows, can turn off or reduce FG.
(3) There is User_IBL_env that is new with MR 3.10, you connect HDR image to an area light and camera env.
Lastly there is the other IBL shader calle,  User_IBL_rect - which is a lights shader that we can use with HDR textures. So if we plug texture into this shader it will be  used as light source it will use importance sampling to sample it and render quite fast, good with Unified Sampling.


Now we take a closer look at the user_ibl_rect light shader.
When rendering command line, I get this message because I have visibility OFF for my lights.
“IBL shaders should be applied to a VISIBLE user area light to work optimally”


First we will do some simple comparison tests between visibility ON/OFF.
Visibility OFF creates a specular response, this highlight is not good because it doubles the light.
The renderer messages and documentation suggest keeping visibility ON.


Lighting - Create an animatable control switch to handle lighting, texture switch, and two light intensities.  On the light tent geo (1) create attribute, float, between 0 and 1  (2) write an expression on the blend node that will dissolve between the two textures (3) use set driven key to control the two light intensities between 0 and 2


Kit-bashing - Look at the animated spider file.  Do a clean export of only parts you need, no render layers, hidden geo, old shaders, all optimized.  Replace legacy shaders with current mia light conservation shaders with textures plugged in.  Group, import, then scale, rotate and translate into place.



Modelling -  Using polygon extrude, dig out a hole where the spider will emerge.  Be sure to go into UV texture window to un stretch around the mouth of the spider hole.  


Camera animation - make a two node camera so you can keyframe the aim node and attach to motion path for the camera body.


Render - break into as few render layers as possible.  Use PCM pass contribution map to render foreground character with background light tent, then have matte passes with holdout to separate later.  Because the light tent is using a surface shader and not actually being affected by lights, you will need to create diffuse pass for the hole only.  Also will need a shadow pass with mip_matteshadow.

Comp - put layers together in Nuke, compare to basic photographs of the light tent.

Voxelizer Script


I had to try one experiment with voxelizer after seeing some cool examples online.  The idea of breaking any complex model into little discreet parts is always interesting to me, so I took the Infinite Realities head and ran this script on it.  After a two minute wait it pops out 4000+ cubes, will a little bit of spacing between them, and they each have their own Lambert shader with a color resulting from a sample of the texture that was on there.  The only problem was I wanted SSS skin shader on each one, but this script would only put out lambert, and I did not find a way to convert them all.  So I rendered that in the blue light tent and posted here, very little effort, but a fun exercise.  For sure I want to make them look like skin, and I want them to drop to the ground or explode with Rigid Body Dynamics.  Next time.


No comments:

Post a Comment