I don't know if this is a problem or just me being stupid.
I started with an empty project and dropped down a default Sphere SOP.
I then added a Transform SOP to the output from the sphere and animated the rx and rz rotation channels. In frame 1 I set both rotations to 0 and then to 1000 in frame 240.
If I display just the wire frame bounding box and play the animation the bounding box grows and shrinks as the sphere rotates. The same thing happens if a bound SOP is added to the end of the network and displayed.
the bbox expression using D_YSIZE behaves the same.
It is my understanding that the bounding box should remain unchanged with side lengths of twice the radius throughout this test. Am I wrong? I was hoping to use bbox to recover the radius of the sphere later in the network.
I am using version 13.0.376
Problem with bounding boxes
10872 10 1- Apriori
- Member
- 13 posts
- Joined: March 2012
- Offline
- dan.baciu
- Member
- 30 posts
- Joined: Sept. 2010
- Offline
The default sphere is a “primitive” sphere, meaning that it is described by only a center position and a radius (what we see in the viewport is only a representation).
Given that the sphere is only a point, it becomes clear that the bounding box algorithm doesn't have enough data to work properly and gives erroneous results.
Try with a nurbs sphere for example, it should work much better.
Given that the sphere is only a point, it becomes clear that the bounding box algorithm doesn't have enough data to work properly and gives erroneous results.
Try with a nurbs sphere for example, it should work much better.
- Apriori
- Member
- 13 posts
- Joined: March 2012
- Offline
dan.baciu
The default sphere is a “primitive” sphere, meaning that it is described by only a center position and a radius (what we see in the viewport is only a representation).
Given that the sphere is only a point, it becomes clear that the bounding box algorithm doesn't have enough data to work properly and gives erroneous results.
Try with a nurbs sphere for example, it should work much better.
The same thing seems to happen no matter what type of sphere you select. ‘Primitive’ is by far the worst, but all the others show the problem to a lesser extent.
I don't think this is going to be a problem for me as I can create an attribute to hold the radius for later use.
- pezetko
- Member
- 392 posts
- Joined: Nov. 2008
- Offline
- Apriori
- Member
- 13 posts
- Joined: March 2012
- Offline
pezetko
Looks like bug in Transform SOP, because transform handle scales as well. If you do same rotation in VopSop the scale of bounding box doesn't pulse. BBox doesn't change a bit if Sphere type is Primitive and correctly match the sphere if type is set to polygon.
Good catch.
I just got fixated on bounding boxes and didn't think about the scaling in the transform. I just assumed that the transform SOP is so vital that it can't have a problem. Looks like this could be a bigger problem than I originally assumed.
It is getting late for me now (Thailand) so I will wait until the morning to test this.
Anybody know if SideFX are aware of a potential problem with transform?
- Sadjad Rabiee
- Member
- 1391 posts
- Joined: Dec. 2010
- Offline
I think this is not a problem or bug in the Transform SOP !
Different size of the Bounding Box in the different frames is logical ,Because we don't have really perfect sphere in the 3D ,each sphere made by connecting too many triangles or squares (Polygons) with together !
Exactly like rotating Cube instead of the Sphere !
like uploaded images .
So you can see this problem will fix , if we increase number of the polygons !
That sound's like Houdini convert NURBS and Primitive object to the polygon for computing Bounding Box.
Also I checked it in the Maya with same result !
Different size of the Bounding Box in the different frames is logical ,Because we don't have really perfect sphere in the 3D ,each sphere made by connecting too many triangles or squares (Polygons) with together !
Exactly like rotating Cube instead of the Sphere !
like uploaded images .
So you can see this problem will fix , if we increase number of the polygons !
That sound's like Houdini convert NURBS and Primitive object to the polygon for computing Bounding Box.
Also I checked it in the Maya with same result !
- Apriori
- Member
- 13 posts
- Joined: March 2012
- Offline
Nice analysis.
I have a small problem with it though. At any time all the points on the surface of the sphere can only be a maximum distance of one radius from the centre. This means that the bounding box can only be 2 radii a side or less (by your analysis). Unfortunately the size of the bounding box varies from a minimum of 2 up to a maximum of 3.45 radii (with the primitive circle)
Even so, a primitive sphere, being a perfect sphere, should not have this problem.
I am not worried about potential problems with the bounding box as it is easy to work around. A problem with the transform SOP has a greater potential to cause me, and others, problems. I am currently trying to rotate my circle with a VOP SOP to check that the bounding box problem goes away
as reported by pezetko.
I have a small problem with it though. At any time all the points on the surface of the sphere can only be a maximum distance of one radius from the centre. This means that the bounding box can only be 2 radii a side or less (by your analysis). Unfortunately the size of the bounding box varies from a minimum of 2 up to a maximum of 3.45 radii (with the primitive circle)
Even so, a primitive sphere, being a perfect sphere, should not have this problem.
I am not worried about potential problems with the bounding box as it is easy to work around. A problem with the transform SOP has a greater potential to cause me, and others, problems. I am currently trying to rotate my circle with a VOP SOP to check that the bounding box problem goes away
as reported by pezetko.
- Apriori
- Member
- 13 posts
- Joined: March 2012
- Offline
I have now analysed this problem as far as I intend to.
I had some misconceptions of what the radius of a circle means to Houdini. It is not, as I assumed, the distance to each point on a sphere but the distance to each primitive. Hence Joker86's analysis is correct. The more polygons you use to define the sphere the less the bounding box grows and shrinks as the sphere rotates.
I tried several methods of rotating the sphere and they all showed the same problem. I didn't find a method of rotating a primitive sphere using VOPs although I think it could be doable.
I don't think that the transform SOP has a scaling problem, I would assume that the sphere would grow and shrink if it did.
The only problem that I think that the bounding box has is with a rotating primitive sphere, it should be a special case. I don't know if SideFX would want to look into this. It is easy to workaround if not.
I had some misconceptions of what the radius of a circle means to Houdini. It is not, as I assumed, the distance to each point on a sphere but the distance to each primitive. Hence Joker86's analysis is correct. The more polygons you use to define the sphere the less the bounding box grows and shrinks as the sphere rotates.
I tried several methods of rotating the sphere and they all showed the same problem. I didn't find a method of rotating a primitive sphere using VOPs although I think it could be doable.
I don't think that the transform SOP has a scaling problem, I would assume that the sphere would grow and shrink if it did.
The only problem that I think that the bounding box has is with a rotating primitive sphere, it should be a special case. I don't know if SideFX would want to look into this. It is easy to workaround if not.
- Sadjad Rabiee
- Member
- 1391 posts
- Joined: Dec. 2010
- Offline
The Maya use Rotation of the Transformation Matrix for Bounding Box ,So your Bounding Box's size in the Maya is stable every time.
You can do same in the Houdini to prevent different size of the Bounding Box in different rotation ,Just turn on “Oriented Bounding Box” check box in the Bound SOP ,But your geometry type must be Polygon or Mesh :idea:
You can do same in the Houdini to prevent different size of the Bounding Box in different rotation ,Just turn on “Oriented Bounding Box” check box in the Bound SOP ,But your geometry type must be Polygon or Mesh :idea:
- Jack.N
- Member
- 72 posts
- Joined: March 2014
- Offline
- Sadjad Rabiee
- Member
- 1391 posts
- Joined: Dec. 2010
- Offline
Jack.N
Sorry Sadjad but you said before that you tested it in the Maya with same result.
So I tested it in the Maya too , But Maya rotating my Bounding Box according to Object's orientation ,How you can fix Bounding Box rotation in the Maya !?
You should rotating points of the sphere in the Maya , Not rotating Transformation Group !
To do that you should convert your animation to point Cache or another simple way is export rotating sphere with Alembic from Houdini to Maya ,Then check it's Bounding Box behavior in the Maya :wink:
-
- Quick Links