PDA

View Full Version : Mental Ray depth map lights


jerseycajun
02-13-2011, 12:12 AM
Hello all, inaugural post for this forum, hope it's a worthy one :)

I'm working with a scene lit with a couple of point lights and a spotlight illuminating a character sitting at a kitchen counter. The skin of the character is a Mental Ray SSS x-passes material, and the lights utilize Mental Ray depth map shadows The character utilizes Shave and a Haircut hair nodes, though I do not expect the source of the shadowing issue stems from that, but it may be important anyway.

Now the problem: On the skin, and on any remaining objects in the scene not yet textured (i.e. using the initial lambert shader), there tends to be a strange artifact which looks like highlights and black areas which create an almost blinn-like artificial shininess to the skin, which is not desirable. Adjusting the standard controls of resolution, samples, softness and bias have not been able to correct the issue satisfactorily, it changes the look of the artifact, but does not eliminate it.

I'm hoping someone else watching these boards has encountered a solution to this problem already.

Thanks in advance,

Has anyone encountered this particular artifact before, or

Bitter
02-14-2011, 05:52 AM
Not familiar from that description. Can you post an image?

Are you using depth map because of the hair? Try detail shadows instead.

jerseycajun
02-14-2011, 06:58 AM
Not familiar from that description. Can you post an image?

Are you using depth map because of the hair? Try detail shadows instead.

Got a deviantart link: http://jerseycajun.deviantart.com/art/lighting-error-197382310

musashidan
02-14-2011, 08:08 AM
Don't use legacy 'old school' lights with MR. They are obsolete and will not give accurate results. Try lighting your scene with MR specific lights instead.

jerseycajun
02-14-2011, 03:58 PM
Don't use legacy 'old school' lights with MR. They are obsolete and will not give accurate results. Try lighting your scene with MR specific lights instead.

Funny you should suggest that because I had seen the mib_light_point and mib_light_spot in the list of mental ray nodes before, but I'd never thought to use them because up until now the legacy lights had been doing a reasonable job.

Being a neophyte to mib lights though, I'm looking at them and wondering... They appear to be shaders to be applied to legacy lights. How do they interact with the attributes in legacy lights? Do they override all attributes? The controls are simplified, but I'm not sure how to adjust my approach in lighting design when using.

Is there a tutorial for someone like me using these for the first time?

The upside is, is that the artifacts are gone. :)

Thanks for your help!

jerseycajun
02-14-2011, 07:33 PM
Don't use legacy 'old school' lights with MR. They are obsolete and will not give accurate results. Try lighting your scene with MR specific lights instead.

Well, maybe I was a bit premature in declaring victory. Adding and playing with the mental ray light shaders actuallly hasn't gotten rid of the faux-shininess issue:

Link: http://jerseycajun.deviantart.com/art/shadow-error-2-197439665

Notice around the eye and inside the ear, the dark black wells and strange highlights.

Are there some specific rules that are different when playing with these shaders? Perhaps some leftover attributes from the lights I'm applying them to?

musashidan
02-14-2011, 08:57 PM
Use the photometric lights(MR 3.8) or sky portals rather than the point/spot lights. There is also the wom_archlight which emulates the photometric light if you are pre-MR3.8.

Wom_archlight: LINK (http://www.creativecrash.com/maya/downloads/shaders/c/wom_archlight--2)

jerseycajun
02-14-2011, 09:08 PM
Use the photometric lights(MR 3.8) or sky portals rather than the point/spot lights. There is also the wom_archlight which emulates the photometric light if you are pre-MR3.8.

Wom_archlight: LINK (http://www.creativecrash.com/maya/downloads/shaders/c/wom_archlight--2)

One step ahead of you on the photometric lights :) Unfortunately...

http://jerseycajun.deviantart.com/art/Shadow-error3-197452144

patrickrowan
02-14-2011, 09:43 PM
hey justin, i have never really lit hair with mental ray but if i was trouble shooting that scene i might try.

rendering the background separate with area lights so you get more realistic shadows etc.

have the character on a separate render layer.
since u are not rendering photo realistic i wouldn't worry about not using "old school lights" .for shadow maps spot lights are ur friend. remember to have the cone of the light "very" tight around your character.look through the light if needed. u need as much shadow resolution on the char as u can get.

for the pics u have shown looks like u might get away with a mia material instead of the sss one. im only saying this because i would swap the shader for a mia and see if u still get the artifacts.

how many lights have u got in your scene? turn them all off and one at a time turn them back on again.checking your renders as u go.

hope this helps :)

Bitter
02-14-2011, 09:45 PM
Portal lights are designed to operate as an area light that also gives Final Gathering a hint where environmental light may be coming from. It's not generally designed to be your primary light.

mental ray light shaders are very basic shaders used as examples for the most part. Maya and Max lights when rendered in mental ray are indeed mental ray lights (or else they wouldn't render). These shaders for lights are written specifically for mental ray translation and are current if not more current than the mib_shaders. In fact, mib_shaders are exceptionally old in most cases.

The photometric light may help you with more accurate lighting, etc But I'm not convinced it's the light shader just yet.

Does this artifact disappear if you use raytrace shadows?

Bitter
02-14-2011, 09:47 PM
Keep in mind if you use detail shadows instead of a shadow map you do not have to increase your shadow resolution particularly high. It has a pixel sampler instead to provide details per pixel of shadow map instead of requiring more resolution. (The samples parameter)

Be careful of the softness attribute, small increases are very blurry.

jerseycajun
02-14-2011, 09:55 PM
hey justin, i have never really lit hair with mental ray but if i was trouble shooting that scene i might try.

rendering the background separate with area lights so you get more realistic shadows etc.

have the character on a separate render layer.
since u are not rendering photo realistic i wouldn't worry about not using "old school lights" .for shadow maps spot lights are ur friend. remember to have the cone of the light "very" tight around your character.look through the light if needed. u need as much shadow resolution on the char as u can get.

for the pics u have shown looks like u might get away with a mia material instead of the sss one. im only saying this because i would swap the shader for a mia and see if u still get the artifacts.

how many lights have u got in your scene? turn them all off and one at a time turn them back on again.checking your renders as u go.

hope this helps :)

I would love to separate out the scene into different render layers, but I'm using Shave hair nodes on the character, and when I begin messing around with render layers, it tends to cause consistency issues with the hair (becomes very 'iffy' whether or not the hair renders at all - sometimes in adjusting the layers, it would stop rendering anything, and I'd have to recreate the scene to undo the issue), in addition to the fact that for some odd reason, separating out the scene into render layers also makes my render times explode for even the background layer (what used to render in 2 minutes in its own file takes almost 20 minutes at the same resolution when the character and the background are in the same file together, even if they're not on the same layer).

It's a good idea, but it was causing so much consternation, I needed to get away from it and going back to only one layer streamlined all of the concerns, it seems. I wish I had an answer as to what was causing it, but I just couldn't spend any more time fighting with that kind of pipeline. Still in the process of figuring out the proper rendering pipeline for this project.

Anyway, sorry for the sob story ;)

musashidan
02-14-2011, 10:11 PM
Portal lights are designed to operate as an area light that also gives Final Gathering a hint where environmental light may be coming from. It's not generally designed to be your primary light.

mental ray light shaders are very basic shaders used as examples for the most part. Maya and Max lights when rendered in mental ray are indeed mental ray lights (or else they wouldn't render). These shaders for lights are written specifically for mental ray translation and are current if not more current than the mib_shaders. In fact, mib_shaders are exceptionally old in most cases.


Portal lights work great as key/fill/rim lights. (And don't require as much final gather samples) In fact I pretty much use them most of the time unless I need a particularly small light with high luminance to show bump details or spec highlights, in which case I'll switch it out for a photometric light.
Even though Max/Maya legacy spot/point lights render in MR it's generally not a good idea to use them as they are not physically accurate and will give incorrect light throw/shadow falloff.
Agreed on the mib_shaders. I believe they were written as '3 lines of code' test shaders.

jerseycajun
02-14-2011, 11:11 PM
Does this artifact disappear if you use raytrace shadows?

Just tried switching it over, and no change vis-a-vis the strange highlights/shadow pits.

One of the only reasons I switched away from raytraced shadows was because the render times when Shave hair needed to be rendered became unfeasable. Shadow mapped shadows were reccommended by Joe Alter in his manual anyway. You can use raytraced shadows more with hair rendered in buffer mode, but the results were still taking longer. This seemed like the better solution.

Bitter
02-15-2011, 03:36 AM
If the artifacts appear despite a shadow and light change I would take a look at your material properties.

For now the Rasterizer and detail maps will look best for hair.

And the Maya lights are physically plausible if you use the correct settings like quadratic decay.

jerseycajun
02-15-2011, 06:35 AM
If the artifacts appear despite a shadow and light change I would take a look at your material properties.

For now the Rasterizer and detail maps will look best for hair.

And the Maya lights are physically plausible if you use the correct settings like quadratic decay.

I did look at the material properties, but the error repeated itself even on the default lambert material (and I can't think of any setting on the lambert shader which would or should produce that result).

One of the last things I tried tonight was to go back to the original two files which made up the problem file.

The scene/background file still has certain components which are showing similar flaws to them, especially the lambert ones.

Meanwhile, the character file alone, lit with similar depth-mapped shadow spotlights, renders without any black pits or highlights.

I think there's some kind of problem with the set file, which wouldn't surprise me because this isn't the first rodeo that set has caused problems, though trying to find out what it is might be a wild goose chase. I dunno, maybe I can export each of the set objects individually, and re-incorporate them into a new set scene. Tedious, but if I'm right, I'm not sure what else I could do to fix the file without re-creating each of the elements from scratch, and there's a t least a couple of weeks of solid work in that set.

patrickrowan
02-15-2011, 08:35 AM
had wrote something but not relevant now.:blush:

Bitter
02-16-2011, 05:23 AM
Anything you can post maybe?

jerseycajun
02-16-2011, 03:52 PM
Anything you can post maybe?

Now that you mention it :)

Link: http://jerseycajun.deviantart.com/art/Lighting-Error-comparison-197657610

Black wells show up on some geometry like curtains, shown here in standrad lambert, but character is normal in its own file under the same kind of lighting.

jerseycajun
02-17-2011, 02:40 AM
Is there a way I can share this file with others here? I've managed to get a stripped down version of the file to about 8Mb compressed, with one light and lambert shaders everywhere. Made sure the issue is persisting, and it is.

CGTalk Moderation
02-17-2011, 02:40 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.