Home Unreal Engine

UE5 - How to render only what's inside a sphere?

polycounter lvl 10
Offline / Send Message
RashedAlmetrami polycounter lvl 10

Hey,


Trying to recreate what Simon Houdini has done in this tutorial in Unreal - Rendering only what's inside a sphere and culling everything outside of it, but kind of at a loss. Does anyone how he has done this? It's exactly what I'd like to implement in a mobile game im working on.



Thanks!

Replies

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter

    It looks like he just made the geometry the right shape to me


    You can use custom stencils to mask what gets rendered - it wont be a 3d effect though, just a 2d mask


    I think he just made the geometry the right shape in this example - unless I'm missing something

  • RashedAlmetrami
    Offline / Send Message
    RashedAlmetrami polycounter lvl 10

    @poopipe Thanks for the reply! I Asked him in the youtube comments and he mentioned he just made the geo in Houdini and using a spherical mask in Unreal to mask it out.

  • another caveman
    Offline / Send Message
    another caveman greentooth

    you could create a material function (have that MF referenced by ALL scene material parents) containing a spheremask and :

    1/ lerp with reflectionvector + a sky cubemap to remain an opaque material

    2/ dynamically (blueprint) switch to an alpha material equivalence and use the spheremask as opacity mask

    3/ use the spheremask along with Pixel depth offset (let you remain Opaque while looking like Alphatest/dithering)

    in game production you'd need the blueprint to cull what's not visible to get rid of the drawcalls

Sign In or Register to comment.