Jump to content

Cut geometry based on light


MortenBøhne

Recommended Posts

pighead.JPG.918b3da122e76d350c9b70fb1cada4f5.JPGI'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)?

subnet.thumb.JPG.9f773234452098e1c4ef059362b3f620.JPG

 

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

cut_detail.thumb.JPG.6431d4497bd275ae40678a1ee1656ce8.JPG
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 :)

 

viewport.JPG

shadow_cut.hipnc

Link to comment
Share on other sites

Thanks, that sure simplifies it a lot!

transfer_cuts.thumb.JPG.f38b93e9cd022422ccd53bdd4745c8e7.JPG

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

Link to comment
Share on other sites

subdivision_depth=1I'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

 

 

 

original_points

shadow_cut.hipnc

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...