how couple environment texture rotation to sun direction?

Forums: how couple environment texture rotation to sun direction?
Newtek Lightwave 3D (exporter developed by holocube, Integrated Plugin developed by juanjgon)

Moderator: juanjgon

how couple environment texture rotation to sun direction?

Postby 3dworks » Sun Sep 04, 2016 12:52 pm

3dworks Sun Sep 04, 2016 12:52 pm
i try to match the rotation of the reflected environment texture to my 'sun by direction' rotation. what kind of node/math setup should i use when doing so? in order to get the direction of the sun i can use the 'forward' directional vector from the item info node, but then, how convert this to degrees of rotation? i also need to be able to enter a manual offset of rotation in degrees, as each environment texture has different fixed sun positions. see a screenshot here Image

thanks for your input

markus
Specs: Apple MacBook Pro M1 max 64GB 2TB, MacOS 12.5 / MacPro 5,1 with NVIDIA GeForce GTX 1080 8G, MacOS 10.13.6 / Mac Pro 5,1 with AMD RX5700 8G, MacOS 12.3.1 / HP Z600 with NVIDIA 3060 RTX 12G, Windows 10 pro + Netstor GPU box, 4 x NVIDIA GTX 980ti 6G.
User avatar
3dworks
Licensed Customer
Licensed Customer
 
Posts: 294
Joined: Fri May 21, 2010 5:08 pm
Location: Berlin

Re: how couple environment texture rotation to sun direction?

Postby juanjgon » Tue Sep 06, 2016 11:09 am

juanjgon Tue Sep 06, 2016 11:09 am
This setup should work. The vector to scalar node is in "X Channel" mode to get the heading, and the multiply node is inverting the angle, so set the B parameter to -1.0.

Thanks,
-Juanjo
Attachments
image001781.jpg
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: how couple environment texture rotation to sun direction?

Postby 3dworks » Wed Sep 07, 2016 3:56 pm

3dworks Wed Sep 07, 2016 3:56 pm
thanks juanjo, i guess it is solution for direct light orientation. unfortunately, i have a setup with a keyframed targeted light, so basically i have to find out first how to calculate the directional vector for a light - target null, then feed your nodes with that...

anyone can help me with that part? in other words, a nodal setup to calculate right up and forward from a object with is rotated because of poniting at a target.

cheers

markus
Specs: Apple MacBook Pro M1 max 64GB 2TB, MacOS 12.5 / MacPro 5,1 with NVIDIA GeForce GTX 1080 8G, MacOS 10.13.6 / Mac Pro 5,1 with AMD RX5700 8G, MacOS 12.3.1 / HP Z600 with NVIDIA 3060 RTX 12G, Windows 10 pro + Netstor GPU box, 4 x NVIDIA GTX 980ti 6G.
User avatar
3dworks
Licensed Customer
Licensed Customer
 
Posts: 294
Joined: Fri May 21, 2010 5:08 pm
Location: Berlin

Re: how couple environment texture rotation to sun direction?

Postby VIZUALIZACE-CZ » Thu Jul 26, 2018 9:43 am

VIZUALIZACE-CZ Thu Jul 26, 2018 9:43 am
Hi juanjgon
how should the Node Editor look like when I use Light info and Direction instead of Item info?

I'm trying to find a way to rotate the HDR Enviroment Texture map (Heading Rotation) with Direct Light in the scene (I'm using the keyframe option)
VIZUALIZACE-CZ
Licensed Customer
Licensed Customer
 
Posts: 18
Joined: Sat Dec 06, 2014 8:35 pm
Location: Czech Republic

Return to Lightwave 3D


Who is online

Users browsing this forum: No registered users and 11 guests

Tue Apr 16, 2024 2:13 pm [ UTC ]