Jump to content
spooky

Ignore NoDraw faces in Lightmapping

Recommended Posts

Removing unused faces of ProBuilder objects is convenient and efficient, but in my experience it frequently results in a lot of other issues (shadowing issues, unreliable thin colliders, etc.) so I've gone back to the standard Quake practice of setting unused faces to the NoDraw material, which as expected, removes the faces from the geometry entirely at runtime, while also allowing them to cast shadows in baked lighting and generally resolving my other issues with removing faces. The only problem is that using NoDraw faces in combination with baked lighting the NoDraw faces still receive lightmapping and occupy a huge amount of the lightmaps.

Realistically this is likely a problem with Unity itself (for one, it should know better than to lightmap materials with unlit shaders!), but I was thinking it might be possible to solve the issue by forcing NoDraw faces to be scaled to 0 in the UV2 generation process so that they don't occupy any lightmap area.

As a side note it would also be nice if there was a way to toggle the visibility of NoDraw faces in the editor as well, since that's one advantage of manually removing the unused faces: there are fewer view obstructions while editing.

Share this post


Link to post
Share on other sites

Hi Spooky!

Actually- NoDraw should definitely NOT be lightmapping, uho...I'll check on that ASAP, thanks for the heads-up.

About toggling the NoDraw faces on and off, hmm, we used to have that, but removed most references to NoDraw a while back, since it seemed removing faces was a better option. There have been a few remarks on this, maybe we can bring it back. We might have to rename it so we don't get sued though, or at least make a NoDraw texture that isn't an exact copy of Hammer's texture :D

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×