|
|
Nice IOTD.
I've been doing some work recently on LOD mesh generation for a 3dsmax exporter for a game I've been working on... seems static "Levels" of LOD are more plausible than more complicated geometry (and art, for that matter) generation systems such as patch rendering (wasn't that supposed to be the Next Big Thing?!). Off topic, I think it's peculiar how 3D developers go through phases of the "next cool thing" code trends.. I swear it's almost a right of passage to being a complete 3D coder, everyone at some time or another seems to turn their hand to "obligatory" milestones in their coding career - starting with particle systems and raytracers, the infamous terrain engine (no offence to people who take the time to implement one, but why do they always seems to come straight from someone elses graphics paper on the subject?), the Quake2/halflife level renderer and finally on to stuff that really needs some heavy math like realtime CSG and rigid body dynamics. Excuse my meandering.
Anyhow, as for the questions regarding texture/material/shading preservation using this vertex collapse method - typically each vertex contains a "cost" precached value, indicating the visual impact removing this vertex from the mesh would have (edge length is often a good weight) and allowing the reduction code to leave those vertices in existance until last. In meshes that contain areas where two verticies occupy the same [x,y,z], but yet have differing normals, colour, U/V's or or material- it may be advisable not to remove these vertexes AT ALL to preserve the visual integrity of the model, as it generally avoids removing verts that define the primary edges. Just my 2c.
Anyhow - nice IOTD, I'll crawl back in my box now :)
|