Page 1 of 1

clampmap woe

Posted: Sun Nov 05, 2006 11:26 pm
by a13n
Hi, people.
Clampmap woe!
As my previous thread "-skyfix woe" indicates, there are a few gfx glitches appearing in new drivers.(I know this is lame.)
This time the problem occurred around clampmap.
If I check the "open gl compatible clampmap behaviour" or something like that in a driver setting dialog, some of the previously working clampmapped textures go insane as well as black seams of skybox.
These textures are mapped to non-square meshes, which seems to be the main reason to this corruption.
I'll post the screenshots later.

So my question is
"Clampmap should only to be used against square meshes?"
Or is there any workaround for this annoyance?

Posted: Mon Nov 06, 2006 10:36 am
by a13n
*Solved*

Error pic (DM17XP 2004 April)
Image

Correct pic (DM17XP_SP1 Alpha)
Image

Error script

Code: Select all

models/qes/telclock/rot
{
	cull none
	{
		clampmap models/qes/telclock/rot.tga
		tcMod rotate -666
		tcMod stretch triangle 0.8 0.2 0 4
		rgbGen identitylighting
	}
	{
		clampmap models/qes/telclock/rot2.tga
		tcMod rotate -111
		tcMod stretch triangle 0.9 0.1 0 2
		rgbGen identitylighting
		alphaFunc GE128
	}
}
Correct script

Code: Select all

models/qes/telclock/rot
{
	cull none
	nopicmip
	nomipmaps
	{
		map models/qes/telclock/rot_base.tga
		rgbGen identityLighting
	}
	{
		clampmap models/qes/telclock/rot1.tga
		tcMod rotate 924
		tcMod stretch triangle 0.8 0.2 0 4
		rgbGen identitylighting
		alphaFunc GE128
		blendFunc filter
	}
	{
		clampmap models/qes/telclock/rot2.tga
		tcMod rotate 77
		tcMod stretch triangle 0.9 0.1 0 2
		rgbGen identitylighting
		alphaFunc GE128
		blendFunc filter
	}
}
conclusion:
By splitting the first stage into two and not clampmapping at 1st stage, it werked.

BTW hipshots' skybox technique messed up the skybox with cel-shading, but could be repaired with its own _celshader key with appropriate value against skybox model. :icon31:
On the other hand _minlight and _color do not work against each model.
Strange...maybe a bug? :confused: