Swapping model textures

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
diego
Captain
Posts: 245
Joined: Sun Dec 21, 2003 10:47 pm

Swapping model textures

Post by diego »

This is a different issue I've come across while working on my shadow problem.

I decided to make a new tiki file for my oak tree so I can give the leaves an autumn texture. Everything works fine in radient, but in the game my sprite texture for the tree does not work. I've even tried pointing the shader to the original mohaa texture but it doesn't work either.

Here is what I get ingame:
http://webpages.charter.net/dt3d/screen ... eecrap.jpg

The Tiki File:

Code: Select all

TIKI
setup
{
	//scale 0.52			// Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
	scale 1
	path models/static/natural
	skelmodel tree_oak.skd
	surface tree4_1 shader praetoria_oak_01
	surface tree4_2 shader praetoria_oak_02
	surface tree4_3 shader praetoria_oak_03
	surface tree4_4 shader praetoria_oak_04
	surface tree4sprite shader praetoria_oak_07
	surface tree4_6 shader praetoria_oak_05
	surface tree4_7 shader praetoria_oak_06

}

animations
{
	idle     tree_oak.skc
}

/*QUAKED static_praetoria_autumn-oak (0.5 0.0 0.5) (-24 -24 -16) (24 24 632)
*/
The sprite shader:

Code: Select all

praetoria_oak_07 // Sprite version
{
	qer_editorimage textures/praetoria/models/tree4sprite.tga
	qer_trans 0
	nomipmaps
	deformVertexes autoSprite2
	cull none
	{
		clampmap textures/praetoria/models/tree4sprite.tga
		depthWrite
		alphaFunc GE128
		alphaGen oneMinusTikiDistFade 900 900
		rgbgen lightingSpherical
	}
}
Any help spotting my error would be appreciated. Thanks.
Diego
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

what about the 6 other shaders, praetoria_oak_01 - _06?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

copy

Post by tltrude »

Unless you moved a copy of the old tga to the new folder, it will not show up.

clampmap textures/praetoria/models/tree4sprite.tga
Tom Trude,

Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

alphaGen oneMinusTikiDistFade :?

This for spearhead?
Image
User avatar
diego
Captain
Posts: 245
Joined: Sun Dec 21, 2003 10:47 pm

Post by diego »

The other 6 shaders are working properly so I didn't post them. And this seventh shader works in Radient, but not ingame.

That texture IS in my folder. That one is actually the original .tga image. I was trying it out since my modified texture was not working. But this one doesn't work either. I also tried changing that sprite shader to access the original Mohaa textures in the textures/models/natural/ directory, just like the original shader. But for some reason, that broke the original tree as well.

I don't know if that is a spearhead only thing. I have all the Mohaa textures and shaders extracted into a library for easy access. Maybe I replaced an AA version with a Spearhead version of the trees shader.
Diego
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

then its probably Jv's point, cause the original shader is

Code: Select all

tree4sprite // Sprite version
{
	qer_editorimage textures/models/natural/tree4sprite.tga
	qer_trans 0
	nomipmaps
	deformVertexes autoSprite2
	cull none
	{
		clampmap textures/models/natural/tree4sprite.tga
		depthWrite
		alphaFunc GE128
		alphaGen oneMinusDistFade 900 900
		rgbGen lightingGrid
	}
}
So, no tiki in the alphaGen line :wink:
User avatar
diego
Captain
Posts: 245
Joined: Sun Dec 21, 2003 10:47 pm

Post by diego »

Actually, that's not the shader. For some reason, there are 2 versions of each shader. The one being used is called something like static_tree4sprite.

But JV is correct. The Mohaa shader code is the un-remarked code.

Code: Select all



//		alphaGen oneMinusTikiDistFade 900 900
//		rgbgen lightingSpherical
		alphaGen oneMinusDistFade 900 900
		rgbGen vertex
Thanks for the help. It's working now. I had no idea shaders had changed from AA to spearhead.
Diego
Post Reply