View Full Version : ASE file loading?????
08-18-2001, 06:02 PM
Hello, I have this ASE file that I exported from 3DS Max and I'm creating a program to read the file and display it using OpenGL. When I read in the vertex information am I supposed to store the values in a vertex array and is the same process used fro texture information??? Please help!!!!!
IF ANYONE IS INTERESTED IN HELPING ME CREATE A MULTIPLAYER ACTION SPORTS GAME THAT I AM BEGINNING PLEASE EXPRESS YOUR INTEREST!!!!
I just cooked a simple ASE loader up myself the other night - it's a bit crap because it's rather hardcoded, unflexible and not efficient either. It does, however, get the job done (for now).
I simply stored the verts in an array of point (x, y, z) structures. Then when you read the face list below the vertex information, store those numbers after the A: B: C: as an index into the previously built array of point structures. So when you render its in a loop going through your face list:
You need to reference 1 & 2 of the vertexindex array as well to get your triangle. It's not a good way of doing it, but it's my first model loader ever http://www.opengl.org/discussion_boards/ubb/smile.gif
08-20-2001, 09:51 AM
Hi, I'm just writing an ASE loader too. The vertex data from the ASE file is just ready to be used in an indexed vertex array. The indices are the integers after A: B: C:, but you have also them reproduced in the normal data (I prefer to load them from the normal data).
I insist : use vertex arrays, the ASE files are designed for that ! And it will greatly improve your execution speed.
However once you use lighting things get more difficult, for you may have more than one normal per vertex, whereas the opengl vertex arrays can have only one normal per vertex.
To Mezz : if your loader is slow, try tokenizing, using the standard strtok function. I had the same problem and this technique has dramatically improved my loader's speed.
[This message has been edited by Morglum (edited 08-20-2001).]
I will try using vertex arrays.
I don't understand what you mean by 'normal data'
Do you mean vertex/face normals? are they loaded from the ASE file? (because the ones I have don't contain normal data)
Oh, and what is the reason for having more than one normal per vertex?
I might try using strtok to speed it up but loading speed isn't too important right now (more rendering speed atm)
oh and whats the most efficient way of rendering the data?
strips, fans or regular triangles?
Do I need to do any work beforehand in order to use one of the above mentioned methods?
08-20-2001, 07:36 PM
Thanx everyone!!!! I think that if you use opengl cameras rather than 3DS cameras you could save your self a lot of trouble. If would be easier to control the opengl camerasrather than the 3DS ones.
08-21-2001, 05:42 AM
1. By "normal data" i meant vertex normals indeed. Please excuse my poor english. This data is exported by 3DSMAX in the ASE file. If you don't find it, you must have forgotten to check the "Mesh normals" box in the dialog box which appears when you export a file to .ASE.
2. Just imagine a cube. Each vertex is shared by 3 faces, so each vertex has 3 vertexnormals.
3. Strips and Fans are faster than ordinary triangles. I don't know yet how to prepare data for this kind of rendering, but there is an algorithm available on nvidia's site (i've forgotten the exact address).
Ignore everything I've said, because I've been talking about ASC files and not ASE files.
I feel such a fool. Although after my discovery of my error, I went looking into ASE files but I don't have MAX and I can't find anything that exports to them so, well, guess I'll have to save up for it http://www.opengl.org/discussion_boards/ubb/smile.gif
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.