Hi daveangel. I like where this ship of your is going a lot, and we've all been cursed by the 'purple texture' thing!
There are several reasons this can happen, so let's go through them. Firstly, the model (.dat file) should have the principle texture listed in the file code. Here as an edited model file for a carrier launchbay I recently made.
Code: Select all
// output from Obj2DatTex.py Wavefront text file conversion script
// (c) 2005 By Giles Williams
//
// original file: "komodo_launchbay_deep.obj"
//
// model size: 80.000 x 40.000 x 75.037
//
// textures used: ['komodo_launchbay.png']
//
NVERTS 24
NFACES 34
VERTEX
-33.67218, 10.00000, -37.51875
-33.67218, -10.00000, -37.51875
33.67218, 10.00000, -37.51875
33.67218, -10.00000, -37.51875
-16.17218, -20.00000, -37.51875
|
/
|
-40.00000, 10.00000, 37.51875
-40.00000, -10.00000, 37.51875
FACES
1,0,0, 0.00000,0.00000,1.00000, 3, 0,1,10
1,0,0, -0.00000,-0.00000,1.00000, 3, 1,7,4
1,0,0, 0.00000,0.00000,1.00000, 3, 2,3,6
1,0,0, -0.00000,-0.00000,1.00000, 3, 3,2,8
1,0,0, -0.00000,-0.00000,1.00000, 3, 4,7,5
|
/
|
3,0,0, 0.00000,1.00000,0.00000, 3, 17,23,1
3,0,0, 0.00000,1.00000,0.00000, 3, 20,19,8
TEXTURES
komodo_launchbay.png 1.0 1.0 0.80639 0.10797 0.80639 0.28330 0.86186 0.10797
komodo_launchbay.png 1.0 1.0 0.80639 0.28330 0.65298 0.02031 0.65298 0.37096
komodo_launchbay.png 1.0 1.0 0.21603 0.10797 0.21603 0.28330 0.36944 0.02031
komodo_launchbay.png 1.0 1.0 0.21603 0.28330 0.21603 0.10797 0.16056 0.28330
komodo_launchbay.png 1.0 1.0 0.65298 0.37096 0.65298 0.02031 0.36944 0.37096
|
/
|
komodo_launchbay.png 1.0 1.0 0.90725 0.38502 0.96273 0.38502 0.90725 0.64801
komodo_launchbay.png 1.0 1.0 0.21486 0.38502 0.27033 0.38502 0.21486 0.64801
END
This model, of course, lives in the Models folder. Now, over in the Textures folder we need the texture itself. This should be a .png image of 512x512px (or multiples eg 1024x1024 for higher definition) and should have exactly the same name as the texture name in the .dat file.
In simple terms that is all you need to get the texture on the ship - the shipdata tells the game which model to use and it will use the texture specified in the model file. You can get much more sophisticated though, by using 'materials' in shipdata to add lightmaps, bumpmaps and so on. Take a look at something like my YellOo Cabs for a nice straighforward example of this.
Other issues to watch are case-sensitivity (which causes no end of headaches!) as this could affect others even when your version appears to be working. Texture1.png is
NOT the same as texture1.PNG.
Also check the latest log as this will be your main source of debugging help overall. If you are not sure what it is telling you, post it here between 'code' tags so we can have a look.
These issues are usually easily resolved, so fingers crossed...