Interesting. I wonder though why not use a linetrace from the camera to the wall. Or a line trace from the camera to the player character. If the line trace is intersected by the wall then do the fade? wouldnt that be an easier solution than having to hand place collisions? also collisions have a higher cost than the line trace I believe. You could add a tag to the mesh "canfade" or something so that you can control it in finer detail. The masking is a solid tip though, thanks!
@@stereocodes it could work with a line trace. However it has a few issues, first cost, line trace would need to fire on tick or something regular to check it if their was something in the way. This would be a constant cost. The second option I show in the video is my favourite everything is done on the material level so no need for extrajust a little cost on the GPU.
@@nixies78 maybe you would use tick but I would use an interval because I could turn it off and it would be polling at a far lesser value than every frame. on top that it wouldnt require hundreds of hit boxes in the scene if it were an open world. the line trace scales better than the hitbox solution. You would still use your technique with the material mask but it would require almost no setup with additional actors.
@@stereocodes I'm getting lost now. The first example is just a material. No hit boxes or anything. It just works on distance from camera. But yer, line trace would work well.
that is so sick! keep up with the good content
Interesting. I wonder though why not use a linetrace from the camera to the wall. Or a line trace from the camera to the player character. If the line trace is intersected by the wall then do the fade? wouldnt that be an easier solution than having to hand place collisions? also collisions have a higher cost than the line trace I believe. You could add a tag to the mesh "canfade" or something so that you can control it in finer detail. The masking is a solid tip though, thanks!
@@stereocodes it could work with a line trace. However it has a few issues, first cost, line trace would need to fire on tick or something regular to check it if their was something in the way. This would be a constant cost. The second option I show in the video is my favourite everything is done on the material level so no need for extrajust a little cost on the GPU.
@@nixies78 maybe you would use tick but I would use an interval because I could turn it off and it would be polling at a far lesser value than every frame. on top that it wouldnt require hundreds of hit boxes in the scene if it were an open world. the line trace scales better than the hitbox solution. You would still use your technique with the material mask but it would require almost no setup with additional actors.
@@stereocodes I'm getting lost now. The first example is just a material. No hit boxes or anything. It just works on distance from camera. But yer, line trace would work well.