PDA

View Full Version : Need help putting clouds in maya physical sun and sky


Ge0m3tRiC
07-04-2007, 07:18 AM
ok, so i read what this guy had to say

http://mentalraytips.blogspot.com/2007/02/clouds-with-mental-ray-sky.html

I put the image into the haze input and made sure my gain was cranked up but still nothing:T If anyone could help me wif this It would be very apreciated:D

Thank u:D

Ge0m3tRiC
07-04-2007, 09:18 AM
K so i guess i gotta make an environmental sphere, so i clicked on the haze input for the mental ray sky, i then selected environmental sphere. I placed the cloud image into the image input on the environmental sphere atributes. Still nothing, what do I need to do now? please help:T

Lamster
07-04-2007, 09:40 AM
Not environment sphere.

You create a mentalrayTexture node, and load the sky map onto it. Then you create a mib_lookup_spherical node, which can be found in the Environments Tab of the mental ray materials. Load the mentalray texture onto the mib_lookup_spherical tex attribute. Then you link one of the colour channels of the mib_lookup_spherical's outputs, I used the R channel of the RGB, to a multiplier node's input 1x. Then you give the input2 x value = 15. After that, you link the output x value to the physical_sky's haze node.

That's all there is to it.

Terence

Ge0m3tRiC
07-04-2007, 09:51 AM
ok so i made the look up node, clicked mental ray texture and inputed the image there. I grabed a multiply divide node but im not sure where the rgb output is to multiply:z it dosnt seem to let me connect input 2 to haze either:z It seems to render as pure white now:z

Lamster
07-04-2007, 10:38 AM
Hmm, seems you've got it wrong again.

You connect the output.r channel of the mib_lookup_spherical to the multiplydivide node's input1.x. Then you adjust the value of the multiplydivide node's input 2 from the attribute editor. Set it to 15. Then you connect the output.x of the multiplydivide node into the physical sky's haze attribute.

Terence

Ge0m3tRiC
07-04-2007, 11:04 AM
I cant find output r anywhere:z I am middle mouse dragging it over the multiply divide node. Thank u for taking the time to talk me through this:D Also it wont let me connect directly to haze, it only lets me feed into the rgb unit conversion:z

Lamster
07-04-2007, 11:20 AM
Hmm, I'm sorry, I used the wrong names for the values. Here's a real step by step:

- Middle click mib_lookup_spherical and drag onto MultiplyDivide node.
- Select Other from the dropdown that appears
- You will see the Connection Editor pop up
- Look for OutValue on the Left side and click on the + sign to open up the group
- Select the OutValue R attribute from that group
- Look for Input1 on the right side and click on the + sign to open up the group
- Select the Input1 X attribute from that group
- Hit the close button at the bottom of the Connection Editor Window
- Select the multiplyDivide node and open the Attribute Editor by typing ctrl+A
- Make sure operation attribute is Multiply and set Input2 leftmost entry (x attribute) to 12
- Middle Click on the MultiplyDivide Node and drag it onto the mia_physicalSky node
- Select Other from the dropdown that appears
- Connection Editor pop up
- Look for Output on the left side and click on the + sign to open up the group
- Select the Output X attribute from that group
- Look for Haze on the right side
- Select the Haze attribute
- Hit the close button at the bottom of the connection editor window
- Done

Terence

Ge0m3tRiC
07-04-2007, 11:40 AM
Awsome! Thank u so much. is there any way to darken things or is that just a side effect from projecting the clouds? Its very bright now:p

Ge0m3tRiC
07-04-2007, 11:59 AM
nevermind, if u set it to about 5 on the multiply it comes out very nice, then i sapose i can run a quick occlusion pass and layer that over to darken it back down. Thank u so much! Have a great night, er day, or whatever it is over there:D

Lamster
07-04-2007, 07:42 PM
Here's the real catch when it comes to using the physical sun/sky option for rendering.
You have to learn about gamma adjustment.

What you need to do is to create a mia_exposure_simple node from the mental ray materials under the Lenses tab.

Now you need to click on the cameras tab in the hypershade window and drag your scene camera into the work area.

Then you middle click on the mia_exposure_simple node and drop it onto the camera node. Select Default.

Now you select the mia_exposure_simple node and press ctrl+a to bring up the attribute editor window and you change the value in the gamma attribute to 2.2. Leave the other attributes alone if you don't know what they do :)

That bit of stuff above should fix the blown out brightness of the scene for you.

Now of you have any 8 bit file textures, eg. a typical tga file or jpg file, for any of your colour attributes, for example diffuse colour, you will find that even after applying the mia_exposure_simple to the camera, as you have done following the above instructions, that the colour of the texture in the render is still very wrong.

Here's what you have to do for all your colour textures:

Create a Gamma Correct Node from the maya color utilities tab in the hypershade.

Disconnect your colour file texture from your shader's by clicking on the link between the shader and the file texture. The link will turn yellow if you selected it correctly, and then you press the delete button.

Middle click your file texture and drag it onto the gamma correct node

Select Value from the list that pops up.

Select the gamma correct node and press ctrl+a to bring up the attribute editor

For the Gamma X, Y, Z attributes, enter a value of 1/2.2 = 0.455.

Now middle click on the gamma correct node and drag it onto the shader node.

If this is a diffuse colour texture for example, select the diffuse attribute from the list that pops up. Or you can select other and then assign the OutValue attribute on the left to whatever colour attribute you are supposed to assign it to on the right side.

This gamma correction will bring your texture's colour back to normal.

*One thing to note. Apply this gamma correction ONLY to colour textures. Textures like Bump Map textures or Displacement Map textures or Specular Map textures don't need to be assigned gamma correction.

Hope this helps you to make nice renders man.

Terence

CGTalk Moderation
07-04-2007, 07:42 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.