POV-Ray : Newsgroups : povray.binaries.images : Ha...help Server Time
7 Nov 2024 09:29:26 EST (-0500)
  Ha...help (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: And
Subject: Ha...help
Date: 4 Aug 2016 11:35:00
Message: <web.57a3603e6a1421c657a339410@news.povray.org>
Hi, I have heard that POV_Ray can add mesh(solid) to CSG so I tried to
difference a torus mesh export from Blender but it seems not ok.


Post a reply to this message


Attachments:
Download 'scene difference.png' (226 KB)

Preview of image 'scene difference.png'
scene difference.png


 

From: And
Subject: Re: Ha...help
Date: 4 Aug 2016 11:45:00
Message: <web.57a362f7dfd6fa8057a339410@news.povray.org>
Why?



here is a union version. It's ok.


Post a reply to this message


Attachments:
Download 'scene union.png' (222 KB)

Preview of image 'scene union.png'
scene union.png


 

From: And
Subject: Re: Ha...help
Date: 4 Aug 2016 12:35:00
Message: <web.57a36e67dfd6fa8057a339410@news.povray.org>
"And" <49341109@ntnu.edu.tw> wrote:
> Hi, I have heard that POV_Ray can add mesh(solid) to CSG so I tried to
> difference a torus mesh export from Blender but it seems not ok.

I create it in Blender. A new torus, then export an .obj, then using poseray to
put into POV-Ray. That's all. I don't know what mistake I did.


Post a reply to this message

From: clipka
Subject: Re: Ha...help
Date: 4 Aug 2016 12:40:28
Message: <57a36ffc$1@news.povray.org>
Am 04.08.2016 um 17:44 schrieb And:
> Why?
> here is a union version. It's ok.

Union is special among the CSG operations in that it works fine with
non-solid objects. All other CSG operations need solid objects to work
properly.

To POV-Ray, "solid" means that there is a method to test whether any
given point is inside or outside a shape. The normal ray tracing
algorithm does not need such a test, since the only thing it cares about
is surfaces. Likewise, unions do not need such a test, since they do not
change what surfaces are rendered. Merge, difference, intersection and
clipped_by, on the other hand, work by selectively suppressing portions
of an object's surface depending on which other objects they're inside
-- and that's where the insideness test is crucial.

For meshes, the insideness test is implemented by tracing a ray from the
point in question in an arbitrary direction, and counting how many times
that ray intersects the object's surface. An odd number of intersections
indicates that the point in question is inside, while an even number
indicates that it is outside. For this algorithm to work properly, two
conditions must be met:

- The mesh must be properly closed (i.e. each and every triangle must
precisely share each of its edges with an odd number of other triangles).

- The "arbitrary direction" needs to be chosen. This is not done
automatically, but instead requires the use of the `inside_vector`
keyword, with a non-zero vector. (The actual direction does not normally
matter; however, if the vector happens to be almost but not quite
parallel to one of the triangles, there is a slight chance that
artifacts may occur, especially if that triangle is particularly large.)


Post a reply to this message

From: And
Subject: Re: Ha...help
Date: 5 Aug 2016 01:25:01
Message: <web.57a422f4dfd6fa8057a339410@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 04.08.2016 um 17:44 schrieb And:
> > Why?
> > here is a union version. It's ok.
>
> Union is special among the CSG operations in that it works fine with
> non-solid objects. All other CSG operations need solid objects to work
> properly.
>
> To POV-Ray, "solid" means that there is a method to test whether any
> given point is inside or outside a shape. The normal ray tracing
> algorithm does not need such a test, since the only thing it cares about
> is surfaces. Likewise, unions do not need such a test, since they do not
> change what surfaces are rendered. Merge, difference, intersection and
> clipped_by, on the other hand, work by selectively suppressing portions
> of an object's surface depending on which other objects they're inside
> -- and that's where the insideness test is crucial.
>
> For meshes, the insideness test is implemented by tracing a ray from the
> point in question in an arbitrary direction, and counting how many times
> that ray intersects the object's surface. An odd number of intersections
> indicates that the point in question is inside, while an even number
> indicates that it is outside. For this algorithm to work properly, two
> conditions must be met:
>
> - The mesh must be properly closed (i.e. each and every triangle must
> precisely share each of its edges with an odd number of other triangles).
>
> - The "arbitrary direction" needs to be chosen. This is not done
> automatically, but instead requires the use of the `inside_vector`
> keyword, with a non-zero vector. (The actual direction does not normally
> matter; however, if the vector happens to be almost but not quite
> parallel to one of the triangles, there is a slight chance that
> artifacts may occur, especially if that triangle is particularly large.)


Mmm... ok. Sounds that I need do this in another way.
Heee


Post a reply to this message

From: Bald Eagle
Subject: Re: Ha...help
Date: 5 Aug 2016 08:30:01
Message: <web.57a486b6dfd6fa80b488d9aa0@news.povray.org>
"And" <49341109@ntnu.edu.tw> wrote:

> Mmm... ok. Sounds that I need do this in another way.
> Heee

No, you just need to edit your mesh file and add

inside_vector <0, 0, 0> (or another vector) to your mesh definition.

http://www.povray.org/documentation/view/3.6.0/292/


Post a reply to this message

From: Jim Holsenback
Subject: Re: Ha...help
Date: 5 Aug 2016 08:37:06
Message: <57a48872$1@news.povray.org>
On 8/5/2016 8:29 AM, Bald Eagle wrote:
> "And" <49341109@ntnu.edu.tw> wrote:
>
>> Mmm... ok. Sounds that I need do this in another way.
>> Heee
>
> No, you just need to edit your mesh file and add
>
> inside_vector <0, 0, 0> (or another vector) to your mesh definition.

IIRC the OP mentioned using poseray which does that if I'm not mistaken 
... for my current project I'm using blender->poseray->povray. I just 
checked indeed that's already present


Post a reply to this message

From: Le Forgeron
Subject: Re: Ha...help
Date: 5 Aug 2016 09:47:19
Message: <57a498e7@news.povray.org>
Le 05/08/2016 à 14:36, Jim Holsenback a écrit :
> On 8/5/2016 8:29 AM, Bald Eagle wrote:
>> "And" <49341109@ntnu.edu.tw> wrote:
>>
>>> Mmm... ok. Sounds that I need do this in another way.
>>> Heee
>>
>> No, you just need to edit your mesh file and add
>>
>> inside_vector <0, 0, 0> (or another vector) to your mesh definition.
>
> IIRC the OP mentioned using poseray which does that if I'm not mistaken
> ... for my current project I'm using blender->poseray->povray. I just
> checked indeed that's already present
>

<0,0,0> is the only 100% BAD value.

Remember inside_vector is not a position, it's a direction.


Post a reply to this message

From: And
Subject: Re: Ha...help
Date: 5 Aug 2016 10:00:01
Message: <web.57a49b9fdfd6fa8057a339410@news.povray.org>
Le_Forgeron <lef### [at] freefr> wrote:
> Le 05/08/2016 à 14:36, Jim Holsenback a écrit :
> > On 8/5/2016 8:29 AM, Bald Eagle wrote:
> >> "And" <49341109@ntnu.edu.tw> wrote:
> >>
> >>> Mmm... ok. Sounds that I need do this in another way.
> >>> Heee
> >>
> >> No, you just need to edit your mesh file and add
> >>
> >> inside_vector <0, 0, 0> (or another vector) to your mesh definition.
> >
> > IIRC the OP mentioned using poseray which does that if I'm not mistaken
> > ... for my current project I'm using blender->poseray->povray. I just
> > checked indeed that's already present
> >
>
> <0,0,0> is the only 100% BAD value.
>
> Remember inside_vector is not a position, it's a direction.

Look. To no avail.


Post a reply to this message

From: Alain
Subject: Re: Ha...help
Date: 5 Aug 2016 12:34:50
Message: <57a4c02a$1@news.povray.org>

> "And" <49341109@ntnu.edu.tw> wrote:
>
>> Mmm... ok. Sounds that I need do this in another way.
>> Heee
>
> No, you just need to edit your mesh file and add
>
> inside_vector <0, 0, 0> (or another vector) to your mesh definition.
>
> http://www.povray.org/documentation/view/3.6.0/292/
>

It can't be a null vector and <0,0,0> IS a null vector.
It should be inside_vector<1,1,1>
If you get artifacts, change one of the values by a small amount and try 
again.


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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