Sign in to follow this  
Starter

Ms3d Ascii Question

Recommended Posts

Ok I am programming a loader for the ms3d ascii file format in java and i am confused about some things. In the sample file in the sdk i don't know what the u and v are for. // vertex: flags, x, y, z, u, v, bone index 0 -10.375000 10.500000 13.750000 0.000000 0.000000 -1 0 -10.375000 -10.250000 13.750000 0.000000 1.000000 -1 0 10.375000 10.500000 13.750000 1.000000 0.000000 -1 0 10.375000 -10.250000 13.750000 1.000000 1.000000 -1 0 10.375000 10.500000 13.750000 0.000000 0.000000 -1 0 10.375000 -10.250000 13.750000 0.000000 1.000000 -1 0 10.375000 10.500000 -4.500000 1.000000 0.000000 -1 0 10.375000 -10.250000 -4.500000 1.000000 1.000000 -1 0 10.375000 10.500000 -4.500000 0.000000 0.000000 -1 0 10.375000 -10.250000 -4.500000 0.000000 1.000000 -1 0 -10.375000 10.500000 -4.500000 1.000000 0.000000 -1 0 -10.375000 -10.250000 -4.500000 1.000000 1.000000 -1 0 -10.375000 10.500000 -4.500000 0.000000 0.000000 -1 0 -10.375000 -10.250000 -4.500000 0.000000 1.000000 -1 0 -10.375000 10.500000 13.750000 1.000000 0.000000 -1 0 -10.375000 -10.250000 13.750000 1.000000 1.000000 -1 0 -10.375000 10.500000 13.750000 0.000000 1.000000 -1 0 10.375000 10.500000 13.750000 1.000000 1.000000 -1 0 -10.375000 -10.250000 13.750000 0.000000 0.000000 -1 0 10.375000 -10.250000 13.750000 1.000000 0.000000 -1 get the flags,x,y,z,bone index but not the u and v. What do they do?

Share this post


Link to post
Share on other sites
The UV parameters are for texture mapping, commonly used in UV mapping a model. Basically, the U and V coordinates detail how a texture is applied to a surface. 0.0, 0.0 is the lower-left pixel of a texture (texel), while 1.0, 1.0 is the upper right pixel.

You can find more information by googling for "texture mapping" and "texture coordinates." Best of luck!
-jouley

Share this post


Link to post
Share on other sites
So has anyone made a ms3d ascii loader in java?

I am trying to do in java for jogl but i still dont understand how the format works. Does it plot the vertices in triangles? I would have only expected four vertices for a box but there is like 20. How should I implement this?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this