POV-Ray : Newsgroups : povray.general : mesh2 solid object question : Re: mesh2 solid object question Server Time
30 Jul 2024 00:31:25 EDT (-0400)
  Re: mesh2 solid object question  
From: Alain
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

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