Download

Special "nodraw" material to prevent triangles to be rendered - possible ?

While there are a lot of talks about BSP tools and better CSG workflow, no one seem to remember that all older engines that use BSP/CSG have special “nodraw” material which tells map compiler or renderer to discard or not to render triangles with “nodraw” material. This effectively discards all the back faces in any geometry reducing rendering overhead.

Here is a mock-up showing such approach:

ed38397c237f1142dc86273226b4a95903e15582.png
Full: http://s32.postimg.org/3rbnq4x5v/ue4_special_nodraw_material.png

Does UE4 have something like that? (perhaps default material with some option checked to tell renderer not to render those triangles)

P.S. Note that it’s not an “invisible” material, where triangles you processed, but you don’t see them in the scene (invisible material would still have triangles in wireframe mode, while “nodraw” material wouldn’t have any)

Meep meep. I am guessing it doesn’t exist :confused:

you can make a masked material with 0 opacity, it will effectively do what you’re wanting to do

It’s more expensive to render masked material than the way I am talking about. In the old engine I worked with, it was literally a few lines of code where renderer would skip triangles with “nodraw” material. There was no overhead.

with the method I propose the triangle geometry will be processed yes, but then no depth and no pixel shader will be processed for it. with nowadays GPUs that’s quite significant, and triangles not so much anymore
besides that, I don’t think you’ll find an option in UE4 that skips the triangle itself

Since I am going for mobile VR, processing triangles that aren’t visible to camera would create significant overhead :frowning:

If UE4 doesn’t have such option, yeah, I am out of luck and probably have to remove those manually in 3D app before exporting meshes to FBX