Forum: Poser Python Scripting


Subject: Display units vs worldvertex

colorcurvature opened this issue on Sep 28, 2011 ยท 5 posts


bagginsbill posted Thu, 29 September 2011 at 6:36 AM

Well now you brought up SSS, as if I had done so, and said the wrong thing.

The Scatter nodes does not express scatter distance (Scale) in any units other than a multiple of a given reference material. For example, if you choose "Apple" but you set the scale to 2, you're telling Poser to treat each real-world distance as if it was twice that far when calculating the scattering of an Apple.

On the other hand the Custom Scatter node has a mean free path parameter that is explicitly in millimeters at all times, and is never converted by PDU.

The Subsurface Skin node has no geometrical parameter of any kind.

So it is not "mainly for materials ... like for the SSS" because the example you picked is uniquely unaffected by PDU.

In materials, PDU affects the display of bump distance and displacement distance. If I set a displacement of 12 (and I am always showing inches) and you are in feet, then when you load my material from the library, yours will show the displacement on your screen as 1. It is still 12 inside, because the internal unit for materials is inches.

Another material parameter that involves a geometrical distance is in Reflect and Refract - the RayBias parameter. This is also stored in inches internally, but displayed in whatever PDU you select. Again, on my screen, where the PDU is also inches, I see the real number stored in the material file. Somebody with PDU=feet does not.

In all cases, any Python code setting or getting these numbers from the material room API will always see these values in inches.

The parameters for position of objects are internally in PNU at all times, while the user interface is converting to PDU. The values of vertex positions are also in PNU at all times.

So the impact of display units on the internal representation is nothing - no impact. The impact of display units on the values you get or set via the Python API is nothing - no impact.

To understand the meaning of values found in Poser files, or found in objects retrieved via the Python API, you do not and should not think about PDU at all. What you must know is the internal unit. For the materials, the internal unit is inch unless the parameter is explicitly marked otherwise, such as the Custom Scatter Mean Free Path (mm) where the name of it actually has (mm). For everything else, the internal unit is the Poser Native Unit, which is 103.200005 inches.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)