Page 1 of 1

About e3d file format

PostPosted: Feb 13, 2008 @ 12:06pm
by Zalo
Hi, Edge. I am currently working on Java on an editor for a game we will be working on soon. I have to read some meshes and draw them and because we are planning to use Edgelib for the game I decided to store them in e3d format. I can read almost everything but texture coordinates. How are they really stored? I have tried 16:16 fixed format but it didn't work

If I load this meshes into edge they are painted on screen perfectly so I guess I am doing something wrong.

Also I have noticed that vertices are stored in 2:30 fixed format instead of 20:12 as documentation says.

PostPosted: Feb 13, 2008 @ 4:37pm
by edge
Hi Zalo,

Can you tell me why the texture coordinates don't work? Is the mapping incorrect? If the mapping is incorrect, you can try reversing the v-coordinates. For example: v = -v;

The vertex coordinates should go from -4096 to 4096 to make display a 3D model in fullscreen. Take an example from the cube coordinates in the View3D sample. Perhaps the precision is bigger because you've zoomed out or scaled the world?

PostPosted: Feb 13, 2008 @ 5:54pm
by Zalo
Texture vertices are supposed to be 16:16, so what I am doing in Java is reading them and dividing by 65536 to obtain the real value. This value is supposed to be normalized so it should be between [0, 1]

Am I doing something wrong?

PostPosted: Feb 14, 2008 @ 8:39am
by edge

PostPosted: Feb 14, 2008 @ 11:20am
by Zalo
Tank you, Edge
It was my fault this time. I have some problems with LITTLE_ENDIAN-BIG_ENDIAN issues ¬¬UU

Sorry