|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
camera { location <0,0,-2> look_at <0,0,0> }
background { rgb <1, 1, 1> }
light_source { <0,0,-25> rgb 10 shadowless}
#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.
-Shay
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I didn't take a lot of time to read your code (I'm a little tipsy), but my
immediate reaction is to wonder if it's this:
http://tag.povray.org/povQandT/SmoothTriangleArtifact/index.html
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Slime wrote:
> I didn't take a lot of time to read your code (I'm a little tipsy),
> but my immediate reaction is to wonder if it's this:
>
> http://tag.povray.org/povQandT/SmoothTriangleArtifact/index.html
>
> - Slime
> [ http://www.slimeland.com/ ]
>
>
Possibly, but double_illuminate does not correct the problem.
-Shay
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Shay nous apporta ses lumieres en ce 2007/08/10 11:40:
> Slime wrote:
>> I didn't take a lot of time to read your code (I'm a little tipsy),
>> but my immediate reaction is to wonder if it's this:
>>
>> http://tag.povray.org/povQandT/SmoothTriangleArtifact/index.html
>>
>> - Slime
>> [ http://www.slimeland.com/ ]
>>
>>
>
> Possibly, but double_illuminate does not correct the problem.
>
> -Shay
double_illuminate can reduce the problem, not remove it.
Your problem triangle may be shadowed on it's back by another one.
--
Alain
-------------------------------------------------
You know you've been raytracing too long when you've gained twenty pounds
sitting at the computer, but can't tell because your beard covers your stomach.
Taps a.k.a. Tapio Vocadlo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> #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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tim Attwood wrote:
>
> OK, first things first.
> Secondly
> Third
> Fourth
Thank you, but none of this makes a difference. The same thing can
happen with every normal set to <0,0,-1> ( a flat triangle ). Take a
look at my "high school math" post in p.b.i and you will see that there
are shadows which aren't.
-Shay
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Shay <shay@s.s> wrote:
> Possibly, but double_illuminate does not correct the problem.
How about "no_shadow"?
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Shay <shay@s.s> wrote:
> camera { location <0,0,-2> look_at <0,0,0> }
> background { rgb <1, 1, 1> }
> light_source { <0,0,-25> rgb 10 shadowless}
>
> #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.
>
> -Shay
I get one dark triangle on Windows version too. If you reduce the light's
rgb to 3 or less you'll see a number of other triangles turning dark. On
the other hand if you shoot it up to 100, the triangle that is currently
dark will have only a small dark zone near one vertex. Moving the light
elsewhere causes other triangles to go dark, so the "problem" is evidently
due to interaction between the light source and smooth triangle normals.
I'm pretty sure everything is working as intended.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Thank you, but none of this makes a difference. The same thing can
> happen with every normal set to <0,0,-1> ( a flat triangle ). Take a
> look at my "high school math" post in p.b.i and you will see that there
> are shadows which aren't.
A normal of <0,0,-1> is not flat in this instance, since the
triangle is at a different angle. It's not enough that the
three normals be the same, they need to match the triangle too.
That said, even a flat triangle will show up dark at some angles,
it's supposed to be that way. The fact that you are using a bright
light increases the falloff of the shading so that many of the triangles
are saturated, and the shaded ones are dark by comparison.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|