|
![](/i/fill.gif) |
Le Tue, 12 Feb 2008 05:26:38 -0500, here_I_am a modifié des petits
morceaux de l'univers pour nous faire lire :
> Jan Dvorak <jan### [at] centrum cz> wrote:
>> here_I_am napsal(a):
>> > Hey everybody!
>> >
>> > I am in the middle of a project, where i have to do smooth shading
>> > from a scene file of 15000 triangles which have thge data as
>> > triangles rather that having in smooth_traingle.And since the number
>> > of triangles is very large I simple can't calculate
>> > vnormalize(vcross(v1-v2,v3-v2)) manually and implement to
>> > smooth_triangle for every triangle
>> either you can or you don't have to ;-)
>
>
> yeah! I don't have :)
> So could you please suggest something here??
If all you want is a smooth_triangle with a normal at the vertex which is
the true normal, there is little point at using the smooth_triangle at
all.
Smooth_triangle are for faking the normals... which means you need more
than vnormalize(vcross(v1-v2,v3-v2)) to gain from its usage.
A long long time ago in another galaxy (nope, in 3.1g), I did a patch
which smooth a mesh (averaging the normal at a vertex using the various
normals at this vertex... weight of each normal could be :
- identical for each normal
- proportional to the angle of the triangle
- proportional to the product of the lengths meeting at the vertex
- proportional to the surface of the triangle
There is no absolute good weighting.)
See it here: (in french)
http://jgrimbert.free.fr/pov/patch/tessel/smooth.html
Post a reply to this message
|
![](/i/fill.gif) |