POV-Ray : Newsgroups : povray.binaries.images : Victorian House : Re: Victorian House Server Time
20 May 2024 18:24:36 EDT (-0400)
  Re: Victorian House  
From: clipka
Date: 12 Oct 2017 10:40:30
Message: <59df7ede$1@news.povray.org>
Am 12.10.2017 um 08:36 schrieb And:
> clipka <ano### [at] anonymousorg> wrote:
>> Am 11.10.2017 um 16:35 schrieb And:
>>
>>>>> So I see that it states an "inside_vector <0,0,1> "(from poseray) in the last
>>>>> item in each mesh2 object. It does not contain sufficient information.
>>>>
>>>> With that statement, the mesh should work fine in CSG difference (or
>>>> intersection or union, for that matter).
>>>>
>>>> Not sure what you mean by "it does not contain sufficient information".
>>>
>>> Because there is just one vector <0,0,1> at the end, I suppose that it should
>>> be a lot of vectors. Maybe each face have one vector, and should vary from face
>>> to face, I don't know。。。 I suppose it should look like
>>> that.
>>
>> No; there is only one `inside_vector` per mesh; it tells POV-Ray that in
>> order to test whether a given point is inside the mesh or not, it should
>> shoot a ray in the direction specified by that parameter, and count the
>> number of surfaces encountered in that direction. If the count is odd,
>> the point must be inside the mesh; if the count is even, the point must
>> be outside.
> 
> Well, that it seems poseray adds a symbolic vector, because <0,0,1> does not
> inside my model in fact. And it shouldn't get such an information because the
> mesh was output from sketchup it does not contain that, moreover most of the
> mesh 3d model does not have a well construct that contain a inside/ outside
> distinction.

As described above, `inside_vector` does not specify a location, but
rather a direction (in this case parallel to the z axis).

The "given point" mentioned above will arise from the rendering
algorithm, more specifically the algorithm used to render CSG
differences, intersections or merges. As part of this algorithm, POV-Ray
frequently needs to answer the question, "this point I've found on the
surface of object A, is it inside or outside object B?"

The procedure I described earlier, which makes use of `inside_vector` as
a direction, is how POV-Ray tries to answers this question for cases
where object B is a mesh (or mesh2).


Post a reply to this message

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