newbie:loading textures

Started by
7 comments, last by cockney 19 years, 4 months ago
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 :)
Advertisement
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]
Some tips:

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?
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
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
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
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.
Is there any link with enough details on how to start ?

Where can I get information with examples?

Any information about glTexGen()? how to use it ? example or tutorial ?

cheers

[Edited by - cockney on November 26, 2004 4:53:28 AM]

This topic is closed to new replies.

Advertisement