Killer Wolf wrote:DH,
when you run the OBJTODAT it'll have a line at the top of the DAT file like this :
// original file: "biggerwolf3.obj"
//
// model size: 113.472 x 34.016 x 122.835
//
// textures used: ['metalliwolfskin.png']
the textures will be the texture from your modelling program, i usually rename mine (cos it's usually originally called "testskin" or summat) for the game so here i've overtyped it w/ "metalliwolfskin.png", which is the texture that will be in the OXP folder.
same as per the bottom of the DAT, thre's a wad of stuff mapping textures to verts etc :
TEXTURES
metalliwolfskin.png 1.0 1.0 0.00430 0.73089 0.04901 0.78781 0.13034 0.76914
metalliwolfskin.png 1.0 1.0 0.00430 0.73089 0.13034 0.76914 0.13034 0.73107
metalliwolfskin.png 1.0 1.0 0.20874 0.37598 0.00430 0.60212 0.13034 0.60231
metalliwolfskin.png 1.0 1.0 0.00430 0.60212 0.00430 0.73089 0.13034 0.73107
again, i just search/replace whatever was in there w/ the name of the texture file that's going to be in the OXP.
when you create/export a file in OBJ you get an OBJ file and an MTL file, but it's not relevant to the OXP beyond this point.
The start of my dat file looks like this:
Code: Select all
// output from Obj2DatTex.py Wavefront text file conversion script
// (c) 2005 By Giles Williams
//
// original file: "tycho8_obj.obj"
//
// model size: 4.614 x 3.214 x 9.500
//
// textures used: ['tycho8.png']
//
NVERTS 984
NFACES 1352
I've just realised that my ship may be a realistic in the real world (i.e. a small 8 year old boy could fit in to the cockpit) but in Oolite terms its teeny-weeny - much rescaling needed!
By the way is 1352 a lot for number of faces? (I know it's not a lot in "modern" gaming terms - but is it too many for Oolite? I hear this number 800 in the back of my mind...
The end of my .dat file looks like this:
Code: Select all
TEXTURES
tycho8.png 1.0 1.0 0.12519 0.51155 0.01888 0.51778 0.05076 0.28801
tycho8.png 1.0 1.0 0.12519 0.51155 0.05076 0.28801 0.07139 0.27339
tycho8.png 1.0 1.0 0.12519 0.51155 0.07139 0.27339 0.07077 0.26002
tycho8.png 1.0 1.0 0.12519 0.51155 0.07077 0.26002 0.14518 0.25566
Which then goes along the same lines for another 1300+ lines (same as the no. of faces I guess?)
My .mtl file looks like this:
Code: Select all
newmtl acmat_0
Kd 1 1 1
Ka 0.2 0.2 0.2
Ks 0.2 0.2 0.2
Ns 128
Tr 0
map_Kd tycho8.png
newmtl acmat_1
Kd 1 1 0
Ka 0.2 0.2 0.2
Ks 0.2 0.2 0.2
Ns 128
Tr 0
map_Kd tycho8.png
newmtl acmat_2
Kd 1 0 0
Ka 0.2 0.2 0.2
Ks 0.2 0.2 0.2
Ns 128
Tr 0
map_Kd tycho8.png
newmtl acmat_3
Kd 0.533333 0.533333 0.533333
Ka 0.2 0.2 0.2
Ks 0.2 0.2 0.2
Ns 128
Tr 0
map_Kd tycho8.png
newmtl acmat_4
Kd 0 0 1
Ka 0.2 0.2 0.2
Ks 0.2 0.2 0.2
Ns 128
Tr 0
map_Kd tycho8.png
So, basically I think this model for Oolite is WWWWAAAAYYYYYY too small - rescaling is easy, and has too many polygons - harder to fix.
Can somebody confirm this for me?