|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I think I know what's the problem.
Render the following scene:
#declare v1=<116.50351, 37.28418, -14.46650>;
#declare n1=<-0.87727, -0.19526, 0.43849>;
#declare v2=<73.18535, 44.36221, -1.11751>;
#declare n2=<-0.90956, 0.27350, 0.31289>;
#declare v3=<123.66611, 65.86183, 12.58927>;
#declare n3=<-0.8777, -0.19526, 0.43849>;
triangle { v1,v2,v3 pigment { rgb z } }
sphere { v1,1 pigment { rgb x } }
sphere { v2,1 pigment { rgb x } }
sphere { v3,1 pigment { rgb x } }
cylinder { v1,v2,.5 pigment { rgb y } }
cylinder { v2,v3,.5 pigment { rgb y } }
cylinder { v3,v1,.5 pigment { rgb y } }
cylinder { v1,v1+n1*50,.5 pigment { rgb x+y } }
cylinder { v2,v2+n2*50,.5 pigment { rgb x+y } }
cylinder { v3,v3+n3*50,.5 pigment { rgb x+y } }
#declare CamLookat=(v1+v2+v3)/3;
#declare CamPos=CamLookat+x*100-z*25;
camera { location CamPos look_at CamLookat angle 35 }
light_source { <1000,1000,-1000> 1 }
light_source { <0,0,1000> 1 }
The vertices of the triangle are red spheres, the edges green cylinders
and the normals yellow cylinders (and the interior of the triangle is blue).
You can see from the image, that two of the normals are pointing to one
side of the triangle while the third is pointing to the other side. This may
be causing the problem. I think that all the normals have to be pointing to
the same side of the triangle.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
david sharp wrote:
>
> Well, in my case, this is actually the most likely cause,
> but I cutnpasted directly from the source.
Hmmm... that's odd since I cut and pasted from your previous post and
it worked. I tried it with 3.1a official and my latest compile of
UVPov and both worked just fine (is 3.1d broken here?).
-Nathan
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nieminen Mika wrote:
[ ... ]
> You can see from the image, that two of the normals are pointing to one
> side of the triangle while the third is pointing to the other side. This may
> be causing the problem. I think that all the normals have to be pointing to
> the same side of the triangle.
I will have to experiment with this, but that particular triangle
came from a list of thousands where I am pretty sure that are other
places where the normals reverse from one end of a triangle to another
(but maybe not! I have to check), and all but that one rendered nicely.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nieminen Mika wrote:
> You can see from the image, that two of the normals are pointing to one
> side of the triangle while the third is pointing to the other side. This may
> be causing the problem. I think that all the normals have to be pointing to
> the same side of the triangle.
This, in fact, seems to be, or was, the problem. That triangle was
the only one, of thousands, where the normals were reversed from
one corner of the triangle to another, and it was the only triangle
POV was not accepting. This is easy enough to detect and work around.
Thank you very much for your efforts and insights.
Now, my question is why does POV-Ray do that? What is wrong with
one normal pointing 'up' while two point 'down' (or vice versa)?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
david sharp wrote:
>
> Nieminen Mika wrote:
> > You can see from the image, that two of the normals are pointing to one
> > side of the triangle while the third is pointing to the other side. This may
> > be causing the problem. I think that all the normals have to be pointing to
> > the same side of the triangle.
>
> This, in fact, seems to be, or was, the problem. That triangle was
> the only one, of thousands, where the normals were reversed from
> one corner of the triangle to another, and it was the only triangle
> POV was not accepting. This is easy enough to detect and work around.
>
> Thank you very much for your efforts and insights.
>
> Now, my question is why does POV-Ray do that? What is wrong with
> one normal pointing 'up' while two point 'down' (or vice versa)?
In effect you are twisting it into a fourth demension when you have
two normals pointing in the opposite direction of each other on one
object.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ken wrote:
>
> david sharp wrote:
> >
[ ... ]
> > Now, my question is why does POV-Ray do that? What is wrong with
> > one normal pointing 'up' while two point 'down' (or vice versa)?
>
> In effect you are twisting it into a fourth demension when you have
> two normals pointing in the opposite direction of each other on one
> object.
>
fourth dimension?
a ball doesn't have to twist into a fourth dimension to have
normals pointing in *every* direction.
Since Nathan Kopp posted that at least that one triangle was OK with
POV-Ray 3.1a, I find this still mysterious.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
It does seem strange to me as well. In the particle system I am working on,
I'm using smooth triangles as the particles. I calculate normals that point
at 90 degrees to the average normal of the triangle. These normals are
parallel to the surface and have had no error mesages like this.
Any programmer types who get into the POV code care to explain in detail?
Thanks
Gordon
david sharp wrote in message <36F### [at] interportnet>...
>Ken wrote:
>>
>> david sharp wrote:
>> >
>[ ... ]
>> > Now, my question is why does POV-Ray do that? What is wrong with
>> > one normal pointing 'up' while two point 'down' (or vice versa)?
>>
>> In effect you are twisting it into a fourth demension when you have
>> two normals pointing in the opposite direction of each other on one
>> object.
>>
>
>fourth dimension?
>a ball doesn't have to twist into a fourth dimension to have
>normals pointing in *every* direction.
>
>Since Nathan Kopp posted that at least that one triangle was OK with
>POV-Ray 3.1a, I find this still mysterious.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm not a programmer type and I might be wrong, but there seems to be a
problem of ambiguity. This is how I envision it: the normals of a smooth
triangle are calculated via interpolation of its 3 corner normals. When one
normal is rotated more than 180 degrees in relation to the others, how
should POV know which way to do the interpolated rotation? Bad ASCII art:
| /
--- --- ---
\
| \
--- --- --- ---
/ \
The end result is the same, but the intermediate normals are different. As
long as the angle difference is less than 180 degrees there is no ambiguity.
Margus
Gordon wrote:
>
> It does seem strange to me as well. In the particle system I am working on,
> I'm using smooth triangles as the particles. I calculate normals that point
> at 90 degrees to the average normal of the triangle. These normals are
> parallel to the surface and have had no error mesages like this.
>
> Any programmer types who get into the POV code care to explain in detail?
>
> Thanks
> Gordon
>
> david sharp wrote in message <36F### [at] interportnet>...
> >
> >fourth dimension?
> >a ball doesn't have to twist into a fourth dimension to have
> >normals pointing in *every* direction.
> >
> >Since Nathan Kopp posted that at least that one triangle was OK with
> >POV-Ray 3.1a, I find this still mysterious.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Upon furter meditation, this is not quite right. Ken's 4D argument is
correct. The sphere has normals pointing in all directions, but all normals
point to the same side of it's surface, by default the "outside". For an
object to have it's "inside" and "outside" on the same surface, it wold have
to be twisted in 4D (e.g. the Klein bottle, the 4D equivalent of the Moebius
band). This also happens when a smooth triangle's normals go from "up" at
one corner to "down" in the other.
The ambiguity problem I still applies, but a clearer definition is: when a
corner normal differs more than 90 degrees from the general normal (defined
by the corners of the triangle), POV cannot tell which way to do the
interpolation - is the surface concave? Or convex?
Margus
Margus Ramst wrote:
>
> I'm not a programmer type and I might be wrong, but there seems to be a
> problem of ambiguity. This is how I envision it: the normals of a smooth
> triangle are calculated via interpolation of its 3 corner normals. When one
> normal is rotated more than 180 degrees in relation to the others, how
> should POV know which way to do the interpolated rotation? Bad ASCII art:
>
> | /
> --- --- ---
> \
>
> | \
> --- --- --- ---
> / \
>
> The end result is the same, but the intermediate normals are different. As
> long as the angle difference is less than 180 degrees there is no ambiguity.
>
> Margus
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Margus Ramst wrote:
>
> Upon furter meditation, this is not quite right. Ken's 4D argument is
> correct. The sphere has normals pointing in all directions, but all normals
> point to the same side of it's surface, by default the "outside". For an
> object to have it's "inside" and "outside" on the same surface, it wold have
> to be twisted in 4D (e.g. the Klein bottle, the 4D equivalent of the Moebius
> band). This also happens when a smooth triangle's normals go from "up" at
> one corner to "down" in the other.
> The ambiguity problem I still applies, but a clearer definition is: when a
> corner normal differs more than 90 degrees from the general normal (defined
> by the corners of the triangle), POV cannot tell which way to do the
> interpolation - is the surface concave? Or convex?
>
> Margus
I was taking a shot in the dark with that reply but it just so happens
that I was reading up on the klien bottle last night before I responded
and that is what prompted me to think that it might be a case of twisting
it being twisted in a "4th" dimension. I can't think of any other way to
have two opposing sides of a flat surface connected to each other. Looks
like I got lucky this time.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|