POV-Ray : Newsgroups : povray.advanced-users : Bounding Box issue Server Time
26 Dec 2024 09:13:41 EST (-0500)
  Bounding Box issue (Message 1 to 6 of 6)  
From: McHannemann
Subject: Bounding Box issue
Date: 5 May 2006 16:30:00
Message: <web.445bb51d799abadad4d329280@news.povray.org>
Hi I tried to use min_extent and max_extent for a object I want
to drop on several others, the issue is that the result is only
a small part of it in the middle, is there any macro/function
available which is more succesful?

Regards,

Thor


Post a reply to this message

From: Florian Brucker
Subject: Re: Bounding Box issue
Date: 5 May 2006 17:59:06
Message: <445bcaaa$1@news.povray.org>
If min_extent and max_extent don't give you the right results, then 
you're object wouldn't be rendered correctly, either. So I guess that 
not these functions, but the rest of your code is the problem. Perhaps 
you can show us the relevant parts?


HTH,
Florian


Post a reply to this message

From: McHannemann
Subject: Re: Bounding Box issue
Date: 6 May 2006 04:40:01
Message: <web.445c60d49ee0a6791b541b390@news.povray.org>
ok,
here are the nominees ;-)

first the object to drop on is a mesh heightfield, I used a simple version
of a rectangle to define the area...:
#declare OBCollision = mesh2 {
 vertex_vectors
{4,<1,4.80723e-007,1>,<-1,2.14342e-007,1>,<-1,1.82865e-007,-1>,<1,3.50524e-007,-1>
}
 normal_vectors
{4,<-1.3319e-007,1,-1.57385e-008>,<-1.3319e-007,1,-1.57385e-008>,<-1.3319e-007,1,-1.57385e-008>,<-1.3319e-007,1,-1.5738
5e-008>
}
 texture_list { 1, texture{blender_default_tex}}
 face_indices { 2,<0,1,2>,0,<2,3,0>,0}
 normal_indices {0}
 matrix <18.9097,0,0,0,18.9097,0,0,0,22.1856,-2.29326,-1.36449,9.97583>}

and then I defined the function to drop on:
#declare Object = object{OBCollision};
#declare MinBox = min_extent(Object);
#declare MaxBox = max_extent(Object);

and this is the result of the drop on function I use:
http://img69.imageshack.us/img69/5162/bug0015cw.jpg

I hope you guyz are able to help me,
by the way the object(Mesh Heightfield) is properly recognized by
makesnow.inc

regards,

Thor


Post a reply to this message

From: Mike Williams
Subject: Re: Bounding Box issue
Date: 6 May 2006 05:36:59
Message: <5xl9DAA34GXEFw3A@econym.demon.co.uk>
Wasn't it McHannemann who wrote:
>ok,
>here are the nominees ;-)
>
>first the object to drop on is a mesh heightfield, I used a simple version
>of a rectangle to define the area...:
>#declare OBCollision = mesh2 {
> vertex_vectors
>{4,<1,4.80723e-007,1>,<-1,2.14342e-007,1>,<-1,1.82865e-007,-1>,<1,3.50524e-
>007,-1>
>}
> normal_vectors
>{4,<-1.3319e-007,1,-1.57385e-008>,<-1.3319e-007,1,-1.57385e-008>,<-1.3319e-
>007,1,-1.57385e-008>,<-1.3319e-007,1,-1.5738
>5e-008>
>}
> texture_list { 1, texture{blender_default_tex}}
> face_indices { 2,<0,1,2>,0,<2,3,0>,0}
> normal_indices {0}
> matrix <18.9097,0,0,0,18.9097,0,0,0,22.1856,-2.29326,-1.36449,9.97583>}
>
>and then I defined the function to drop on:
>#declare Object = object{OBCollision};
>#declare MinBox = min_extent(Object);
>#declare MaxBox = max_extent(Object);
>
>and this is the result of the drop on function I use:
>http://img69.imageshack.us/img69/5162/bug0015cw.jpg
>
>I hope you guyz are able to help me,
>by the way the object(Mesh Heightfield) is properly recognized by
>makesnow.inc

It's easy to show that the object is inside its bounding box. Just do
this:

#declare BBox = box {MinBox,MaxBox pigment {rgb x}}

difference {
  object {OBCollision}
  object {BBox}
}

This displays all the parts of the object that are outside the bounding
box, and the resulting render is completely blank. The object is
completely inside the bounding box.

Whatever's going wrong with your later processing can't be blamed on
min_extent and max_extent problems.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: McHannemann
Subject: Re: Bounding Box issue
Date: 6 May 2006 09:30:00
Message: <web.445ca4659ee0a6791b541b390@news.povray.org>
Hi Mike,
I just wondered too what happens there,
makesnow gets the object sorted properly,
so I will compare the two macros,

regards,


Thor


Post a reply to this message

From: McHannemann
Subject: Re: Bounding Box issue
Date: 6 May 2006 11:40:00
Message: <web.445cc2d99ee0a6791b541b390@news.povray.org>
After comparing the macros and figuring that there was no
difference in the lines, I reinstalled PovRay and it was fine
after that, kinda weird to be honest.

THor


Post a reply to this message

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