What's best to reduce lighting artifacts?

Herald of FireHerald of Fire Posts: 3,504
edited November 2012 in Daz Studio Discussion

In the example render below you'll notice I'm getting 'patchy' spots very noticeably on the female's legs. This is a simple render only using two distant lights, one of which set to use raytraced shadows and the other acting on a lower intensity to provide more ambient lighting to the scene. The original used UberEnvironment2 but proved even more patchy, even with a high quality setting.

I suppose really I have two main questions. Firstly, what could be causing this peculiarity, and secondly what can be done about it to give a smoother lighting effect? Lighting is a tricky mistress which I'm hoping to get full control over, so feel free to 'educate' me on its finer points as necessary.

Post edited by Herald of Fire on

Comments

  • BlackFeather1973BlackFeather1973 Posts: 739
    edited December 1969

    Lowering the shading rate might fix this. I usually have it at 0.1 or 0.2

  • adamr001adamr001 Posts: 1,322
    edited November 2012

    What you're seeing is Ambient Occlusion patchiness. This is a result of UberEnvironment settings. Even the "high" setting isn't great for avoiding this unless the other lights are casting the primary (raytraced) shadows.

    Read more about it in my Learning UE2 thread: http://www.daz3d.com/forums/discussion/5320/

    Alternatively, adjust the Shading Rate on UE2 itself to be 1.00 (down from 8.00 on the 4x High preset) and see if that does the trick. Go lower if not satisfied.

    Post edited by adamr001 on
  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    That might be true for the UberEnvironment, but the above render is just using two 'distant' lights and getting the same effect. No occlusion settings have been applied beyond that. I'll have a play with the shading rate anyway, as that might help reduce the problem.

  • SzarkSzark Posts: 10,634
    edited December 1969

    Looks like you are using soft shadows too. Shading rate and Shadows Samples will probably fix the issue. As mentioned already try 0.20 for the Shading rate first and lower if needed. Shadow Samples 20 - 24

  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    I can't seem to find shadow sample settings anywhere either in the regular lights or the UberEnvironment ones. Right now I'm rendering an 'experiment' using IDL UE lighting to see what pretty effects I can get out of the scene. As you can imagine, it's chewing my processor up a bit, so I don't expect it to finish rendering for at least another twenty minutes. That said, I've been adding to the scene since the last render so it has even more work to do.

    At least it's looking more like daytime rather than a weird dusky shade.

  • BlackFeather1973BlackFeather1973 Posts: 739
    edited December 1969

    Shading rate and shadow samples settings are in your advanced render settings, not in lights parameters.

  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    Thanks for that. See, I'm still learning!

    That said, so far the IDL render is looking very nice indeed. Good enough, perhaps, for a final image. It's nice and bright, there is good shadowing and the depth of field really adds a great effect to the whole ensemble. I'm still a ways from producing the incredibly high quality work I've seen on some of the promotional renders for Daz products, but it's a fun path to my goals. I'll put the render up here if it ever finishes rendering this side of christmas.

  • BlackFeather1973BlackFeather1973 Posts: 739
    edited December 1969

    Thanks for that. See, I'm still learning!

    Oh, me too. I learned this from Szark not long ago, he really knows a lot bout this stuff. Thought i'd share the knowledge :)

    Happy rendering, and please do share your image when finished. Would like to see the final version.

  • SzarkSzark Posts: 10,634
    edited December 1969

    Thanks for that. See, I'm still learning!

    Oh, me too. I learned this from Szark not long ago, he really knows a lot bout this stuff. No I don't, please stop spreading rumours about me...it's all lies I tell ya all lies. :) The truth is I only know a fraction. :P

    Sorry HeraldOfFire yes I should have mentioned the Advanced Render Settings Pane. This is your Quality box for the most part. Some advanced Shaders and Lights can have additional quility settings in either the Parameters Pane or like Area Lighting their light parameters are in the Surfaces Pane.

  • adamr001adamr001 Posts: 1,322
    edited December 1969

    Sorry I didn't read close enough to see that you'd already removed UE2 from the equation. Depth of Field will cause pixelation as well. Increasing the X/Y Pixel Samples on the advanced render tab should clean up pixelation from Depth of Field. Try 12 or so each to start.

  • wancowwancow Posts: 2,708
    edited November 2012

    Guys, is the shading rate and shadow settings the solution to all render artifacts? I'm getting some very different ones... This is one type.

    This is one type of issue I'm seeing (not the only one), sort of shadow lines...

    I have UE2, shading rate is 8, Shadow Samples is 16 (on the render settings, I couldn't find Shadow Samples on the UE2 settings)

    shadowlines.jpg
    262 x 282 - 8K
    Post edited by wancow on
  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    Okay, well the render finished but there's a few tweaks which I need. The big thing you'll note is there's no directional shadows. Adding another light seems to bleed out the scene, and I'm not sure there's a way to have raytraced shadows with light illumination turned off.

    The UE2 lighting works fine for the giving the scene a nice polished look, but the lack of a good shadow leaves me wondering where the sun vanished to. I'm assuming there's no way to get the UE light itself to cast raytraced shadows from its origin, so I presume I'll need a second light for the raytracing. How can I add one without blowing out the entire scene?

    Wrong_Foot.png
    1480 x 892 - 2M
  • wancowwancow Posts: 2,708
    edited December 1969

    I'm wondering if there's ever a way to render a shadow layer... I think that would solve bunch of problems...

  • wancowwancow Posts: 2,708
    edited December 1969

    While I'm at it, here's another one I'm seeing, usually, if not always, around anything transparency mapped. Same Settings as above.

    artifact.jpg
    274 x 280 - 16K
  • adamr001adamr001 Posts: 1,322
    edited November 2012

    The UE2 lighting works fine for the giving the scene a nice polished look, but the lack of a good shadow leaves me wondering where the sun vanished to. I'm assuming there's no way to get the UE light itself to cast raytraced shadows from its origin, so I presume I'll need a second light for the raytracing. How can I add one without blowing out the entire scene?

    A couple of ways.

    1) Reduce the light intensity of UE2 before adding other lights.

    2) Use an HDR Map for a UE2 environment map. Look at the preset "Set HDR KHPark" for UE2. You'll see it is a nice outdoor lighting seen with a clear "sun" indicated. That's not all you have to do though, you also have to change the lighting mode for UE2 from the default "Occlusion w/Soft Shadows" to "Occlusion w/Directional Shadows" or "Indirect Light w/Directional Shadows".

    Hint: Unlock the all the scale and XYZ translations of the UE2 sample sphere (on the scene tab, expand the UE2 light, select Environment Sphere, switch to parameters tab, use the paramters tab context menu to Show Hidden parameters, remove locks on XYZ Scale and the global scale, as well as the XYZ translation). You can then change the global scale of the UE2 EnvironmentSphere to, oh, 5%. Do NOT unlock the rotation settings. You CAN however, translate the sphere without effect on the render to, say, avoid the sphere being hidden by content in the scene. Make certain you switch your selection back to the main UE2 light on the scene tab, use the Y-axis rotation to move UE2 around so you can tell where the sunlight is supposed to shine, render and you should have your directional shadows.

    Post edited by adamr001 on
  • adamr001adamr001 Posts: 1,322
    edited December 1969

    wancow said:
    While I'm at it, here's another one I'm seeing, usually, if not always, around anything transparency mapped. Same Settings as above.

    This is a bug with Deep Shadow Mapping in renderman. Often adjusting the camera angle will make it go away, but not always. The only sure-fire way is to switch all lights to raytraced shadows.
  • mjc1016mjc1016 Posts: 15,001
    edited November 2012

    adamr001 said:
    wancow said:
    While I'm at it, here's another one I'm seeing, usually, if not always, around anything transparency mapped. Same Settings as above.

    This is a bug with Deep Shadow Mapping in renderman. Often adjusting the camera angle will make it go away, but not always. The only sure-fire way is to switch all lights to raytraced shadows.

    If you go through the 3Delight forum archives, you'll find that issue and the solution (change camera angle/use raytraced) going back for a very long time. It's not so much a bug, because it's actually doing what it's supposed to be doing...it's just the math involved is coming up with a result that doesn't match 'reality'.

    If I remember, there was a solution talked about a long time ago, but implementing it made DSM all but unusable because of how much it slowed things down...

    The version of 3Delight, in the latest beta, includes a huge number of improvements to the raytracing subsystem. Supposedly, in some cases, with raytraced shadows, it's now faster than DSM...I can't get the beta to run on my system, so I can't check it out.

    Post edited by mjc1016 on
  • adamr001adamr001 Posts: 1,322
    edited December 1969

    Right, mjc is correct, I was glossing that all into the term of "bug" because it seems to me to be a design flaw that could be easily handled with some bounding controls. But hey, I'm not a pixar programmer. :D :D :D :D

    (wish I was though, lol)

  • BlackFeather1973BlackFeather1973 Posts: 739
    edited December 1969

    mjc1016 said:
    If you go through the 3Delight forum archives, you'll find that issue and the solution (change camera angle/use raytraced) going back for a very long time. It's not so much a bug, because it's actually doing what it's supposed to be doing...it's just the math involved is coming up with a result that doesn't match 'reality'.

    Applying a bit softness to the shadows often fixes this as well for me.
  • SzarkSzark Posts: 10,634
    edited December 1969

    wancow said:
    Guys, is the shading rate and shadow settings the solution to all render artifacts? I'm getting some very different ones... This is one type.

    This is one type of issue I'm seeing (not the only one), sort of shadow lines...

    I have UE2, shading rate is 8, Shadow Samples is 16 (on the render settings, I couldn't find Shadow Samples on the UE2 settings)

    A Shading Rate of 8 no wonder you are getting the lines. 0.50 for medium qualtiy, 0.10 even better quailty. (lower is better for shaing rates).

    The softer you have the shadows the more you increase the Shadow Samples and lower the Shading Rating value is always a good idea for final renders UE2 doesn't have Shadows Samples only Occlusion Samples

  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    It's a tricky balance if I want to have my cake and eat it, or so it seems. I'm playing around with settings at the moment, largely with mixed results. Objects I want lit indirectly are often coming out very dark, whilst if I raise the UE brightness it effectively blows out any surfaces which are in direct sunlight. I might just cheat and render out a separate shadow map by setting the floor as a temporary shadow catcher and hiding the remainder of the scene. An ugly 'fix' to be sure, but more guaranteed to get the results I'm after.

  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    Manually added the shadows in Photoshop. It's not perfect, far from it, but it's looking a lot better than it did. I used a shadow catcher and rendered the scene, then used Photoshop to manually pick off the shadows from the image and apply it over the existing render. A little low-opacity eraser here and there to soften the shadow edges in places.

    Again, it's still far from perfect and I plan to do a much higher resolution render at some point, but for those interested, the image is below.

    Wrong_Foot_Poster.png
    1480 x 892 - 1M
  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    It's a tricky balance if I want to have my cake and eat it, or so it seems. I'm playing around with settings at the moment, largely with mixed results. Objects I want lit indirectly are often coming out very dark, whilst if I raise the UE brightness it effectively blows out any surfaces which are in direct sunlight. I might just cheat and render out a separate shadow map by setting the floor as a temporary shadow catcher and hiding the remainder of the scene. An ugly 'fix' to be sure, but more guaranteed to get the results I'm after.

    That's where playing with, in addition to the settings you are adjusting, the Ambient setting for each surface comes into play.

  • MachieltjeMachieltje Posts: 0
    edited December 1969

    It's a tricky balance if I want to have my cake and eat it, or so it seems. I'm playing around with settings at the moment, largely with mixed results. Objects I want lit indirectly are often coming out very dark, whilst if I raise the UE brightness it effectively blows out any surfaces which are in direct sunlight. I might just cheat and render out a separate shadow map by setting the floor as a temporary shadow catcher and hiding the remainder of the scene. An ugly 'fix' to be sure, but more guaranteed to get the results I'm after.


    If you use UE2 for ambient light only (occl/soft shadows) you can then and a plain ole distant light to raytrace your shadows. I usually set UE2 to about 30-40% for ambient. You can also add some colour to UE2 to add special effects (very light yellow or orange for a sunset for instance)

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    Szark said:
    wancow said:
    Guys, is the shading rate and shadow settings the solution to all render artifacts? I'm getting some very different ones... This is one type.

    This is one type of issue I'm seeing (not the only one), sort of shadow lines...

    I have UE2, shading rate is 8, Shadow Samples is 16 (on the render settings, I couldn't find Shadow Samples on the UE2 settings)

    A Shading Rate of 8 no wonder you are getting the lines. 0.50 for medium qualtiy, 0.10 even better quailty. (lower is better for shaing rates).

    The softer you have the shadows the more you increase the Shadow Samples and lower the Shading Rating value is always a good idea for final renders UE2 doesn't have Shadows Samples only Occlusion Samples

    Waitwaitwait - don't get Wancow confused - setting shading rate for UE2 to 0.1 is a bit stretching it, to say the least. The general shading rate in the "Advanced" settings - maybe (0.4 - 0.5 is generally good enough unless you're rendering postmarks). But UE's own shading rate is good enough at 4.

    What works better is to up the Occlusion Samples of the UE. 128 is the default highest IIRC, but if you edit the parameter not to obey limits, you can feed much more to the UE - some people use 512.

    Also you could half the "max error" parameter.

    And, unless you're using UE to cast giant directional shadows or GI, turn down the "max trace distance" to something sensible. It's in centimeters, an inch is 2.5 cm. So 15 cm is generally more than enough for AO and even IDL.

    Shadow samples in the general render settings only affects DSMs. If you ARE using DSMs, up it all the way to 64. Or better yet, use shader mixer lights and control the map samples individually. A distant light over a giant piece of architecture may need 160 samples, while a spotlight doing a local "fill light" job can get away with 16.

    BUT the thing is, these artifacts wancow posted don't look like insufficient samples are involved.

    One thing may be shadow bias too low - it creates self-shadowing, especially on low-poly models. UE generally handles even a "cornered sphere" well at the default bias; USLK does not, in my experience.

    Still, these artifacts look closest to subsurface scattering artifacts. Check if SSS is enabled in the surface shader - since most settings are done only based on "what looks good" (Elite products included), they often fail in lighting environments that don't match the one the texture artist used. The most scientifically sound way to implement SSS is to set SSS shading rate to 1 or 0.5 (2 also might work for larger images or closeups), and SSS scale to 0.1.
    It won't slow you down much (I'd wager you won't notice anything on a modern computer), but the artifacts should go away.

  • barbultbarbult Posts: 23,136
    edited December 1969

    DSM??? USLK??? What are those acronyms?

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 2012

    barbult said:
    DSM??? USLK??? What are those acronyms?

    DSM = deep shadow maps. This one you'd better jot down, it's commonly used.

    USLK - UberSoft Lighting Kit, also by omnifreaker: http://www.daz3d.com/shop/ubersoft-lighting-kit - awesome in its own right, but not to be used with older figures like, say, V3RR (Victoria 3 Reduced Resolution) or H3 (Hiro3): for instance, their arms come out faceted.

    Hopefully the abbreviations were the only confusing part of my post.

    UPD: on re-reading. GI = global illumination. IDL = indirect lighting. Just in case.

    Post edited by Mustakettu85 on
  • barbultbarbult Posts: 23,136
    edited December 1969

    Thanks! DSM I would have eventually figured out, but USLK, never. I'm off to experiment with your SSS (Subsurface Scattering - I got that one!) recommendations.

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited December 1969

    barbult said:
    Thanks! DSM I would have eventually figured out, but USLK, never. I'm off to experiment with your SSS (Subsurface Scattering - I got that one!) recommendations.

    You're welcome! What you may also need to adjust when using SSS is diffuse strength - in theory, you should do energy conservation for the shader and have at least diffuse strength and SSS strength together equal 100, but in practice I've found that too much depends on skin textures. Diffuse is generally around 70 when I use UberSurface. Though I prefer UberSurface 2 http://www.daz3d.com/shop/ubersurface2-layered-shader-for-daz-studio , or plugging the shader mixer SSS brick into my network - their SSS settings make more sense.

    Here are a couple of settings for US2 I came to after all the research, trial and error we've carried out once in a cool thread on the old forum:

    HOT WAX:
    SSS "skin3" strength 80%, diffuse strength 20%, about 25% specular, no spec maps, bump 100%, min/max values 0.1
    SSS scale 1

    GOOD SKIN:
    bump min/max 0.02, spec strength 15% with bump maps, diffuse strength 40%, SSS strength 60% "skin3", 0.1 scale

    This was for David3 hi-res maps, so spec/bump values obviously need adjusting in case of other textures. Add velvet and adjust fresnel to taste.

Sign In or Register to comment.