PDA

View Full Version : Correct usage of soft shadows (skylights) with Mental Ray...


IXM
09-20-2005, 01:12 PM
I'm pretty new to Mental Ray, coming from Brazil, and I was wondering how you're supposed to correctly use Skylights so that you get soft shadows and global illumination? In Brazil, you just check off "Skylight" and upgrade the shadow qualities and that's it.

Obviously you create a skylight in your scene, but what settings would you change to get it so that you get the same light you get in Brazil and the same shadows? When I just plop a skylight down in Mental Ray, it's very dim and there's hardly any difference at all in the scene.

gonemad
09-20-2005, 07:37 PM
In mental ray you have to have Final Gather turned on to get any HDRI lighting from the skylight if that's the kind of lighting that you're doing. Other then that I find that the way Mental Ray uses the max skylight dosn't produce the same type of shadows that the skylight in brazil did. To work around this I usually do an ambient occlusion pass for my renders. I find this creates the same effect very well and is pretty easy to set up. However if you don't want to render a seperate pass then it gets a bit more complex to set up.

Best way in my opinion is to do a render with your GI, Final Gather, and what not, then do an ambient occlussion pass, then composite them afterward.

IXM
09-20-2005, 07:49 PM
I was wondering what took so long to post this... It's strange, I swear I've posted on this forum many times in the past, wonder what happened to my post count....

Anyways, the shadows I'm trying to get are the shadows in my logo, www.inuxmedia.com/portfolio/3d_logo.jpg , accurate and soft like real shadows. I have no idea what Ambient Occlusion Pass is either ><. Sorry.

steven xu
09-22-2005, 01:21 AM
In mental ray you have to have Final Gather turned on to get any HDRI lighting from the skylight if that's the kind of lighting that you're doing. Other then that I find that the way Mental Ray uses the max skylight dosn't produce the same type of shadows that the skylight in brazil did. To work around this I usually do an ambient occlusion pass for my renders. I find this creates the same effect very well and is pretty easy to set up. However if you don't want to render a seperate pass then it gets a bit more complex to set up.

Best way in my opinion is to do a render with your GI, Final Gather, and what not, then do an ambient occlussion pass, then composite them afterward.

perfectly answer~same to me~lol~i often use AO to the best shadow~it take so much less time~

csaez
09-22-2005, 01:45 AM
Hi, I think not is necessary a AO pass if you have correct radius max. and min. in the final gather, in my experience in a exterior scene if you put the radius correct in the FG is more faster than a extra pass of AO and his postproduction.

Grettings

IXM
09-24-2005, 04:03 PM
Can anyone give me a little bit more information as to where I can turn on AO? When I put a skylight in my workspace it completely kills the model... it turns into a.. blob. It has no defining features about it, just really hard shadows and no highlights.

gonemad
09-25-2005, 06:20 PM
AO is a shader in mental ray so you have to set it up as a material.

In your material editor select an empty slot then scroll down to the "Mental Ray Connection" group usually located at the bottom. In the "Basic Shaders" section of that group unlock "Surface". Click the button to select a material for it and in the Material/Maps Browser select "Ambient/Reflective Occlusion Base" it'll be listed as one of the mental ray shaders with a little yellow box next to it at the top of the list.

The basic settings for it are pretty simple. Samples are the same as they are in anything, how many samples max takes to compute the result. The higher the number the smoother the output but the longer the render. The bright and dark colors are pretty self explanitory, in this case white being the "lit" areas and black being the "shadowed" areas. Spread is how blurred out from the object the result is. A high number will give a really spread out soft looking effect and a low number with make a smaller but more crisp shadow. The last one you'll worry about for what you're trying to do is the Max distance. That refers to how far out from a surface a ray is cast before it returns as if it hasn't been occluded. If you leave it at 0 it'll continue on forever until it gets occluded by something in your scene. If you set it to 100 or something like that it'll only continue on until it's traveled 100 units then it'll come back and say it hasn't hit anything. Like most mental ray shaders you can apply a shader to any of these values right below the parameters area.

The next step is to open up the Render Scene dialog and go to the "Processing" tab. Here you'll find a field called "Material Override". Check the enable box and drag an instance of your AO material into the material slot. Now when you render it'll replace every material in your scene with the AO material you created.

One last tip. Since the AO material doesn't use lights to get it's result I'd suggest turning off all the lights in your scene when you do the AO pass so that max doesn't waste time calculating something that isn't going to affect your render.

Personally I like doing my occlusion as a seperate pass as I find I have much more control over the final look of the thing in a compositing software like photoshop or after effects.

I hope that helps.

m@Xist
09-28-2005, 01:32 AM
You get troubles if you want to do an ao pass and have caustics in your scene. I've done a testrun and it says "no photons stored ...". You had to disable caustics first. Or is there a way out?

gonemad
09-28-2005, 02:57 PM
Are you turning off your lights in the scene before rendering the AO pass? If so there would be no photons being emitted by anything to generate the caustics which would be a reason you'd get an error message. Try rendering the AO pass leaving your lights (or at least one of them) on.

I honestly haven't sat down and timed how long one frame of AO with light on and one with lights off takes to render to compare the times, but by watching some renders it seemed to me that it took longer to render the AO pass if max was still trying to calculate the lights. Maybe I'll give it a try after work today to see if there is any significant difference.

m@Xist
09-28-2005, 03:23 PM
btw: Right, you said it before to turn off the lights. Well, in this case it makes no sense to use an AO shader in order just to see what shadows caustics produce? :scream:

MOSS
09-30-2005, 02:24 AM
I have a scene in which I am using the fast skin shader + displacement, and I want to try an ambient occlusion pass. Is this possible to do and keep the displacement the same?

Edit-Nevermind me, you just have to apply a mentalray material with the instanced displacement map in the displacement slot, and the ambient occlusion shader in the surface slot-duh

CGTalk Moderation
09-30-2005, 02:25 AM
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.