Tue, Oct 1, 5:30 PM CDT

Renderosity Forums / Poser Technical



Welcome to the Poser Technical Forum

Forum Moderators: Staff

Poser Technical F.A.Q (Last Updated: 2024 Sep 17 7:30 pm)

Welcome to the Poser Technical Forum.

Where computer nerds can Pull out their slide rules and not get laughed at. Pocket protectors are not required. ;-)

This is the place you come to ask questions and share new ideas about using the internal file structure of Poser to push the program past it's normal limits.

New users are encouraged to read the FAQ sections here and on the Poser forum before asking questions.



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



Subject: Material room: polar texture coordinates without Cycles nodes?


odf ( ) posted Sun, 07 July 2024 at 7:45 PM · edited Tue, 01 October 2024 at 2:34 PM

So, I finally made a procedural star pattern adjacent to the big American holiday. It works nicely but relies on converting uv coordinates from cartesian to polar, manipulating the angle, and then converting back, similarly to how one would make a paper star by folding the paper, making a single cut and then unfolding. For the conversion to polar coordinates, I used the arctan2 function provided by the Cycles math node because I did not find an arctan function in the "regular" math node. This means, among other things, that the stars don't show up in the preview. So, my question is whether there's an arctan (or arcsin, arccos etc.) function hidden somewhere in the jungle of pre-Cycles material nodes, or some other straightforward* way to convert cartesian into polar.


* As in, more straightforward than using something like the Taylor expansion of the arctan.

-- I'm not mad at you, just Westphalian.


bagginsbill ( ) posted Mon, 08 July 2024 at 2:08 PM

(... coming out of lurk mode ...)

No. In fact I found a thread from 2006 where anxcon wrote "wish they wouldve added arctan though :("

I'm almost positive I posted some very efficient matmatic scripts (using series expansions with some personal tweaks) for arcsin and arctan but they were lost with the closure of RDNA.

(... returns to lurk mode ...)


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)


odf ( ) posted Mon, 08 July 2024 at 7:19 PM

Thanks, Mr. Baggins! Well, if you ever happen to come across forgotten backups of those scripts, let us know! :-)

-- I'm not mad at you, just Westphalian.


3dcheapskate ( ) posted Sun, 14 July 2024 at 8:55 AM · edited Sun, 14 July 2024 at 8:58 AM

I did an arctan approximation in the material room 7 years ago - it's available as a PP2014 compound node over at ShareCG -  PP2014 MT5 Atan_Approx1_FIX1

Here's a screenshot of it in use  (the 'Image_Map' node and the unconnected 'Image_Map_2' node both use the same image).

0dKsrwYMDZvnCQvvyvqY2QPU6GuMMIF6lbxcMe0A.jfif

Peril-sensitive sunglasses advised if you wish to look inside the compound node... ;o)


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).



odf ( ) posted Sun, 14 July 2024 at 5:32 PM

Cool! I'll have a look.

-- I'm not mad at you, just Westphalian.


odf ( ) posted Sun, 14 July 2024 at 7:06 PM

Well, it does definitely work for my little stars, but I don't feel particularly inclined to "read" that compound node. :-)

-- I'm not mad at you, just Westphalian.


3dcheapskate ( ) posted Sun, 14 July 2024 at 8:57 PM

That's the beauty of compound nodes - they hide all the spaghetti! 😁


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).



odf ( ) posted Mon, 15 July 2024 at 2:14 AM · edited Mon, 15 July 2024 at 2:14 AM

So, I took that as a challenge and tried my hand at an atan2 approximation myself:

g5jVFLLCzcUEa39JsniLI7noQpKDSvlxrgEwwUzW.png

The rightmost row in the bottom part produces min(abs(x) / abs(y), abs(y) / abs(x)) so that we get an argument between 0 and 1. The center row then computes the approximation 1.5707 * t / (0.62 + sqrt(0.9035 + t^2)) for arctan(t) which I found on Stack Exchange and tweaked a little bit in Desmos. Finally, the row on the left plus the node labelled atan2 above it do all the necessary "unfolding" to get from 8 copies of the angle range 0 through pi / 4 to the full function.

-- I'm not mad at you, just Westphalian.


3dcheapskate ( ) posted Mon, 15 July 2024 at 10:55 AM

A quick spreadsheet check indicates a max error of around 0.001° for your approximation, compared to 0.1° for the one I used. Nice one ! :o)



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).



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.