POV-Ray : Newsgroups : povray.advanced-users : Finding object's bounding box Server Time
23 Nov 2024 23:15:37 EST (-0500)
  Finding object's bounding box (Message 1 to 7 of 7)  
From: yesbird
Subject: Finding object's bounding box
Date: 1 Apr 2023 12:05:10
Message: <64285636@news.povray.org>
Hi,
I am working on Mike's fly lighting and animation now.
To simplify and To speed up this task, I am using my C4D->POV converter
for lights exporting, but I need some reference object in the C4D scene
to replace a fly (see attachments).

I can draw a BB box approximately, but if someone will show me the
way to calculate BB of arbitrary objects, I will be able to set up
lighting more accurately.

Thanks in advance.
--
YB


Post a reply to this message


Attachments:
Download 'fly_lights.png' (608 KB) Download 'fly.zip' (4749 KB)

Preview of image 'fly_lights.png'
fly_lights.png

From: ingo
Subject: Re: Finding object's bounding box
Date: 1 Apr 2023 13:50:00
Message: <web.64286e7f878e18a017bac71e8ffb8ce3@news.povray.org>
yesbird <sya### [at] gmailcom> wrote:

> I can draw a BB box approximately, but if someone will show me the
> way to calculate BB of arbitrary objects, I will be able to set up
> lighting more accurately.


from the docs on functions:

min_extent(OBJECT_IDENTIFIER), max_extent(OBJECT_IDENTIFIER). The min_extent and
max_extent return the minimum and maximum coordinates of a declared object's
bounding box (Corner1 and Corner2), in effect allowing you to find the
dimensions and location of the object.


ingo


Post a reply to this message

From: yesbird
Subject: Re: Finding object's bounding box
Date: 1 Apr 2023 13:56:20
Message: <dfc74466-449c-42b9-9725-0bf66fc29b7e@gmail.com>
On 01/04/2023 20:48, ingo wrote:
> from the docs on functions:
> 
> min_extent(OBJECT_IDENTIFIER), max_extent(OBJECT_IDENTIFIER). The min_extent and
> max_extent return the minimum and maximum coordinates of a declared object's
> bounding box (Corner1 and Corner2), in effect allowing you to find the
> dimensions and location of the object.

Thanks, ingo, this is exactly what I was expecting.
--
YB


Post a reply to this message

From: Alain Martel
Subject: Re: Finding object's bounding box
Date: 1 Apr 2023 18:52:22
Message: <6428b5a6$1@news.povray.org>
Le 2023-04-01 à 13:56, yesbird a écrit :
> On 01/04/2023 20:48, ingo wrote:
>> from the docs on functions:
>>
>> min_extent(OBJECT_IDENTIFIER), max_extent(OBJECT_IDENTIFIER). The 
>> min_extent and
>> max_extent return the minimum and maximum coordinates of a declared 
>> object's
>> bounding box (Corner1 and Corner2), in effect allowing you to find the
>> dimensions and location of the object.
> 
> Thanks, ingo, this is exactly what I was expecting.
> -- 
> YB
> 
> 
Remember that, when dealing with differences and intersections, the 
bounding box can be larger than the object.


Post a reply to this message

From: yesbird
Subject: Re: Finding object's bounding box
Date: 1 Apr 2023 19:00:47
Message: <c17eb5cc-db4d-b79b-b045-da76f626e7b6@gmail.com>
On 02/04/2023 01:52, Alain Martel wrote:
> Remember that, when dealing with differences and intersections, the 
> bounding box can be larger than the object.

Thanks, your comment will help me to avoid unpleasant surprises ).
--
YB


Post a reply to this message

From: jr
Subject: Re: Finding object's bounding box
Date: 2 Apr 2023 03:55:00
Message: <web.6429342b878e18a04301edef6cde94f1@news.povray.org>
hi,

yesbird <sya### [at] gmailcom> wrote:
> On 02/04/2023 01:52, Alain Martel wrote:
> > Remember that, when dealing with differences and intersections, the
> > bounding box can be larger than the object.
>
> Thanks, your comment will help me to avoid unpleasant surprises ).

sometimes a simple rotation will affect the bbox.  :-)  I wrote a macro to help
me with those.

<https://drive.google.com/file/d/1-ak9jRR7B6iNoQfchF_XMupNL6Wop5Oq/view?usp=sharing>


regards, jr.


Post a reply to this message

From: yesbird
Subject: Re: Finding object's bounding box
Date: 2 Apr 2023 10:11:37
Message: <8feb501b-b5d9-6d9c-eb57-d2e4b1489572@gmail.com>
On 02/04/2023 10:52, jr wrote:
> sometimes a simple rotation will affect the bbox.  :-)  I wrote a macro to help
> me with those.
> <https://drive.google.com/file/d/1-ak9jRR7B6iNoQfchF_XMupNL6Wop5Oq/view?usp=sharing>

Thanks, another pitfall avoided.
--
YB


Post a reply to this message

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