POV-Ray : Newsgroups : povray.bugreports : polygon rendered incorrectly : Re: polygon rendered incorrectly Server Time
16 Apr 2024 05:46:49 EDT (-0400)
  Re: polygon rendered incorrectly  
From: Chris Hills
Date: 13 Oct 2015 16:52:14
Message: <561d6efe@news.povray.org>
"Thorsten Froehlich" <nomail@nomail> wrote in message 
news:web.55ecab73b62fe087b09a9f90@news.povray.org...
> "MidiPlay" <ast### [at] yahoocouk> wrote:
>> I have 2 polygons, they're 200 units apart and they're identical apart 
>> from 1
>> vertex being moved 1 unit.  They're displayed with different colours. 
>> Why?  I'm
>> using version 3.7.0.msvc10-sse2.win32.
>>
>> #version 3.5;
>> #include "colors.inc"
>> global_settings { assumed_gamma 1.0 }
>> background { rgb 0.0500 }
>> light_source { <0, +10000, 0> rgb 1 }
>> #declare Pigment1 = texture { pigment { color rgb < 1 , 0 , 0 > } }
>> #declare Pigment2 = texture { pigment { color rgb < 0 , 1 , 0 > } }
>> polygon
>> {
>>     11,
>>     < 192 , 0 , -126 >
>>     < 152 , 0 ,   23 >
>>     < 145 , 0 ,   53 >
>>     < 124 , 0 ,   77 >
>>     <  96 , 0 ,   88 >
>>     <  65 , 0 ,   84 >
>>     <  50 , 0 ,   79 >
>>     <  50 , 0 ,  126 >
>>     < 200 , 0 ,  126 >
>>     < 200 , 0 , -126 >
>>     < 192 , 0 , -126 >
>>     texture { Pigment1 } interior_texture { Pigment2 }
>> }
>> polygon
>> {
>>     11,
>>     < 392 , 0 , -126 >
>>     < 353 , 0 ,   23 >
>>     < 345 , 0 ,   53 >
>>     < 324 , 0 ,   77 >
>>     < 296 , 0 ,   88 >
>>     < 265 , 0 ,   84 >
>>     < 250 , 0 ,   79 >
>>     < 250 , 0 ,  126 >
>>     < 400 , 0 ,  126 >
>>     < 400 , 0 , -126 >
>>     < 392 , 0 , -126 >
>>     texture { Pigment1 } interior_texture { Pigment2 }
>> }
>> plane
>> {
>>     y, -0.1
>>     pigment
>>     {
>>         checker rgbf <0.6,0.6,0.6, 1.0>, rgbf <1,1,1, 0.6>
>>     }
>>     scale 100
>> }
>> camera
>> {
>>     location < 200 , 8000 , 0 >
>>     right 1.778 * x
>>     angle 6.5000
>>     look_at < 200 , 0 , 0 >
>> }
>
> The surface normal points the other way. A polygon has no real "inside" 
> and at
> the end of the day, "interior_texture" does nothing else but look at the 
> sign of
> the surface normal because in objects with a volume, it is properly 
> defined (in
> POV-Ray anyway) in a consistent way. As there is no way to set the surface
> normal
> of polygons in POV, you might want to try reversing the order of points to
> invert the surface normal.
>
> Either way, it is not a bug.

Is it possible to tell, from the vertices of the polygon, which way the 
surface normal points?


Post a reply to this message

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