POV-Ray : Newsgroups : povray.general : Why the dark triangle? : Re: Why the dark triangle? Server Time
31 Jul 2024 08:29:25 EDT (-0400)
  Re: Why the dark triangle?  
From: Warp
Date: 11 Aug 2007 03:52:10
Message: <46bd6aa9@news.povray.org>
Tim Attwood <tim### [at] comcastnet> wrote:
> OK, first things first. Your normals in your smooth_triangle
> are not normalized unit lengths, they should be unit length.

  Says who?

  Smooth triangles can have normals of any length. It doesn't matter what
their length is. (AFAIK povray normalizes them internally when it parses
the smooth triangle.)

> Secondly, the normal of your smooth_triangle points away from
> the camera when it's not rotated. We're looking at the "inside",
> the curve cups instead of bulging, it's supposed to be darker in
> cupped spots at some angles. The normals should all point
> outward on an object.

  Why can't a triangle "cup in"? It can be part of a concave surface.
Not all surfaces are convex.

> Third, your normals are all tilted in the same directions, in other
> words, the normals are conveying that this triangle is part
> of a "wrinkle" area, besides just being cupped.
> The normal of a flat triangle ABC can be figured as
> vcross(A-C,B-C). The normal of a point on a smoothed
> section (not on a seam) of a mesh made of smooth_triangles
> should be the average normal of the adjacent triangles.

  "Should be"? Calculating the average of the normal vectors of adjacent
triangles is just one algorithm for automatically smoothing a mesh. It's
in no way the only "correct" way of doing it. It's just one way.
  There's no requirement nor reason for limiting vertex normals to be
the average of the triangle normals of adjacent triangles. The vertex
normals can be calculated in other ways too, for alternative lighting.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.