Reversed textures
Moderators: winston, another_commander
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
Reversed textures
Is there any hope of getting Oolite to show a texture as-is? it's annoying having to do everything in reverse.
Re: Reversed textures
you should be able to show a texture "as is".., it is more than likely your model file exporter is not negating the vertex data correct...Killer Wolf wrote:Is there any hope of getting Oolite to show a texture as-is? it's annoying having to do everything in reverse.
meaning in my python script, it sets X coordinate to be negative meaning it mirrors the texture..
Reverse textures is a "feature" of OpenGL texture-ring, since it reads the texture from bottom left, instead of top right as you are used to in a paint program.
Anyway, your model exporter tool should negate the values to allow for correct texturing..
the specific entry in the python script that I use looks like this...
Code: Select all
# negate x value for vertex to allow correct texturing...
x = -float(tokens[1])
y = float(tokens[2])
z = float(tokens[3])
Bounty Scanner
Number 935
Number 935
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Reversed textures
Er, no. Actually it’s a result of Oolite’s coordinate system not matching that of OBJ files (or most other 3D file formats). Without proper correction, the entire model is mirrored, not the textures as such.Frame wrote:Reverse textures is a "feature" of OpenGL texture-ring, since it reads the texture from bottom left, instead of top right as you are used to in a paint program.
In any case, the current versions of Obj2DatTex.py (and now, Obj2DatTexNorm.py) handle this for you.
E-mail: [email protected]
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm