One-click to improve your scene render in Poser! Poser Python scripts to instantly switch your scene lights to use softer ray-traced shadows, or to switch back again to the default Depth-map shadows. Working in Poser 11 and 12. In just one click, they save you having to fiddle around with each of the lights to turn on softer shadows across a scene.
Note that you can also soften shadow intensity manually, with the dial found on Light / Parameters / Shadow.
In both scripts the shadows are softened from the defaults (defaults = 0.0 for Ray-traced, 2.0 for Depth-map). Here the softening is increased to 6, but you may want to go to 12 or so. The free PASS Poser watercolor shaders on ArtStation Marketplace work best with even higher shadow blurring.
Change the script’s “(6)” to the shadows softness setting you want. If you want a full reset script, just set the “(6)” on the second script to the default (2) setting.
Set Ray-traced Shadows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# SWITCH TO SOFT RAY-TRACED SHADOWS FOR YOUR POSER SCENE # A small script to have all lights in a Poser scene move from using Depth Map Shadows # over to Ray-traced Shadows (with SOFT shadows set at 6.0). All scene lights are # assumed to be on and casting a shadow of some sort. Script is tested and working in # Poser 11 and Poser 12. # # Also boost sample size when rendering, for less grainy shadows. # You can also soften shadow _intensity_ with the dial on Light / Parameters / Shadow. import poser # Tell Poser we expect a scene to be loaded. scene = poser.Scene() # Get a list of lights in the Poser scene. lights = scene.Lights() #Run the script on all lights in the scene. for light in lights: # For some reason this old line needs to be above SetRayTraceShadows - or the switch over won't work. light.ParameterByCode(poser.kParmCodeDEPTHMAPSTRENGTH).SetValue(1.0) # Ok, now we can set the Light to cast Ray-traced shadows. light.SetRayTraceShadows(1) # Now we can set the amount of softness for the Ray-traced Light's shadows. # Note that here we do not use SetShadowBlurRadius() but rather SetShadowRaytraceSoftness() light.SetShadowRaytraceSoftness(6) scene.DrawAll() |
Set Depth-map Shadows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# SWITCH TO SOFT DEPTH-MAP SHADOWS FOR YOUR POSER SCENE # A small script to have all lights in a Poser scene move from using Ray-traced Shadows # to using Depth Map Shadows (with shadow softness at 6.0, from normal 2.0). All scene lights # are assumed to be on and casting a shadow of some sort. Script is tested and working in # Poser 11 and Poser 12. Also boost sample size when rendering, for less grainy shadows. # # Also boost sample size when rendering, for less grainy shadows. # You can also soften shadow _intensity_ with the dial on Light / Parameters / Shadow. import poser # Tell Poser we expect a scene to be loaded. scene = poser.Scene() # Get a list of lights in the Poser scene. lights = scene.Lights() #Run the script on all lights in the scene. for light in lights: # For some reason this old line needs to be above SetRayTraceShadows - or the switch over won't work. light.ParameterByCode(poser.kParmCodeDEPTHMAPSTRENGTH).SetValue(1.0) # Ok, now we can turn off Ray-traced shadows, if they are on. light.SetRayTraceShadows(0) # Now we can set the amount of softness for the depth-map shadows. # Note that here we use SetShadowBlurRadius() rather than the ray-traced SetShadowRaytraceSoftness() light.SetShadowBlurRadius(6) scene.DrawAll() |
Especially useful for soft indoor “old masters” type portraits, not so useful for hard-edged sun-baked beach scenes.
Pingback: What’s New in July/August 2022 – MyClone Poser and Daz Studio blog