• Advertisement

Archived

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

Smoothing Edges in D3D8

This topic is 6220 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

I''m loading milkshape 3d files into DX8. The files load fine, except that all of the meshes i load have very sharp jagged surfaces edges. DX8 suggests that I use triangle strips to create smoothed surfaces. Unfortunately, the milkshape file format is defined in terms of triangle lists. 1) Is there any way i can simply tweak the vertex normals to create the illusion of smoothness? (are vertex or face normals used to create the illusion of smoothness?) 2) Does anyone know of a good algorithm that converts triangle lists into triangle strips? Thanks. DmGoober

Share this post


Link to post
Share on other sites
Advertisement
i dont know anything about milkshape, but as for converting, essentially all you have to do is remove any shared verts in an object (you would have to split everything you render into objects that share verts) and you are done (because the number of triangles remains the same). this might be too much of a pain in the ass and not really worth the performance increase you will get by dropping your vert count. as for smoothing edges, you are looking for something called anti-aliasing. many new cards support full-screen anti-aliasing on the HEL. i wouldn''t mind some more info on anti-aliasing myself if anyone else deigns to post.

Brett Lynnes
cheez_keeper@hotmial.com
-Why is it you park in a driveway, but drive in a parkway?

Share this post


Link to post
Share on other sites
Vertex normals are used to smooth one triangle into the next. This is done by creating a vertex normal that is the average of all face normals of the faces that contain that vertex and are in the same smoothing group.

In figure (a), two faces are shown with their face normals. In figure (b), the common vertex has been assigned two normals that are the same as the corresponding face normals. This will result in a sharply defined edge between the two faces. In figure (c), the vertex normal has been calculated as the average of the two face normals, ie. the face normals were added and normalized. This will result in a smoothing between the two faces.


Steve 'Sly' Williams   Code Monkey  Krome Studios

Edited by - Sly on February 13, 2001 6:00:32 PM

Share this post


Link to post
Share on other sites
I thought he meant jagged on the edges of the object. if the problem is the center of the object so you have to concatonate the verts then check out mircoshaft''s driectX website on .x files... i think i saw something there that optimises meshes... mebbe it was someplace else... anyway if you can get it to .x format i know i have seen something somewhere that will do it for you. thats all, g''night all.

Brett Lynnes
cheez_keeper@hotmail.com
"No honey, that dress DOESN''T make you look fat. It''s all the ice cream and cake you eat that makes you look fat." - what guys really want to say

Share this post


Link to post
Share on other sites
Thanks for the help guys. I actually solved the problem mostly. . . I was using ambient lighting, which, obviously, does not smooth between faces as gourad does. Doh!

My normals were all correct (i''m loading milkshape files. ms3d automatically fixes the normals between faces that have the same smoothing groups.)

My big problem now is that of angular silouhuettes. Unfortunately, this is not a problem that i can solve short of adding more polys to my mesh. . . but since i''m writing a game that depends on low poly meshes, i''m kinda screwed huh? =)

Actually there was research at some university about modifying silohuetts so they don''t look angular, but i think its too much work for now. =)

DmGoober

Share this post


Link to post
Share on other sites

  • Advertisement