Item Rotation to control Sun Direction

Newtek Lightwave 3D (exporter developed by holocube, Integrated Plugin developed by juanjgon)

Moderator: juanjgon

Post Reply
toyboxanimation
Licensed Customer
Posts: 3
Joined: Wed Nov 26, 2014 3:50 am

Hi,
I am trying get an object I animate in layout to control the Sun position in the Environment Daylight in the RenderTarget. Everything I've tried seems to give unexpected results. I've tried the getting the "item info" of the controlling item, converting this from radians to degrees, making it a vector and then plugging this into the Sun direction input in the node but it always seems to be off. I've also tried just using "World Forward" with the same results. Is there something I am missing? Thanks in advance
andrew
User avatar
juanjgon
Octane Plugin Developer
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

In theory you should be able to control the sun direction using any Layout light item linking the Light info "Direction" output to the Environment node "Sun direction" input, as you can see in the attached image. You only need to set the Sun control parameter to Direction in the Octane node, and check that the North Offset is set to 0.0

-Juanjo
Attachments
image000505.jpg
toyboxanimation
Licensed Customer
Posts: 3
Joined: Wed Nov 26, 2014 3:50 am

Hi Juanjo,
Thanks for the reply. This seems to work but there is one issue/bug. I have found that this method evaluates the position of the light and not the rotation - even though the rotation is plugged into the node. So in order to animate an object in layout to control the sun direction, you can zero out all the rotations and just animate world position to get desired effect. I hope this helps someone else out there. Thanks for all the wonderful work on the lightwave plgin btw
andrew
User avatar
juanjgon
Octane Plugin Developer
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

But perhaps this is because your light has a target item, right? ... of course if your light has a target, when you move the light it points to the target computing a new direction, and the rotation parameters of the light are not used.

-Juanjo
toyboxanimation
Licensed Customer
Posts: 3
Joined: Wed Nov 26, 2014 3:50 am

no, there is no targeting on the light in lightwave. It appears the value of the rotation of the light is returned as some sort of internal targeting based on the position and the origin?! I am only guessing but a gotchathat had me confused for a while.
Post Reply

Return to “Lightwave 3D”