POV-Ray : Newsgroups : povray.general : mesh2 solid object question Server Time
4 Nov 2024 21:22:08 EST (-0500)
  mesh2 solid object question (Message 1 to 5 of 5)  
From: freddy
Subject: mesh2 solid object question
Date: 9 Feb 2010 07:50:01
Message: <web.4b7159565e66db4be78752f00@news.povray.org>
Hi,

I am sure that this is often asked

I have a surface object which I can describe with mesh2. I want to make this a
solid object at least I want the mes2 surface to project as a solid surface to
-infinity

any hints and tips - much appreciated!!

Cheers


Post a reply to this message

From: Warp
Subject: Re: mesh2 solid object question
Date: 9 Feb 2010 10:38:17
Message: <4b718169@news.povray.org>
freddy <fre### [at] yahoocom> wrote:
> I have a surface object which I can describe with mesh2. I want to make this a
> solid object at least I want the mes2 surface to project as a solid surface to
> -infinity

  You mean it's an open surface, but you want one of the sides to be
considered "inside" in CSG operations (in the same way as eg. heightfields)?

  Meshes are made into solids using the inside_vector directive, and it
should work in this case as well. You just have to be careful with its
orientation: You have to orient it so that it points towards the non-inside
part of the mesh.

  (Eg. if your mesh is an open surface on the xz plane and you want everything
below it to be considered "inside", then a "inside_vector y" should do it.)

-- 
                                                          - Warp


Post a reply to this message

From: freddy
Subject: Re: mesh2 solid object question
Date: 17 Feb 2010 05:50:01
Message: <web.4b7bc96eeb02e559e78752f00@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> freddy <fre### [at] yahoocom> wrote:
> > I have a surface object which I can describe with mesh2. I want to make this a
> > solid object at least I want the mes2 surface to project as a solid surface to
> > -infinity
>
>   You mean it's an open surface, but you want one of the sides to be
> considered "inside" in CSG operations (in the same way as eg. heightfields)?
>
>   Meshes are made into solids using the inside_vector directive, and it
> should work in this case as well. You just have to be careful with its
> orientation: You have to orient it so that it points towards the non-inside
> part of the mesh.
>
>   (Eg. if your mesh is an open surface on the xz plane and you want everything
> below it to be considered "inside", then a "inside_vector y" should do it.)
>
> --
>                                                           - Warp

Thanks very much warp.

Sorry for not getting back sooner - I have been busy with other things and ot
had much time to play with this (apologies).

For the time being I am going to construct a surface by using the intersection
of a plane and a prism. It seems to be doing the quite well for a first pass.

I appreciate that this method is limited somewhat in terms of using normals etc.
in order to refine the final rendered quality but for my current development
phase it is allowing me to make progress quickly and I can loop back later and
refine the method to do this.

Incidentally can a mesh2 and a prism be intersected in the same way to provide a
solid surface (ala heightfield)?

Cheers


Post a reply to this message

From: Alain
Subject: Re: mesh2 solid object question
Date: 17 Feb 2010 19:50:49
Message: <4b7c8ee9$1@news.povray.org>

> Warp<war### [at] tagpovrayorg>  wrote:
>> freddy<fre### [at] yahoocom>  wrote:
>>> I have a surface object which I can describe with mesh2. I want to make this a
>>> solid object at least I want the mes2 surface to project as a solid surface to
>>> -infinity
>>
>>    You mean it's an open surface, but you want one of the sides to be
>> considered "inside" in CSG operations (in the same way as eg. heightfields)?
>>
>>    Meshes are made into solids using the inside_vector directive, and it
>> should work in this case as well. You just have to be careful with its
>> orientation: You have to orient it so that it points towards the non-inside
>> part of the mesh.
>>
>>    (Eg. if your mesh is an open surface on the xz plane and you want everything
>> below it to be considered "inside", then a "inside_vector y" should do it.)
>>
>> --
>>                                                            - Warp
>
> Thanks very much warp.
>
> Sorry for not getting back sooner - I have been busy with other things and ot
> had much time to play with this (apologies).
>
> For the time being I am going to construct a surface by using the intersection
> of a plane and a prism. It seems to be doing the quite well for a first pass.
>
> I appreciate that this method is limited somewhat in terms of using normals etc.
> in order to refine the final rendered quality but for my current development
> phase it is allowing me to make progress quickly and I can loop back later and
> refine the method to do this.
>
> Incidentally can a mesh2 and a prism be intersected in the same way to provide a
> solid surface (ala heightfield)?
>
> Cheers
>
>
>
>

You can use a mesh/mesh2 in an intersection or difference, but it needs 
to be given an interior_vector. With that vector, the mesh, even an open 
one, can be used as a regular object in CSG operations.

Be wary that an open mesh can give you some strange or unexpected results.

If the result shows artefacts, you can slightly change the orientation 
of the inside_vector. This can appen when the inside_vector is parallel 
to a triangle of the mesh and changint it's direction can resolve the 
problem.


Alain


Post a reply to this message

From: freddy
Subject: Re: mesh2 solid object question
Date: 24 Feb 2010 07:30:01
Message: <web.4b851adaeb02e559e78752f00@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:

> > Warp<war### [at] tagpovrayorg>  wrote:
> >> freddy<fre### [at] yahoocom>  wrote:
> >>> I have a surface object which I can describe with mesh2. I want to make this a
> >>> solid object at least I want the mes2 surface to project as a solid surface to
> >>> -infinity
> >>
> >>    You mean it's an open surface, but you want one of the sides to be
> >> considered "inside" in CSG operations (in the same way as eg. heightfields)?
> >>
> >>    Meshes are made into solids using the inside_vector directive, and it
> >> should work in this case as well. You just have to be careful with its
> >> orientation: You have to orient it so that it points towards the non-inside
> >> part of the mesh.
> >>
> >>    (Eg. if your mesh is an open surface on the xz plane and you want everything
> >> below it to be considered "inside", then a "inside_vector y" should do it.)
> >>
> >> --
> >>                                                            - Warp
> >
> > Thanks very much warp.
> >
> > Sorry for not getting back sooner - I have been busy with other things and ot
> > had much time to play with this (apologies).
> >
> > For the time being I am going to construct a surface by using the intersection
> > of a plane and a prism. It seems to be doing the quite well for a first pass.
> >
> > I appreciate that this method is limited somewhat in terms of using normals etc.
> > in order to refine the final rendered quality but for my current development
> > phase it is allowing me to make progress quickly and I can loop back later and
> > refine the method to do this.
> >
> > Incidentally can a mesh2 and a prism be intersected in the same way to provide a
> > solid surface (ala heightfield)?
> >
> > Cheers
> >
> >
> >
> >
>
> You can use a mesh/mesh2 in an intersection or difference, but it needs
> to be given an interior_vector. With that vector, the mesh, even an open
> one, can be used as a regular object in CSG operations.
>
> Be wary that an open mesh can give you some strange or unexpected results.
>
> If the result shows artefacts, you can slightly change the orientation
> of the inside_vector. This can appen when the inside_vector is parallel
> to a triangle of the mesh and changint it's direction can resolve the
> problem.
>
>
> Alain


Hi Alain,


I tried a very simple triangle surface described by a mesh2 and then rendereded
this with the intersection of a prism and the results were quite horrible - lots
of white speckle

any ideas?

I tried

<0,0.5,0>,<1,0.5,0>,<1,0.5,1>

as the mesh2 and

<0,0>,<1,0>,<1,1>,<0,0> add the prism

this renders horribly much worse that the intersection than a plane and a prism

any idead?

cheers


Post a reply to this message

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