Home Unreal Engine

Making a mesh only seeable by post process

polycounter lvl 13
Offline / Send Message
16bit polycounter lvl 13
How would I go about having a mesh only seeable by post process, but not the player?

I have a post process that pixelates a selected mesh based on a custom depthpass, producing a stylized 3d pixel look in a non pixelated world.
Example with exaggerated pixelation offset from model to highlight issue.

I've come up with some solutions but each one has stopped me.

I though I could just apply the post process as a mask to the original models opacity, but I can only call scene textures if the material is post process or translucent, and transparency had it's own issues such as overlapping meshs or hidden meshes showing.

I thought I could just hide the model off screen and offset the post process, but this doesn't work since if the model isn't actually on the screen it doesn't render the effect

So I figure the best way would just have post process to see the mesh, but not the player.

What are my options to hide any parts of the mesh not hidden by the pixelation

Replies

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    you can stencil things -
    https://www.youtube.com/watch?v=PiQ_JLJKi0M

    but i tihnk you're already doing that
    I dont really understand what isn't working - is it that the pixelated version doesn't completely cover the un-pixelated version? 
    if so can you show an example without the offset
  • 16bit
    Options
    Offline / Send Message
    16bit polycounter lvl 13
    Here is an un offseted version. You can see how the pixels line up the character, but since its a blocky approximation, it won't cover everything. You can see how the shader isn't gettin the tip of his nose,  or the side of his ear or finger.  And this is fine, I know there isn't enough geometry at that pixel location on the screen to generate a whole pixel.  But if I could just mask out those sections that are visible on the character it would be perfect.

    I don't use a stencil buffer to determine what needs to be pixelated. I just used a custom depth buffer





  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    Ok.  
    Two possible solutions occur to me. 

    First: use a rendertarget/second camera, one can see the character, one that can't . Then composite the result (not sure if unreal will let you do that)

    Second: expand your mask one 'pixel' outwards using a sobel like filter - same principle as a toon outline
Sign In or Register to comment.