POV-Ray : Newsgroups : povray.advanced-users : bounded_by Server Time
30 Jun 2024 02:29:48 EDT (-0400)
  bounded_by (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
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

From: SharkD
Subject: Re: bounded_by
Date: 15 Jun 2010 13:45:28
Message: <4c17bc38$1@news.povray.org>
When using boxes as bounding objects, does it matter whether the boxes' 
edges are parallel to the coordinate axes or not?

-- 
http://isometricland.com


Post a reply to this message

From: clipka
Subject: Re: bounded_by
Date: 15 Jun 2010 17:08:35
Message: <4c17ebd3$1@news.povray.org>
Am 15.06.2010 19:45, schrieb SharkD:
> When using boxes as bounding objects, does it matter whether the boxes'
> edges are parallel to the coordinate axes or not?

Edges parallel to the coordinate axes will be best. But then again, if 
you ever think of rotating that object, you'll probably be better of 
with the best-fitting box you can think of.

I'm not sure - never looked at this part of the code - but I guess 
POV-Ray actually does not use the bounded_by object itself for bounding, 
but rather that object's own bounding box.


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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