POV-Ray : Newsgroups : povray.general : Why the dark triangle? : Re: Why the dark triangle? Server Time
31 Jul 2024 08:23:16 EDT (-0400)
  Re: Why the dark triangle?  
From: Tim Attwood
Date: 10 Aug 2007 18:21:30
Message: <46bce4ea$1@news.povray.org>
> #local Ob1 = smooth_triangle {
> <-0.1, 0.5, 0.0>, <0.0, 0.1, 1.0>,
> < 0.1, 0.5, 0.1>, <0.0, 0.1, 1.0>,
> < 0.0, 0.6, 0.0>, <0.0,-0.1, 1.0>
> pigment { rgb <1,0,0> }}
>
> #local c0 = 0; #while ( c0 <= 264 )
> object { Ob1 rotate <c0/4.0, -c0, 0.0> }
> #local c0 = c0 + 33; #end
>
> Shows several light and one dark triangle on latest Linux version. This
> is just a minimal scene to show the effect; Entire areas of my full
> scene are turning black this way.

OK, first things first. Your normals in your smooth_triangle
are not normalized unit lengths, they should be unit length.

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.

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.

Fourth, you are using a bright light which increases the
falloff of the shading in objects. If you don't want your
object to be shaded, use finish{ambient 1}.


Post a reply to this message

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