POV-Ray : Newsgroups : povray.advanced-users : bounded_by Server Time
23 Dec 2024 12:29:57 EST (-0500)
  bounded_by (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: SharkD
Subject: bounded_by
Date: 14 Jun 2010 18:01:35
Message: <4c16a6bf$1@news.povray.org>
Suppose I have the following CSG object:

   difference
   {
     object {obj1}
     object {obj2}
   }

Is there any benefit to adding a bounded_by statement like the following 
where one of the objects is simply duplicated?

   difference
   {
     object {obj1}
     object {obj2}
     bounded_by {obj1}
   }

-- 
http://isometricland.com


Post a reply to this message

From: Alain
Subject: Re: bounded_by
Date: 14 Jun 2010 18:45:33
Message: <4c16b10d$1@news.povray.org>
Le 2010-06-14 18:01, SharkD a écrit :
> Suppose I have the following CSG object:
>
> difference
> {
> object {obj1}
> object {obj2}
> }
>
> Is there any benefit to adding a bounded_by statement like the following
> where one of the objects is simply duplicated?
>
> difference
> {
> object {obj1}
> object {obj2}
> bounded_by {obj1}
> }
>

It depends.
If Obj1 only have a relatively small part removed and Obj2 is relatively 
large, like a large sphere, and Obj1 is comparatively small, it can 
restrict the bounding box back to a more resonable dimention.

It's not realy helpfull if Obj2 is small and simple, or is already 
located totaly inside Obj1's bounding box.


Alain


Post a reply to this message

From: Alain
Subject: Re: bounded_by
Date: 14 Jun 2010 19:09:14
Message: <4c16b69a$1@news.povray.org>
Le 2010-06-14 18:01, SharkD a écrit :
> Suppose I have the following CSG object:
>
> difference
> {
> object {obj1}
> object {obj2}
> }
>
> Is there any benefit to adding a bounded_by statement like the following
> where one of the objects is simply duplicated?
>
> difference
> {
> object {obj1}
> object {obj2}
> bounded_by {obj1}
> }
>

It's probably related to your spinner colony.
If you remove a cylindrical piece from a building, you bounding box will 
encompass the building AND the complete cylinder. In that case, YES, 
you'll get some, possibly large, performance improvement.

Also, if you start with a large cylinder, remove an almost as large one 
to get a curved floor, then chop away the sides to only keep the 
buildin's floor, manual bounding with a box can greatly help you.


Alain


Post a reply to this message

From: clipka
Subject: Re: bounded_by
Date: 14 Jun 2010 20:57:17
Message: <4c16cfed$1@news.povray.org>
Am 15.06.2010 00:01, schrieb SharkD:

> Is there any benefit to adding a bounded_by statement like the following
> where one of the objects is simply duplicated?
>
> difference
> {
> object {obj1}
> object {obj2}
> bounded_by {obj1}
> }

No. At best it has no effect; at worst it may even be slower.


Post a reply to this message

From: clipka
Subject: Re: bounded_by
Date: 14 Jun 2010 21:06:52
Message: <4c16d22c$1@news.povray.org>
Am 15.06.2010 01:09, schrieb Alain:

> It's probably related to your spinner colony.
> If you remove a cylindrical piece from a building, you bounding box will
> encompass the building AND the complete cylinder. In that case, YES,
> you'll get some, possibly large, performance improvement.

Actually no - POV-Ray is smarter than that (at least since version 3.6, 
don't know about earlier ones).

The difference between an object obj1 and another object obj2 is 
modelled as the intersection between obj1 and the inverse of obj2; 
intersections' bounding boxes are computed as the intersection of all 
member objects' bounding boxes, i.e. if obj1 has any bounding box at 
all, then POV-Ray will never make the CSG's bounding box any bigger than 
that.


Post a reply to this message

From: SharkD
Subject: Re: bounded_by
Date: 14 Jun 2010 21:57:14
Message: <4c16ddfa$1@news.povray.org>
On 6/14/2010 8:57 PM, clipka wrote:
> Am 15.06.2010 00:01, schrieb SharkD:
>
>> Is there any benefit to adding a bounded_by statement like the following
>> where one of the objects is simply duplicated?
>>
>> difference
>> {
>> object {obj1}
>> object {obj2}
>> bounded_by {obj1}
>> }
>
> No. At best it has no effect; at worst it may even be slower.

Thank you.

Can I use meshes inside bounded_by statements? I just did a quick test 
and got an "Illegal texture or patch in clip, bound or object pattern" 
error, so I'm assuming no.

-- 
http://isometricland.com


Post a reply to this message

From: SharkD
Subject: Re: bounded_by
Date: 14 Jun 2010 22:04:45
Message: <4c16dfbd@news.povray.org>
On 6/14/2010 8:57 PM, clipka wrote:

Also, in what order does POV-Ray parse the bounded_by statements?

// step 1
intersection
{
	// step 2
	difference
	{
		// step 3
		intersection
		{
			bounded_by {...}
		}
		intersection
		{
			bounded_by {...}
		}
		bounded_by {...}
	}
	difference
	{
		intersection
		{
			bounded_by {...}
		}
		intersection
		{
			bounded_by {...}
		}
		bounded_by {...}
	}
	bounded_by {...}
}

-- 
http://isometricland.com


Post a reply to this message

From: clipka
Subject: Re: bounded_by
Date: 14 Jun 2010 22:15:04
Message: <4c16e228@news.povray.org>
Am 15.06.2010 03:57, schrieb SharkD:

> Can I use meshes inside bounded_by statements? I just did a quick test
> and got an "Illegal texture or patch in clip, bound or object pattern"
> error, so I'm assuming no.

Did you specify an inside_vector? I guess that POV-Ray will only accept 
proper solids for bounding; meshes are considered solid only when you 
specify an inside_vector.


Post a reply to this message

From: clipka
Subject: Re: bounded_by
Date: 14 Jun 2010 22:15:51
Message: <4c16e257$1@news.povray.org>
Am 15.06.2010 04:04, schrieb SharkD:
> On 6/14/2010 8:57 PM, clipka wrote:
>
> Also, in what order does POV-Ray parse the bounded_by statements?

Innermost objects first.


Post a reply to this message

From: SharkD
Subject: Re: bounded_by
Date: 15 Jun 2010 13:44:37
Message: <4c17bc05$1@news.povray.org>
On 6/14/2010 10:15 PM, clipka wrote:
> Am 15.06.2010 03:57, schrieb SharkD:
>
>> Can I use meshes inside bounded_by statements? I just did a quick test
>> and got an "Illegal texture or patch in clip, bound or object pattern"
>> error, so I'm assuming no.
>
> Did you specify an inside_vector? I guess that POV-Ray will only accept
> proper solids for bounding; meshes are considered solid only when you
> specify an inside_vector.

Yes, it has an inside vector and works fine in CSG operations. I also 
get the occasional "Patch objects not allowed in intersections" error, 
though I haven't noticed any negative effects (yet).

-- 
http://isometricland.com


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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