Forum: Poser Python Scripting


Subject: WorldToScreen() - unclear about what it returns.

3dcheapskate opened this issue on Dec 23, 2023 ยท 10 posts


3dcheapskate posted Tue, 02 January 2024 at 12:18 AM

FVerbaas posted at 12:03 PM Mon, 1 January 2024 - #4479844

Why is it not a representation of camera space?

It's certainly a representation of camera space, but please note that the original question was this:

So is it

(a) just a transformation from world space to camera space, returning a true set of 3D coordinates.

(b) a calculation of the 2-dimensional x,y screen position plus the "Z-depth" 


And my comment after testing with my laughable script was "So it's definitely not camera space in the way I was thinking of camera space." since the x, y, z returned by WorldToSpace() is obviously (b), not (a) -which is what I'd expect goven the method's name.


WorldToSpace() doesn't return what I referred to, rather imprecisely, as "a true set of 3D coordinates" because it doesn't identify a single point in 3D space . You need 3 additional parameters for that - field of view, render height, and render width.






The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).