Page 1 of 1
How to get decals to not flicker in GTKradiant?
Posted: Tue Feb 03, 2015 2:06 am
by AEon
I never really bothered about this over the years, since the flicking (z-fighting) of the decals was bearable. But in
AEmod I will massively be using decals and instead of flickering they actually do not show... this seems to be connected to decal and brush with texture it being the same size?!
This is the decal code I am using:
Code: Select all
textures/aemod/aemod_decal_64x32_ramp_diag_64
{
qer_editorimage textures/aemod/aemod_decal_64x32_ramp_diag_64.tga
qer_trans 0.99
surfaceparm nolightmap
surfaceparm nonsolid
surfaceparm nomarks
surfaceparm trans
polygonoffset
{
clampmap textures/aemod/aemod_decal_64x32_ramp_diag_64.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen Vertex
}
}
I already changed the
clampmap to
map since I need to decals to pan out. Compiled all this looks fine, but in GTKradiant 1.6.4 the decals don't show properly. Was there a way to fix this?
Re: How to get decals to not flicking in GTKradiant?
Posted: Tue Feb 03, 2015 6:53 am
by Hipshot
Decals will always flicker inside radiant, radiant don't care about that part of the shader, polyoffset that is, unless I missed something?
Re: How to get decals to not flicking in GTKradiant?
Posted: Tue Feb 03, 2015 9:48 am
by AEon
I built a set of decals that look slightly like faux bevelling... basically a gradient (in transparency) edge for true cubes and ramps etc. And not seeing the decals at all in Radiant in many areas is a real annoyance. In AEblocks, the decals where very sparingly used, so not much of an issue visually, and none disappeared.
So presently I am torn... between the flexibility of decals, that I can plaster on brushes with any interchangeable texture on the brush - or easier previewing by baking the decal onto textures directly and using the composite in GTKradiant. (It may be possible to create a "clever" shader, that shows a composite texture only in Radiant, but for the compile uses the desired texture plus the decal on top. Though since the decal is on a nodraw brush and the texture on a structural brush, I doubt that would work.)
The great thing about the decals I am using is that even though they my way in at 1-2 MB TGA files... they compress down to 3-4KB... whereas baking decals on textures would massively create large texture files plus be very much less flexible. Plus decals let my make use of the 1024² textures... a cube only uses 1/4th of the texture, but Q3A's / Radiant's automatic texture panning automatically lets you use the rest of the latter texture on neighbouring cubes, when you have texture lock turned off.
Apparently, as I learned in AEblocks, flexibility, convenience and optimization do not go hand in hand.
Sigh...
I think I may be finding out how desperately Q3A could use hierarchical instancing. Well... only if you are wacky enough, like myself, to try modular mapping.