Texture isn't applying to ship [SOLVED]
Moderators: winston, another_commander
- Poro
- Deadly
- Posts: 249
- Joined: Sun Jan 03, 2010 1:51 am
- Location: Don't look in your aft view...
- Contact:
Texture isn't applying to ship [SOLVED]
PLEASE GO TO THE FIRST MESSAGE OF THE SECOND PAGE FOR THE SOLUTION
I'm working on my first ship, and having followed Giles' tutorial to the letter, I find that the model loads up fine in the game, it is stocked in the shipyard okay, but it never has any texture applied.
I've gone over everything I can think of, including:
Texture name (uppercase - lowercase)
Linux file permissions
Re-saving and exporting the texture from Wings3D
Re-saving the PNG from within GIMP
Re-exporting the model with different tessellation settings from within Wings (including none)
Checking the shipdata file and model dat file...
... all to no avail. All I get in the shipyard is the rotating model with a pinkish colourcast to it (rather than the white polygons that I sometimes see on untextured ships).
I can't upload any files right now, but does anyone have any ideas? I hope it's just a noob mistake somewhere.
I'm working on my first ship, and having followed Giles' tutorial to the letter, I find that the model loads up fine in the game, it is stocked in the shipyard okay, but it never has any texture applied.
I've gone over everything I can think of, including:
Texture name (uppercase - lowercase)
Linux file permissions
Re-saving and exporting the texture from Wings3D
Re-saving the PNG from within GIMP
Re-exporting the model with different tessellation settings from within Wings (including none)
Checking the shipdata file and model dat file...
... all to no avail. All I get in the shipyard is the rotating model with a pinkish colourcast to it (rather than the white polygons that I sometimes see on untextured ships).
I can't upload any files right now, but does anyone have any ideas? I hope it's just a noob mistake somewhere.
Last edited by Poro on Fri Jul 02, 2010 3:42 pm, edited 1 time in total.
Did you put the texture in the Textures directory? Oolite won't find it if it's in the same directory as the .dat file...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
I've never done a model/texture from scratch but ...just a thought. What size is your texture? Normal Oolite textures are 512x512px but multiples work as well 1024x1024 or 2048x2048. The bigger the texture, the more detail you can get. I mention this because I don't think other sizes work.
Commander Smivs, the friendliest Gourd this side of Riedquat.
- Poro
- Deadly
- Posts: 249
- Joined: Sun Jan 03, 2010 1:51 am
- Location: Don't look in your aft view...
- Contact:
Gya! [NoteToSelf]Always check the logs[/NoteToSelf]
Sure enough the log said
So off I go to the DAT file, and whilst it identifies the correct texture in the header... the entire texture section is missing. I used Obj2DatTex.py - shouldn't that have done it? Obj2DatTexNorm.py didn't procuce the correct output, and I can't find a copy of Obj2Dat.py to test, but with the 'Tex' suffix I would have thought that this would output the correct texture coordinates.
To reiterate, the DAT file contains the VERTS and FACES sections, but not the TEXTURES section.
Here is the terminal output when I run it:
EDIT: REMOVED LONG LISTING OF PYTHON FILE, SINCE IT IS NO LONGER RELEVANT
Sure enough the log said
Code: Select all
[mesh.error]: ***** Failed to find TEXTURES data (will use placeholder material)
..... from intio.dat (from file)
To reiterate, the DAT file contains the VERTS and FACES sections, but not the TEXTURES section.
Here is the terminal output when I run it:
Code: Select all
converting...
['Intio.obj']
Intio.obj->intio.dat
going to open material library file: Intio.mtl
Material Intio_auv -> IntioTexture.png
done
Last edited by Poro on Fri Jul 02, 2010 3:31 pm, edited 1 time in total.
- Poro
- Deadly
- Posts: 249
- Joined: Sun Jan 03, 2010 1:51 am
- Location: Don't look in your aft view...
- Contact:
It's 512x512, I made sure Wings3d got that right.Smivs wrote:I've never done a model/texture from scratch but ...just a thought. What size is your texture? Normal Oolite textures are 512x512px but multiples work as well 1024x1024 or 2048x2048. The bigger the texture, the more detail you can get. I mention this because I don't think other sizes work.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
I have also had a few occasions of missing texture in the dat file. But maybe it was already missing in the obj file. At the moment I can't remember how I fixed it, but is was always a small change somewhere. hmm.. sounds not that helpful. Maybe it were some unused texture definitions in wingz I had to delete first?Poro wrote:Hi Svengali. Would a face intersection stop the whole texture section of the DAT file from being written? I'll fire up Wings3D when possible and have a look.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Poro
- Deadly
- Posts: 249
- Joined: Sun Jan 03, 2010 1:51 am
- Location: Don't look in your aft view...
- Contact:
Well, i guess my ship isn't going to be flying any time soon I made sure anything in the "Outline Window" within Wings had to be there (you mentioned unused texture definitions) and it still doesn't have any texture data coming out.
FYI within the OBJ file there are faces (f), vertex points (v), vertex normals (vn), and vertex texture points (vt). That's why I thought the problem may be with the py file... but then wouldn't everyone else's be messed up?
P.S. That is what (vt) stands for, right? Vertex texture?
FYI within the OBJ file there are faces (f), vertex points (v), vertex normals (vn), and vertex texture points (vt). That's why I thought the problem may be with the py file... but then wouldn't everyone else's be messed up?
P.S. That is what (vt) stands for, right? Vertex texture?
No offence taken!no offence Kaks
It might be more useful to look inside the generated .dat file, though: do you see any reference to the texture file name inside it?
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Poro
- Deadly
- Posts: 249
- Joined: Sun Jan 03, 2010 1:51 am
- Location: Don't look in your aft view...
- Contact:
Yes indeed:Kaks wrote:It might be more useful to look inside the generated .dat file, though: do you see any reference to the texture file name inside it?
Poro wrote:So off I go to the DAT file, and whilst it identifies the correct texture in the header... the entire texture section is missing... [snip]... To reiterate, the DAT file contains the VERTS and FACES sections, but not the TEXTURES section.
You might want to zip up the .obj, .mtl & .png files & send us the link. Without that, I really don't think I'll be able to help...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
I think I might have done something similar when I created (exported) my first .obj file from AC3D.
I think I needed to have the .obj and the .png file in the same directory as the Obj2DatTex.py file.
If you've already done this, I'm at a loss.
I think I needed to have the .obj and the .png file in the same directory as the Obj2DatTex.py file.
If you've already done this, I'm at a loss.
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.