Tue, Dec 31, 5:11 PM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Display units vs worldvertex


colorcurvature ( ) posted Wed, 28 September 2011 at 12:18 PM · edited Mon, 05 August 2024 at 12:39 AM

I just wonder, does worldvertex use native coordinates or does it depend on what the display units are? Many thanks


bagginsbill ( ) posted Wed, 28 September 2011 at 12:38 PM

You get native units I think. Display units only affect display widgets.

Is this prompted by my comments at RDNA about copying shaders and being aware of PDU for bump strength?

In the API for materials, you get inches no matter what. Inches are the native unit for materials, because Poser bought the whole system from elsewhere and that's what the original authors used.

Everywhere else, things are in PNU.


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)


bagginsbill ( ) posted Wed, 28 September 2011 at 12:43 PM

file_473336.png

An example, using a parameter.


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)


colorcurvature ( ) posted Thu, 29 September 2011 at 1:32 AM

Thank you bill. I must admit I do not yet understand the impact of the different display units. When Poser exports, it does not make any difference on the exported geometry? So its mainly for materials where "an absolute thickness" matters, like for the SSS, and its more human-friendly to support different units?


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)


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.