Jump to content
ejr32123

tricking visibility without multiple render passes

Recommended Posts

Posted (edited)

Hello!

I am stuck trying to solve a problem. I have these aperture like petals that I want to disappear in a physically impossible way [see gif].

https://gfycat.com/skinnysneakyjaeger

You can see in the photo I accomplished this using boolean. However, I cannot keep using boolean because it is affecting my material. I have a rest position on the "petals" geometry to keep the texture in place, but when the "petals" geometry starts getting deleted by the boolean sop, it starts making the material freak out slightly. My second idea was to use the same geometry I used for the boolean [third photo] but instead make it a have a matte material instead of boolean. This works, but it starts cutting out other geometry in the scene. Is there a way to make it so the object with a matte material only affects some of my geometry? Is there a better way to solve this problem? I want to avoid rendering out the petals geometry in separate passes. I also need to trick the visibility for some gears too, so I don't want 50 render passes.

Thanks

petal_show.PNG

petal_hide.PNG

boolean.PNG

Edited by ejr32123

Share this post


Link to post
Share on other sites

here's a proof of concept...admittedly, my setup is ideal...it is centered while yours is off centre....but maybe you can wrangle your way around and make it work...in simple terms...it's just a 'clamp'. Use the explode to observe the effect.

 

camshutter.jpg

vu_camshutter.hiplc

Share this post


Link to post
Share on other sites

you can just use opacity in the shader to mask out the parts that are outside of your circle, using object or world space P for example or just a projected circle

Share this post


Link to post
Share on other sites
Posted (edited)

thanks for the answers. what anim said about opacity in the shader sounds good but I'll have to figure out how to do that. Not sure if the first method would work. Seems like it would make the texture stretch.

Edited by ejr32123

Share this post


Link to post
Share on other sites
Posted (edited)

@anim could you possibly post an example (or a more detailed explanation)? I have been messing around but I can't get anything working : (

what you are saying definitely makes sense I just can't figure out how to do it.

 

Edited by ejr32123

Share this post


Link to post
Share on other sites

here is an example with multiple holes of different position, rotation scale

all petals are packed and reused among holes so it should be efficient even with thousands of them, the masking is happening only in the shader with the help of some attributes from SOPs to get the correct circular projection

mask_by_opacity.thumb.gif.7c51e6204f455aa86cc294deb8963111.gif

ts_mask_by_opacity_.hip

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×