What happened to OC? - CLOSED Carnage?!
Sign in to follow this  
Followers 0
Chronocide

Sky tag light direction calculator (MaxScript, pre- lightmap rendering)

Calculates yaw and pitch using markers, and lists marker names and directions in the listener window.
Paste the script into a new maxscript window, and press Ctr-e to execute it

fn calcLightDir o = (
in coordsys world p= o.pos
pitch= atan2 p.z (sqrt (p.x*p.x + p.y*p.y + p.z*p.z))
yaw= atan2 p.y p.x
format "%: y=% p=%\n" o.name yaw pitch to:listener
)
(
clearlistener()
for o in $'#'* where not (o.isHidden or o.isFrozen) do calcLightDir o
)

example output: (sky\space\space.sky)

Quote

#galaxy: y=-31.3977 p=23.5513#moon: y=-136.214 p=19.171
#planet: y=69.1061 p=-10.0734
#sun: y=98.216 p=-26.8489
OK
OK

F11 opens the listener window, from which you can then copy and paste the numbers into your sky tag.

swamp, Floofies and Takka like this

Share this post


Link to post
Share on other sites

Tiddy-bits:

Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.