PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

About e3d file format

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.
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?
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?
Hi Zalo,

Are you reading the .e3d file in your java application? If so, make sure to do the following:
- First read them as integer
- Then convert them to floating point
- And finally divide by 65536
Tank you, Edge
It was my fault this time. I have some problems with LITTLE_ENDIAN-BIG_ENDIAN issues ¬¬UU

Sorry