Page 1 of 1

Buggy Textures?

Posted: Fri Jun 20, 2014 11:53 pm
by daveangel
Well, i've got my ship OXP working with its rotating nacelles (thanks all)

And have spent most of the day texturing the engine, however it doesn't display correctly. Cant see any relevant errors in the java script console, and i have also tried removing all other OXPs, but to no avail.

Can anybody help please?

Image
Image

Heres the OXP
http://www.filedropper.com/dawnshipoxp_1

Re: Buggy Textures?

Posted: Sat Jun 21, 2014 12:22 am
by Norby
My ideas:
-Make a Textures folder next to Models and Config and put your .png files into.
-In the .dat files all of your textures should be named to .png (so EngineFront.png and not EngineFront).
-In shipdata.plist the first png filename after shaders should be one of the textures defined in your .dat file.
-A [EliteWiki] materials section is useful also.

Re: Buggy Textures?

Posted: Sat Jun 21, 2014 12:34 am
by daveangel
Brilliant, thanks Norby I'll try that in the morning.

Bet regards,

Dave

Re: Buggy Textures?

Posted: Sat Jun 21, 2014 7:34 am
by Smivs
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...

Re: Buggy Textures?

Posted: Sat Jun 21, 2014 10:14 am
by daveangel
Norby/Smivs

Thanks, your help did the job. I'm properly underway with the textures now, will try to get my head around the colour codes so there is some variance out there with these ships.

Image