May 28th, 2021 - Snutt & Ben Talk: Holograms now use Stencils

May 28th, 2021

Snutt & Ben Talk: Holograms now use Stencils

https://www.youtube.com/watch?v=dyqOMITwLsY&t=1164

Suggested Wiki Refrence Code

Topics

    Transcription

    1. Ben

      uh which also allow loading and culling and all the optimizations normal instances cannot do so that's like the best ideal case for instancing we use it on absolutely everything yeah all the walls are done that way everything except for this little bastard so yes cool so the holograms now use stencils instead of the mesh itself

      So if we would show a stencil.

    2. Snutt

      And what is a stencil?

    3. Ben

      This is a stencil.

      So we are allowed to write an ID a bit to a separate buffer, and we can read that buffer in post-processing.

      And based on that buffer, we can apply certain effects.

      So if I would change to two, three, four, five, here we go.

      We have different IDs.

      And if we go back into the game view, there we go.

      And then we can apply an outline to it with that effect.

    4. Snutt

      Magic.

    5. Ben

      Or the dismantle effect.

      So now you can dismantle this rock.

      Totally not a lie, but this is how we can apply the hologram to this rock, for example.

    6. Snutt

      So essentially what you're doing when you're doing the hologram effect now instead is you're kind of drawing on top of the screen sort of effect rather than it being like how everything else is rendered in the game where it's all like workspace and it's... Yeah.

    7. Ben

      So technically it's like putting on shades for this specific object.

    8. Snutt

      Right.

      And I guess the limitation of doing it that way means that you can't have transparency on that object anymore because the frame is already drawn and you're drawing on top of the frame, so it's impossible for you to know what's behind something that's already been rendered.

    9. Ben

      That's the problem with it, but the trade-off was so great because accidentally it also improved saving times, which was not the intention, but still a good win.

      I understand why after the fact, but I didn't think about it when we were doing it, let's say that way.

    10. Snutt

      You know, we'll take it.

      You know what?

      We'll take it, okay?

      We'll take any benefit that we can get from anything.

    11. Ben

      Fair enough.