Rendering a 3D mesh object

I have a problem about rendering a 3D mesh object. I prepared the 3D mesh object in C# and rendered it. Unfortunately, the edges that must be sharp are camber.

Could one explain me what the reason is.

I am using visual studio 2008 - C# Express Edition. The 3D closed mesh object has appr. 66.000 vertexes. At the same time, it has not only flat surfaces, but also curved surfac

I mean the edge at which two flat surfaces meet is not straight.

13.10.2009 22:41:07
What do you mean by camber? Do you mean the edges are not straight (bowed/curved)? Do you mean they're fuzzy (antialiased)? Or do you mean they are pixelated?
Victor Liu 13.10.2009 22:44:04

Your vertices only have one normal - that being the average of the normals of all the triangles that share that vertex.

To get flat shading each vertex has to be treated as though it has [n] normals - where [n] is the number of triangles that share the vertex and each normal has to be the same as the normal of the triangle. Some systems required that the vertex does have [n] normals, but it isn't strictly necessary if you know that you are flat shading across all triangles you can inherit the normal from the triangle. If (as Warren Young mentions) some parts are flat shaded and others are smooth shaded then you will need to assign extra normals at those vertices where flat shaded triangles meet.

Without details of the modelling system you are using, (and perhaps not even then!) I can't suggest how you might achieve this.

14.10.2009 08:02:32
Really? Why not just use the polygon's normal for flat shading?
Warren Young 13.10.2009 23:01:46
@Warren Young - I thought I said that when I wrote "you can inherit the normal from the triangle."
ChrisF♦ 14.10.2009 08:03:12