Lecture 9: Ray Tracing & Acceleration Structures (28)
jananisriram
I'm wondering what the statement "If it doesn't hit the volume, it doesn't hit the object" means in this context. Given the diagrams below, it seems like we want to draw a strict bounding box around the image; do we determine that with the shape of the image, or can we choose the shape, like a rectangle or circle?
Staffteles-sun
Hi @jananisriram. Good question! In this context, it's saying that if the ray doesn't even hit the outer bounding volume, then it has no chance of hitting the object. We want to draw strict (or stricter) bounding boxes because the larger the box, the larger chance it is for the ray to hit it (without actually hitting the object). Hence, we want the box to fit the object as tight as possible.
In terms of shape, any regular shapes could work. We what the volume to be simple enough such that it's easy for us to test ray intersections.
SuryaTalla22
In this context, it seems that what we are saying is that although the explicit ray calculations will be more precise, the benefit in terms of speed of using a bounding volume outweighs the marginal inaccuracy.
GarciaEricS
In class, we talked about how using an axis aligned bounding box is best because the computation for figuring out whether we hit a bounding box is much easier. Would it maybe be possible to do some sort of change of basis to align our basis with the axes of the bounding boxes that are most common? For example, if all of the smallest bounding boxes are at 45 degree angles, could we not shift of basis so that those become aligned with the axes, and we have an easy computation?
yangbright-2001
The bounding volume is more regular in shape, making the computation more easier. The bounding volume serves as an "upper bound" of the object, if the light cannot hit the "upper bound" (the computation of whether this "upper bound" can be hit is more easier), it will never hit the object
llejj
Do we always use convex bounding volumes?
DestinyLuong
I think the bounding volume here is a 3D version of what we did in HW 1, where we had a bounding box for the triangle. Essentially we are using it to save on time and computations as we don't have to consider anything that is outside of the bounding volume. Similar, to how we didn't have to care about the pixels, and only did computations on pixels within the triangle's bounding box.
sebzhao
Is there a best bounding volume shape to use empirically? It seems like there's tradeoffs between different shapes but also it seems to depend on the actual object.
weinatalie
This reminds me a lot of task 1 from the first homework, where we only rasterized pixels that were within the bounding box of the triangle. One of the ways my partner and I optimized our implementation was checking whether or not the pixel was within the actual triangle itself, not just the bounding box. Using this approach gave us really hefty speedups, and I wonder if this optimization would be possible for more complex objects. Though, the computational overhead required to calculate this for something like a teapot would likely outweigh the computational cost of the simpler bounding box approach anyway.
etam1
I find it fascinating how the use of the bounding volume idea is able to streamline computational processes and also even rendering time. I remember in homework one where we bound the triangle's mins and maxes in order to make our program run way quicker. I also find it cool how this doesn't compromise accuracy. I do wonder how graphic engines or programmers bound objects that changes size or moves.
spegeerino
I was initially wondering if it's ever faster to bound by some 3d polyhedron with fewer sides than a rectangular prism, but I don't think it is. The bounding box is really good at speeding up the containment question once we find the ray-plane intersection, and if it's grid-aligned it's even better, so I assume that in most cases the grid-aligned bounding box is the way to go. Although, maybe all of these computations are utterly trivial when compared to having to check each triangle, so it's better to have a tighter fit to an object and use a few extra polygons than to skimp out here and have to end up doing ray intersection for every triangle in the object. Is there a LOD idea where there are several low-poly versions of objects that can be used iteratively for ray-plane intersection tests, and therefore avoid as much unnecessary computation as possible?
carolyn-wang
I'm curious how bounding volumes are still able to improve object segmentation in scenes with varying lighting, visibility, occlusions. If there are changes to scene conditions, then are there algorithms to update bounding volume parameters in real-time or to changes in object dimensions?
grafour
Would it be more efficient if we split up the teapot and found a bounding box for each region? I feel like it would. But that may also involve division which may take up more resources.
s3kim2018
The 3rd image has a teapot incased in a circle. I think for some images, we can try different shapes that minimizes the bounding box, and check if there are any points outside the sample shape (this will be a constant time operation, since we already have the bounding x,y limits of the shape). We could try a circle, diamond, and if everything else doesn't work, a rectangle. This can cut down on sampling complexity.
nicolel828
For bounding volumes, is their main purpose to make finding intersections easier? Are they to organize components? Also if the object were to rotate within the bounding volume, does the volume rotate with the object as well?
andrewn3672
Bounding volumes is a super simple and intuitive way to understand how to speed up ray tracing. Instead of checking a bunch of empty space, we can easily narrow down on what we actually need to intersect with.
eugenek07
Bounding volumes seems like a very efficient storage method for helping calculate ray tracing, especially in the context of live simulations or games. Since game objects are stored separately anyways, utilizing ray tracing with those boundaries would be efficient.
I'm wondering what the statement "If it doesn't hit the volume, it doesn't hit the object" means in this context. Given the diagrams below, it seems like we want to draw a strict bounding box around the image; do we determine that with the shape of the image, or can we choose the shape, like a rectangle or circle?
Hi @jananisriram. Good question! In this context, it's saying that if the ray doesn't even hit the outer bounding volume, then it has no chance of hitting the object. We want to draw strict (or stricter) bounding boxes because the larger the box, the larger chance it is for the ray to hit it (without actually hitting the object). Hence, we want the box to fit the object as tight as possible.
In terms of shape, any regular shapes could work. We what the volume to be simple enough such that it's easy for us to test ray intersections.
In this context, it seems that what we are saying is that although the explicit ray calculations will be more precise, the benefit in terms of speed of using a bounding volume outweighs the marginal inaccuracy.
In class, we talked about how using an axis aligned bounding box is best because the computation for figuring out whether we hit a bounding box is much easier. Would it maybe be possible to do some sort of change of basis to align our basis with the axes of the bounding boxes that are most common? For example, if all of the smallest bounding boxes are at 45 degree angles, could we not shift of basis so that those become aligned with the axes, and we have an easy computation?
The bounding volume is more regular in shape, making the computation more easier. The bounding volume serves as an "upper bound" of the object, if the light cannot hit the "upper bound" (the computation of whether this "upper bound" can be hit is more easier), it will never hit the object
Do we always use convex bounding volumes?
I think the bounding volume here is a 3D version of what we did in HW 1, where we had a bounding box for the triangle. Essentially we are using it to save on time and computations as we don't have to consider anything that is outside of the bounding volume. Similar, to how we didn't have to care about the pixels, and only did computations on pixels within the triangle's bounding box.
Is there a best bounding volume shape to use empirically? It seems like there's tradeoffs between different shapes but also it seems to depend on the actual object.
This reminds me a lot of task 1 from the first homework, where we only rasterized pixels that were within the bounding box of the triangle. One of the ways my partner and I optimized our implementation was checking whether or not the pixel was within the actual triangle itself, not just the bounding box. Using this approach gave us really hefty speedups, and I wonder if this optimization would be possible for more complex objects. Though, the computational overhead required to calculate this for something like a teapot would likely outweigh the computational cost of the simpler bounding box approach anyway.
I find it fascinating how the use of the bounding volume idea is able to streamline computational processes and also even rendering time. I remember in homework one where we bound the triangle's mins and maxes in order to make our program run way quicker. I also find it cool how this doesn't compromise accuracy. I do wonder how graphic engines or programmers bound objects that changes size or moves.
I was initially wondering if it's ever faster to bound by some 3d polyhedron with fewer sides than a rectangular prism, but I don't think it is. The bounding box is really good at speeding up the containment question once we find the ray-plane intersection, and if it's grid-aligned it's even better, so I assume that in most cases the grid-aligned bounding box is the way to go. Although, maybe all of these computations are utterly trivial when compared to having to check each triangle, so it's better to have a tighter fit to an object and use a few extra polygons than to skimp out here and have to end up doing ray intersection for every triangle in the object. Is there a LOD idea where there are several low-poly versions of objects that can be used iteratively for ray-plane intersection tests, and therefore avoid as much unnecessary computation as possible?
I'm curious how bounding volumes are still able to improve object segmentation in scenes with varying lighting, visibility, occlusions. If there are changes to scene conditions, then are there algorithms to update bounding volume parameters in real-time or to changes in object dimensions?
Would it be more efficient if we split up the teapot and found a bounding box for each region? I feel like it would. But that may also involve division which may take up more resources.
The 3rd image has a teapot incased in a circle. I think for some images, we can try different shapes that minimizes the bounding box, and check if there are any points outside the sample shape (this will be a constant time operation, since we already have the bounding x,y limits of the shape). We could try a circle, diamond, and if everything else doesn't work, a rectangle. This can cut down on sampling complexity.
For bounding volumes, is their main purpose to make finding intersections easier? Are they to organize components? Also if the object were to rotate within the bounding volume, does the volume rotate with the object as well?
Bounding volumes is a super simple and intuitive way to understand how to speed up ray tracing. Instead of checking a bunch of empty space, we can easily narrow down on what we actually need to intersect with.
Bounding volumes seems like a very efficient storage method for helping calculate ray tracing, especially in the context of live simulations or games. Since game objects are stored separately anyways, utilizing ray tracing with those boundaries would be efficient.