![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Does Povray care about the winding of a mesh? As in, does it use 1 sided or
2 sided polygons? If it uses one sided, how can this be set to 2 sided?
Thanks,
Jason
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jason Miller <jas### [at] pinheiro tcimet net> wrote:
: Does Povray care about the winding of a mesh? As in, does it use 1 sided or
: 2 sided polygons? If it uses one sided, how can this be set to 2 sided?
I suppose that a 1-sided polygon is (like, for example, in OpenGL) a polygon
that is seen only from one side. If the polygon is turned so that the other
side faces the camera, then it's not rendered.
Povray only uses 2-sided polygons (ie. they are rendered now matter how they
are rotated). I don't know of any plans of adding support for 1-sided polygons
to povray (I'm not even sure how easy it is to make in raytracing).
(I think that many people here will answer you with the double_illuminate
thing, but I suppose that that was not what you are asking, but I think it's
that visibility thing. Correct me if I'm wrong.)
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp,
It is the visibility thing that I am concerned about. And as far as
implimenting a raytracer, its very easy to make it one sided or two.
Anyways, the reason I ask is becuase a sphere that I used my program to
convert from another format to pov, only shows half of the polygons. I know
for a fact that the other program that writes this format does not care
about winding.
Jason
"Warp" <war### [at] tag povray org> wrote in message
news:39730dfc@news.povray.org...
> Jason Miller <jas### [at] pinheiro tcimet net> wrote:
> : Does Povray care about the winding of a mesh? As in, does it use 1
sided or
> : 2 sided polygons? If it uses one sided, how can this be set to 2 sided?
>
> I suppose that a 1-sided polygon is (like, for example, in OpenGL) a
polygon
> that is seen only from one side. If the polygon is turned so that the
other
> side faces the camera, then it's not rendered.
> Povray only uses 2-sided polygons (ie. they are rendered now matter how
they
> are rotated). I don't know of any plans of adding support for 1-sided
polygons
> to povray (I'm not even sure how easy it is to make in raytracing).
>
> (I think that many people here will answer you with the
double_illuminate
> thing, but I suppose that that was not what you are asking, but I think
it's
> that visibility thing. Correct me if I'm wrong.)
>
> --
> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jason Miller wrote:
>
> Does Povray care about the winding of a mesh? As in, does it use 1
> sided or 2 sided polygons? If it uses one sided, how can this be set
> to 2 sided?
Triangles are two-sided, and the sides will be rendered differently if
there is a normal pattern applied.
For flat triangles the normal is derived from a cross-product of two
of the edge vectors (I presume) and therefore depends on the order the
vertices are defined.
For flat vectors the normal is derived by interpolation of the specified
vertex normals, and the order is unimportant.
Regards,
John
--
ICQ: 46085459
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jason Miller <jas### [at] pinheiro tcimet net> wrote:
: Warp,
: It is the visibility thing that I am concerned about. And as far as
: implimenting a raytracer, its very easy to make it one sided or two.
: Anyways, the reason I ask is becuase a sphere that I used my program to
: convert from another format to pov, only shows half of the polygons. I know
: for a fact that the other program that writes this format does not care
: about winding.
I can only think of two explanations here:
1. Your program is not exporting all the triangles for some reason, or is
exporting them badly.
2. Half of the triangles are shadowed in your scene and thus they are
(almost) black, as I suppose is your background? Try putting more light sources
to different sides of the scene to see if it helps.
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
John VanSickle <van### [at] erols com> wrote:
: For flat triangles the normal is derived from a cross-product of two
: of the edge vectors (I presume) and therefore depends on the order the
: vertices are defined.
I think it doesn't matter which side the normal is pointing to (as in any
other surface in povray). This specially doesn't matter with triangles since
they do not have interior.
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
>
> John VanSickle <van### [at] erols com> wrote:
> : For flat triangles the normal is derived from a cross-product of two
> : of the edge vectors (I presume) and therefore depends on the order
> : the vertices are defined.
>
> I think it doesn't matter which side the normal is pointing to (as
> in any other surface in povray). This specially doesn't matter with
> triangles since they do not have interior.
I tested this and it seems you're right; my memory is playing tricks on
me again.
Regards,
John
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3974264c@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> John VanSickle <van### [at] erols com> wrote:
> : For flat triangles the normal is derived from a cross-product of two
> : of the edge vectors (I presume) and therefore depends on the order the
> : vertices are defined.
>
> I think it doesn't matter which side the normal is pointing to (as in
> any other surface in povray). This specially doesn't matter with
> triangles since they do not have interior.
John VanSickle is right, the normal is derived using the cross-product
of the edge vectors.(or something like that) The "up" side of the
triangle is determined by the order of the vertices.
For lighting calculations, the normal is always flipped so it points to
the side the intersecting ray came from, so you don't notice a
difference. However, the real normal does matter if you are using
MegaPOV and interior_texture. I am not aware of any other places where
it matters...
--
Christopher James Huff - Personal e-mail: chr### [at] mac com
TAG(Technical Assistance Group) e-mail: chr### [at] tag povray org
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wasn't it Warp who wrote:
>Jason Miller <jas### [at] pinheiro tcimet net> wrote:
>: Does Povray care about the winding of a mesh? As in, does it use 1 sided or
>: 2 sided polygons? If it uses one sided, how can this be set to 2 sided?
>
> I suppose that a 1-sided polygon is (like, for example, in OpenGL) a polygon
>that is seen only from one side. If the polygon is turned so that the other
>side faces the camera, then it's not rendered.
> Povray only uses 2-sided polygons (ie. they are rendered now matter how they
>are rotated). I don't know of any plans of adding support for 1-sided polygons
>to povray (I'm not even sure how easy it is to make in raytracing).
I believe that 1-sided polygons are not possible in the current official
version of POVRay, but they can be achieved in MEGAPov by usng the
"interior_texture" keyword.
Every surface is considered to have an interior and an exterior (but
it's not always obvious which is which) and the interior_texture keyword
allows you to have a different texture on the two sides. If you make one
of these textures completely invisible {pigment {rgbt <1,1,1,1>}} then
you've got a 1-sided surface.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Chris Huff wrote:
>
> In article <3974264c@news.povray.org>, Warp <war### [at] tag povray org>
> wrote:
>
> > John VanSickle <van### [at] erols com> wrote:
> > : For flat triangles the normal is derived from a cross-product of
> > : two of the edge vectors (I presume) and therefore depends on the
> > : order the vertices are defined.
> >
> > I think it doesn't matter which side the normal is pointing to (as
> > in any other surface in povray). This specially doesn't matter with
> > triangles since they do not have interior.
>
> John VanSickle is right, the normal is derived using the cross-product
> of the edge vectors.(or something like that) The "up" side of the
> triangle is determined by the order of the vertices.
> For lighting calculations, the normal is always flipped so it points
> to the side the intersecting ray came from, so you don't notice a
> difference.
This is what I tested; the normal does indeed need to be flipped to
achieve this effect. I'm fairly sure this was done in a recent
version of POV-Ray; I distinctly remember having to reverse the order
of some defined points in order to get the normals pointed the right
way.
Regards,
John
--
ICQ: 46085459
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |