Home Technical Talk

[Maya][Viewport2.0/Realtime Shaders] Make one object always draw behind everything else in viewport?

asdfg9
null
Offline / Send Message
asdfg9 null
hi,
i thought this might be a good forum to ask my random question here as you seem to be  like border between 3D apps, custom shaders and game engines,

is there a way in maya viewport 2.0 (with maya materials or shaderFX or any of the other realtime shader) to make one object (poly geo) always draw behind everything else, no matter how close it is to the viewport camera or how many objects its actually obscuring behind itself or partially intersecting polygons with?

Only requirement is that this needs to work realtime during regular viewport work (there wont be any rendering). it would be a fairly simple object, probably wouldnt even need a texture, just basic simple shading, but all the other normally shaded objects in the scene need to be workable during this effect with at least some basic customizable shading and texturing (like in case this trick requires everything to be a part of the same shader to make it work).

i didnt manage to find nodes or ways that would let me do some sort of a material render order like one probably does in a game engine, so any hint at how this could be approached or what i missed would be great. thanks for any tips!

some tags: render priority render order sort order, material render order, render layer, material render queue, cutout, zdepth, scene depth, id 

Replies

  • shaderfx
    Offline / Send Message
    shaderfx polycounter lvl 9
    The StingrayPBS (shaderfx) material has a material node called 'Unlit'.
    It has the option to project the object to the background.

    It is more meant for background domes, so not sure it will work for you.

    In the end what it does is adjust the vertex position of the mesh to make it near the edge of the frustum.

    -Kees
Sign In or Register to comment.