MortenBøhne Posted September 17, 2020 Share Posted September 17, 2020 I'm trying to create a tool that cuts out shadows on a mesh, and transforms the uv's of the shadow-part. The setup only needs to work with one directional light, and only needs to divide into light/dark (no soft shadow or bands) Our artists usually work in maya, but I figured houdini would be perfect for this task, and a good excuse to introduce houdini engine to the studio. My approach so far has been to create a grid and orient it with the light, and use a ray-node to project it to the target-geometry, transfer a color attribute, and then cut based on color value. I've added an attributeblur to give the artist a bit of control over the cut. From here I need to find a way of controlling the grid (orientation based on light, position based on target-geometry, size based on target geometry), to ensure the rays are casts onto the entire target geometry How can i control the grids position and orientation based on nodes outside the subnet (tagert-geometry, light-direction)? I'm also looking to find a way to control the detail of the cuts. Currently I'm limited by the resolution of the target geometry, but i would like a way to allow the artist to control the amount of detail on the cut I'm thinking this could be achieved by subdividing the target geometry, but from there i need to find a way of transferring the subdivided cuts to the original mesh I'm still new to houdini, so any help on how to solve those two steps -or if there is a smarter approach for creating the tool altogether, would be greatly appreciated shadow_cut.hipnc Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted September 17, 2020 Share Posted September 17, 2020 Hi Morten, here is a simplification. The ray node alone can do the shadow calculation in this case. ray_shadow.hipnc Quote Link to comment Share on other sites More sharing options...
MortenBøhne Posted September 18, 2020 Author Share Posted September 18, 2020 Thanks, that sure simplifies it a lot! Any idea how I can transfer the cuts made on the subdivided geometry onto the original geo? Right now i'm generating curves from the cut-edges and using that to polySplit the original geo, but I have a feeling that could be done a lot simpler too Quote Link to comment Share on other sites More sharing options...
MortenBøhne Posted September 22, 2020 Author Share Posted September 22, 2020 I'm trying to keep the original topology for the non-cut primitives by deleting non-original points that are not part of the cuts. Sadly this approach only work at subdivision depth=1, but as soon as I increase the depth, this approach is giving me problems: Not sure if this is a dead-end if i want to control the subdivision depth further but still keep the topology of my original object shadow_cut.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.