Hello, i’ve been creating a vision cone (to show the field of view of a character) like commandos videogame, but i don’t know how to make this cone to only show on surfaces, because when i’m on a higher level as the floor, it loos horrible, like this:
I’ve done this with line trace and procedural mesh to draw only on traces, so i would need something to work on the procedural mesh or maybe change this technice, this is how it works:
I wan’t it to show it not as an object but as a decal, or a texture replicating on the surfaces beneath them, i don’t even know what technique to use in this, it should work like this:
Can you be more specific? If i search for post process tutorials i only get post process volumes filters. I hace already done the cone with line tracing ang procedural meshes triangles, how could i apply a post process to make the procedural mesh only be seing in the ground?
You would need to make multi-layered procedural meshes to represent the cones on each level, with each new cone generating it’s own collision tests.
I made an old demo with detection for each cone for a cone vision a while back. Guess the same technique could be used just replicate it for each level below the character.
Though you would need to add in a test for each raycast pointing down to find the “jump point” to a lower level to cut off the ray when it starts to hang over the edge.
No tutorial just me messing around with procedural meshes and line traces.
Looking into pushing it to near ground projections. Already getting a crude cut of where the drop is, but I’ll need to refine the code to get multi layers.
Though it does begin to hit frame rate with the extra drop passes. Converting it to c++ could give a lot of gains in the fps space especially with async line traces.
Here is a crude implementation of the drop mechanic first layer
I would like to think up a better way of calculating the drop point, sometimes the step is too large causing hanging geometry.
Maybe I’ll look into a find closest point on mesh to smooth out the edge vertices. It’s just a proof of concept at this point.
mhhhh that’s interesting, but i think it is too complicated and uses too much resources. Could you see this video and try to replicate this on Unreal engine? this guy made this with shader effects and decal textures, but i don’t know much of Unreal engine yet to understand this and replicate it:
i believe the way the actual games do it is a form of shadow mapping. i looked into it but for my game it needs to be 3d and havent found a great option