How to get decals to not flicker in GTKradiant?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

How to get decals to not flicker in GTKradiant?

Post 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?
User avatar
Hipshot
Posts: 1547
Joined: Sun Jan 20, 2002 8:00 am

Re: How to get decals to not flicking in GTKradiant?

Post 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?
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: How to get decals to not flicking in GTKradiant?

Post 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.
Post Reply