Forum: Poser Python Scripting


Subject: Script to change the Preview Shadow Map Size on all lights?

HartyBart opened this issue on Jan 29, 2020 ยท 10 posts


HartyBart posted Wed, 29 January 2020 at 4:37 PM

Thanks for all your help. Well, I've spend about eight hours on trying to puzzle it out, so far, and I'm giving up on it. But I'll leave the script here, complete, for those who may find this thread in the future and know how to fix it...

# PoserPython Script for Poser 11, February 2020.
# ALL LIGHTS SET TO CAST BETTER-QUALITY SHADOWS IN COMIC BOOK PREVIEW.
#
# This script looks at all the lights in the current scene 
# and sets their Preview shadow map Properties, to a new 
# size of 1024 rather than the default 512.  This greatly 
# improves shadow quality in Preview.  We don't go higher 
# than 1024 because Firefly renders will reliably crash 
# Poser at 2048, but the dial lets you go as high as 4096.
#
# Script not working in Poser 11 or Poser 2014, for unknown reasons.

import poser
scene = poser.Scene()
if (scene):
      lights = scene.Lights()
      for light in lights:
        shad = light.Parameter("Map Size")
        shad.SetValue(1024)
        light.Parameter("Map Size").SetValue(1024)



Learn the Secrets of Poser 11 and Line-art Filters.