newbie:loading textures
now that i have a 3d model loaded into lwjgl, what is the best way of adding the texture to it, the raw file only contains its vertices and nothing about its textures
thanks to all who reply
Danny :)
lol, no such thing as a "best way"; there are solutions to fit your needs. Can you explain your situation a bit more?
Cheers,
- llvllatrix
[Edited by - llvllatrix on November 23, 2004 4:17:08 PM]
Cheers,
- llvllatrix
[Edited by - llvllatrix on November 23, 2004 4:17:08 PM]
Some tips:
1. read the doc: http://www.lwjgl.org/javadoc/
2. post on the lwjgl forums
3. use TextureLoader().
Keer :-)
1. read the doc: http://www.lwjgl.org/javadoc/
2. post on the lwjgl forums
3. use TextureLoader().
Keer :-)
How can you calculate texture coordinates?
and then apply them in any given object?
and then apply them in any given object?
Texture projection is a wierd field. Textures can be calculated and fitted based on a number of geometry properties (normals and the such). Alias ImageStudio is the best example of practical projection I've seen so far.
Cheers,
- llvllatrix
Cheers,
- llvllatrix
so is there a way of loading a texture to a given object or not?
Suggested that we have some data file from which we load some object ( graphically represented through openGL), can we load a texture to it (if our data file contains only the vertex of the object and nothing about texture coordinates)?
cheers
Suggested that we have some data file from which we load some object ( graphically represented through openGL), can we load a texture to it (if our data file contains only the vertex of the object and nothing about texture coordinates)?
cheers
The short answer is yes but I have no idea how to do it(having never done it). Could check the articles on gamedev or gamasutra, but I know it is possible.
Good luck,
- llvllatrix
Good luck,
- llvllatrix
Quote: Original post by cockney
so is there a way of loading a texture to a given object or not?
Suggested that we have some data file from which we load some object ( graphically represented through openGL), can we load a texture to it (if our data file contains only the vertex of the object and nothing about texture coordinates)?
cheers
Yes, but it takes some time, i use different projection methods when i convert an lwo file to my own model format since lightwave mostly uses projective textures.
The basic planar projection process is basicly to take two vertex cordinates (depending on the projection axis) and just scale, rotate and translate them until it fits.
For cubic projection you choose the projection axis per polygon depending on the normal before doing the planar projection mapping.
But i do recomend using a manualy created uv map, if it's not there, put it there.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement