Re: [Algorithms] Smooth Triangles
Brought to you by:
vexxed72
From: Vek <ve...@ho...> - 2000-12-15 07:38:31
|
Hi... I just finished writing an ASE importer for map data for the engine I'm working on...I wasn't aware of any normal info missing but it is kind of strange how it stores it... looks like the ASE file format is optimized to store as few vertex positions as possible, and just about as much of everything else. So each face will have 3 normals... (which are correct) but then an index to the vertex in a list of vertex co-ordinates that the 3 vertices of the face belong to. So, some vertices may be shared, but have different normals. The way I eventually parsed it is just read in the vertices, build a 'whole' vertex (normal, uv, position) out of each point on each face, and add 'em to the list, skipping duplicates... then I did another pass and using this built info, generated a list of vertices and another of indices (for a DX index buffer...) then dumped that to a file. It takes quite a bit to run, due to the amount of sniffing 'round in the file it has to do, but the output's quite nice. I'm looking into searching for strips and things next. -Vek ----- Original Message ----- From: "Ray" <ra...@gu...> To: <gda...@li...> Sent: Thursday, December 14, 2000 2:51 PM Subject: Re: [Algorithms] Smooth Triangles > Blake Senftner wrote: > > > > If you're MAX exporter started from the ASE Exporter code base, > > the normals are not being exported correctly. I forget the exact > > details, but looking at an ASE file I think I'm remembering... > > that the vertex normals are exported with information missing! > > Something about being multiple sets of vertex normals due to > > single verts being shared between multiple faces, and those > > faces being members of multiple smoothing groups. > > > > I recommend that you discard all vert normal info that MAX provides > > and regenerate it based upon the smoothing groups and face normals. > > (hmmm... looking over my code I see that I found a problem with > > the face normals too and just regenerated everything from the verts > > themselves and the face's smoothing groups.) > > The max3sdk has an example in it somewhere I think on how to get vertex > normals based on smoothing groups. > It may be in the max2sdk though. > > If you still can't figure it out, I can give you what I did. > > - Ray > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |