Hi,
I know it's been asked in other softwares' subforums but I haven't seen anything in Houdini's and I'm stuck right now.
Would it be possible to control the sun direction simply by manipulating a classic sun or distant light in the viewport? This is how it works in Unreal for instance. It would make things a lot easier in some situations. Especially in mine right now.
I'm working on a short film where interactions between characters and sun light is really important and it's done at the animation stage in Maya so I'm provided with a locator giving the sun direction.
I know you can input a vector3 as sun direction in the render target instead of geo location but I can't figure out how it works.
Many thanks in advance!
Control sun with light in viewport
Moderator: juanjgon
- Barry Convex
- Posts: 15
- Joined: Tue Feb 23, 2010 7:29 pm
Win7 64 - Linux Mint 16 | Gigabyte Gtx760 4gb | Intel i7 3930k | 24gb Ram
- Barry Convex
- Posts: 15
- Joined: Tue Feb 23, 2010 7:29 pm
Hello again,
For anyone interested in some sort of solution, here is mine :
- At object level, create an environment light node. I had never used it so I don't know why I can't move the gizmo. Using qLib's instead did the work. (https://github.com/qLab/qLib)
- Unlock your render target node and replace the sundir with a float node.
- You'll notice that the environment node you just created has two parameters under the "Sky Environment Map" tab that output some data. Simply reference "Calculated Vector" into the float node inside your render target. Don't forget to set the direction to "Towards Sun" in the environment.
- If you want a preview in the viewport. Create a null. Reference "Calculate Rotate" in its rotations and then parent a houdini point light to it. Set its attenuation to none and pull it far away. You should now have opengl shadows.
Voila! A bit hacky, I'm sure there is a more efficient way to do it but I suck at maths.
For anyone interested in some sort of solution, here is mine :
- At object level, create an environment light node. I had never used it so I don't know why I can't move the gizmo. Using qLib's instead did the work. (https://github.com/qLab/qLib)
- Unlock your render target node and replace the sundir with a float node.
- You'll notice that the environment node you just created has two parameters under the "Sky Environment Map" tab that output some data. Simply reference "Calculated Vector" into the float node inside your render target. Don't forget to set the direction to "Towards Sun" in the environment.
- If you want a preview in the viewport. Create a null. Reference "Calculate Rotate" in its rotations and then parent a houdini point light to it. Set its attenuation to none and pull it far away. You should now have opengl shadows.
Voila! A bit hacky, I'm sure there is a more efficient way to do it but I suck at maths.
Win7 64 - Linux Mint 16 | Gigabyte Gtx760 4gb | Intel i7 3930k | 24gb Ram