Page 1 of 1

Changeing Textures on Models?

Posted: Tue Mar 06, 2007 12:13 pm
by Devil_Dog
Is there a way to change the texture on a static model?
I want to put a c47 on my map, but I want it to have my clans insignia instead of the Allied insigias it has.
I made some trucks from brushes, but the plane isn't working out the way I'd like, so I figured this might be a better way, if it can be done.
Thanks for any help.

Posted: Tue Mar 06, 2007 2:09 pm
by SniperWolf
Yes you can. I did it with a flag & a calender.

First locate the model info( .lod, .skc & .skd files)

For the c47 they are here:
Pak0.pk3/models/vehicles/c47/c47.lod, c47.skd & c47.skc

Second locate the .tik file

For the c47 they are here:
Pak0.pk3/models/vehicles/c47.tik

Third find the shader.

For the c47 it is here:
Pak0.pk3/scripts/c47.shader

Fourth find the textures

For the c47 it is here:
Pak2.pk3/textures/models/vehicles/c47.tga, c47fly.tga & c47prop.tga

Now rename the .lod, .skd & .skc files to something like: yourclanc47.lod, yourclanc47.skd & yourclanc47.skc

Made a folder in your main folder like this:

models/vehicles/yourclanc47/yourclanc47.lod, yourclanc47.skd & yourclanc47.skc


Now open the c47.tik in notepad & edit it like so then save it as yourclanc47.tik:

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
	path models/vehicles/yourclanc47 <---
	skelmodel yourclanc47.skd <---
	surface yourclanc473 shader yourclanc47 <---
	surface yourclanc472 shader yourclanc47 <---
	surface yourclanc471 shader yourclanc47 <---
}

init
{
	server
	{
      		classname drivablevehicle
     	 	setsize "-60 -40 0" "60 40 120"
     	 	seatoffset "-14 0 24"
    	  	gravity 1.0
    	  	vehiclespeed 800
	}
}

animations
{
	idle     yourclanc47.skc <---
}

/*QUAKED vehicle_allied_airplane-c47 (0.0 0.0 0.0) (-696 -776 0) (344 776 272)
C47 Skytrain
*/
Place the yourclanc47.tik in the main/models/vehicles folder

Then edit the c47.tga to you liking & rename to something like yourclanc47.tga

In your custom textures .pk3 add this folder setup inside your existing textures folder:
models/yourclanc47/yourclanc47.tga, yourclanc47fly.tga & yourclanc47prop.tga

Now copy & paste the c47.shader into your custom textures shader & change it like this:

Code: Select all

// your clan C47
yourclanc47
{
	qer_editorimage textures/models/vehicles/yourclanc47/yourclanc47.tga
	{
		map textures/common/reflection1.tga
		rgbGen lightingSpherical
		tcgen environmentmodel
	}
	{
		map textures/models/vehicles/yourclanc47/yourclanc47.tga
		rgbGen lightingSpherical
		blendfunc GL_ONE_MINUS_SRC_ALPHA GL_SRC_ALPHA
	}
}

static_yourclanc47
{
	qer_editorimage textures/models/vehicles/yourclanc47/yourclanc47.tga
	{
		map textures/common/reflection1.tga
		rgbGen vertex
		tcgen environmentmodel
	}
	{
		map textures/models/vehicles/yourclanc47/yourclanc47.tga
		rgbGen vertex
		blendfunc GL_ONE_MINUS_SRC_ALPHA GL_SRC_ALPHA
	}
}

yourclanc47prop
{
	qer_editorimage textures/models/vehicles/yourclanc47/yourclanc47prop.tga
	cull none
	{
		clampmap textures/models/vehicles/yourclanc47/yourclanc47prop.tga
		tcmod rotate 5000
		blendFunc blend
	}
}

yourclanc47fly
{
	qer_editorimage textures/models/vehicles/yourclanc47/yourclanc47fly.tga
	{
		map textures/models/vehicles/yourclanc47/yourclanc47fly.tga
		rgbGen lightingSpherical
	}
}
Now when your in Radient your custom C47 should be in the same section as the stock C47. Hope this helps

Posted: Tue Mar 06, 2007 2:46 pm
by bdbodger
There is another way but not sure if it is any easier or not , Decals . If you edit the decals urc and the decals shader and add your logo you could probably run the map and the decals menu and add your logo where ever you want . Create the .dcl file and use that with the map . Should work I think .

Posted: Tue Mar 06, 2007 5:31 pm
by jv_map
Hmm I don't think you can really put decals on models nicely... works just on brushes and some of the time on patches/terrain.

Posted: Tue Mar 06, 2007 5:34 pm
by bdbodger
I think one of the sub models uses decals for the logo on the front of the conning tower. It would have to be a static model thats for sure .

Posted: Sat Mar 10, 2007 1:16 pm
by Devil_Dog
Thanks guys. That made my work real easy Sniper, didn't even have to search for the files.
I tried decals on some models before, they work on flat surfaces ok, but on curved surfaces they do not look good.
_________________________________
JV the problem seems to be better now. Must have been a server problem like you said.

Posted: Sun Mar 11, 2007 5:25 am
by Devil_Dog
If I make the files in my main, when I ship the map to other people they will have to have this file also yes?
When I ship the map to others, I would place all these files in the map pk3 like I would the texture files correct?

Posted: Sun Mar 11, 2007 6:37 am
by SniperWolf
Yup