Archived

This topic is now archived and is closed to further replies.

BigFatBaby

Using ASC files

Recommended Posts

Hie everyone'' im a noob to the opnegl coding, for a while now im trying to use an exported asc file of a 3dmax object (which contains all the vertex''s xyz coordinates, but all i get is alot of triangle without ant size, position or orientational connection. how do i do that? all suggestions will be welcomed when you program open source you program communism

Share this post


Link to post
Share on other sites
You can try understand that:load all the vertices in one array and use the triangle numbers there to reach a vertex in that array.These triangle ''numbers'' are called indices and they are used to indicate which 3 vertices the triangle uses.

The pain is coming...this sommer!!!

Share this post


Link to post
Share on other sites
i tried that, with an array that holds all the coordinates, but it seems that the vertex points arnt connected to the right triangles

when you program open source you program communism

Share this post


Link to post
Share on other sites
make sure you use the OGL coordinate system you need to switch some components or even inverse them i am not sure which coordinate system 3dsmax uses my 3dsmax doesn t popup anymore *gr*

Share this post


Link to post
Share on other sites
You need to swap the y and z components and then negate the z component of all the vectors you import from max.

Also, I''d recommend doing an importer for ASE not ASC files. ASC files don''t export the normals and I seem to remember the texture coords are wrong in ASC files - there''s only one texture vertex per actual vertex which means a lot of stuff you might build in max wont export correctly. With ASE files you get exactly what you saw in max. Plus with ASE files you can import animation to.

There''s some demo code for ASE loading at

http://nate.scuzzy.net/programming/aseDemo.zip

He kinda makes a meal of it, but I think it will be helpful.

Case.

Share this post


Link to post
Share on other sites