# buzzytom

Members

4

137 Neutral

• Rank
Newbie

• URL
1. ## What normal to use when triangles are in smoothing groups?

Thanks for the reply I have a rough idea of how all this works now. I was listening to something my lecturer said today about shading. For a standard sphere/cube(smoothed), you can take the vector from the mesh origin to the vertex (& normalize it). Could I use this on other shapes as a 'quicker' procedure for getting the vertex's. This would be really quick as all it is [i](vertex - meshOrigin).normalise();[/i] Or would this produce some weird results. The solution that I have at the moment takes way too long. I will give this a try
2. ## What normal to use when triangles are in smoothing groups?

I will have a go at implementing that and post my result back. This sounds like it could work. I will now have to cycle through each triangle in a given smoothing group to work out the averaged vertex normals. Thank you once again.
3. ## What normal to use when triangles are in smoothing groups?

I sort of see where you are coming from. I still don't understand how I could make the calculation. So if I had 2 triangles at right-angles joined along one edge (and part of the same smoothing group)[i]. [/i]what vector would I use for the intensity calculation at the joining vertex? Do I calculate some average of the 2 face normal vectors? Thank you for the speedy reply
4. ## What normal to use when triangles are in smoothing groups?

Hello, I am currently in the process of building a 3D graphics engine in C#. My aim is to not use any 3D libraries that would provide support. For that reason I am using the standard GDI available through the .NET framework. Its come on a lot further than I imagined. I have done all triangle plotting by hand and it fully supports texturing and .OBJ wave front file import (bar the smoothing groups) [img]http://www.chimptwist.co.uk/uploads/smooth-test.png[/img] As you can see from the cylinder above there is some shading from a fixed point light source. I use the normal of each face with the vector of the light to the triangle to calculate the triangle intensity. I am using the Lambertian Reflectance model to calculate the correct light intensity of each face. My draw triangle function works by specifying 3 things:[list] [*]3 * 2D-screen coordinates [*]3 * texture UV coordinates [*]3 * intensity of a vertex of the triangle (in the above screenshot each vertex on any given triangle will have the same intensity) [/list] My question is this: [b]If a group of triangles are in a smoothing group how would I calculate the light intensity at each triangle vertex?[/b] I think I may be missing something... Thank you in advance for any help. Hope this is the correct place and what not [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]