#Need help with a rendering method regarding a see through object system

1 messages · Page 1 of 1 (latest)

covert vapor
#

I followed this video: https://www.youtube.com/watch?v=jidloC6gyf8 I really like the idea, but the issue I'm running into it that its blocking out whats behind the target object aswell. I've looked online, asked AI, briefly checked forums, but cant find an obvious solution. I found this post: https://discussions.unity.com/t/boolean-cutout-shader-using-urp-render-features-render-objects-and-multiple-passes/872986 from almost 4 years ago, but don't know how to implement it for myself. see attached images for context on everything, ignore the weird floor texture lol. Hoping someone can take a look and offer some guidance. feel free to ping me and ask any questions

Many games need to make sure the focus is on the player or some other object, and walls are usually a hindrance. You could move the camera past the wall or render things over it.

In this tutorial, we'll just cut a hole in the wall instead. I've seen a wall cutout effect before in a handful of ways, so I'm going to take an alternative approach t...

▶ Play video
lone edge
#

You could pass the object position (or at least, camera relative depth) and use it in the graph to no change the alpha of objects that are further.

covert vapor
round wolf
#

Basically, this is a hard problem to solve with just the stencil logic alone. You need that raycast information to prevent this issue.

#

Oh wait, I'm thinking about his other video. He uses an alpha clipping mask in this one, but similar issue here where he uses a wall layer to specify what is actually being clipped. Problem is if both walls have the same layer and shader then it'll clip both.

#

But Remy's idea is pretty good too assume no two walls are close together

#

My bandaid idea here would be just chunk the walls great enough that you can swap shaders on sections on the fly.

covert vapor
#

Not a bad idea, considering the the camera is usually going to be on one side most of the time, toggling the shader depending on camera rotation/position wouldnt be hard