Jump to content
  • Advertisement
Sign in to follow this  
rofseek

Translating Obj face data into useful D3D10 rendering data

This topic is 3030 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Assuming the following definition of a 10cm^3 cube:
v  -1.1556 0.0000 0.6891
v  -1.1556 0.0000 -3.2479
v  2.7814 0.0000 -3.2479
v  2.7814 0.0000 0.6891
v  -1.1556 3.9370 0.6891
v  2.7814 3.9370 0.6891
v  2.7814 3.9370 -3.2479
v  -1.1556 3.9370 -3.2479
# 8 vertices

vn 0.0000 -1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 0.0000 1.0000
vn 1.0000 0.0000 -0.0000
vn 0.0000 0.0000 -1.0000
vn -1.0000 0.0000 -0.0000
# 6 vertex normals

vt 1.0000 0.0000 0.0000
vt 1.0000 1.0000 0.0000
vt 0.0000 1.0000 0.0000
vt 0.0000 0.0000 0.0000
# 4 texture coords

g Box01
usemtl wire_229154215
s 2
f 1/1/1 2/2/1 3/3/1 4/4/1 
s 4
f 5/4/2 6/1/2 7/2/2 8/3/2 
s 8
f 1/4/3 4/1/3 6/2/3 5/3/3 
s 16
f 4/4/4 3/1/4 7/2/4 6/3/4 
s 32
f 3/4/5 2/1/5 8/2/5 7/3/5 
s 64
f 2/4/6 1/1/6 5/2/6 8/3/6 
# 6 polygons
How can the face data be processed/translated into useful information for rendering?

Share this post


Link to post
Share on other sites
Advertisement
The easy way is just use a model loader lib; there will be many of them I'd imagine, they will import and compile all the information and should be well tested.

I'd personally use assimp to import from a wide variety of formats then produce my own format with only the information I require.

But you could also just get a specific .obj loader.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!