|
Post by poster on Jan 12, 2021 20:36:00 GMT
Not sure where I am going awry here. I am working in the bonus chapter for the bounding boxes and BVH, and all the tests are passing. However, calling divide on a triangle shape does not result in any kind of speedup. Even a scene with a teapot is no faster, let alone the dragon image. What threshold values should I be using here? Is calling divide not enough, perhaps?
|
|
leedavidodea
Junior Member

https://github.com/leeodea/rt-dt
Posts: 63
|
Post by leedavidodea on Jan 13, 2021 20:19:05 GMT
I have been away from the raytracer for a while, and I'm a bit of an idiot at the best of times, but I assume your BVH generator code utilises a variable that defines how many individual shapes aggregated together the algorithm will store in a single subdivision (leaf bounding box in the BVH data structure). For example, in my raytracer implementation with BVH implemented, I have a global that includes a member variable "divideValue" that by default I have assigned the value 500 (for a structure such as a teapot - I assume you're using the standard mesh file - this is a reasonable number). This means that a leaf bounding box in the generated BVH structure contains 500 triangles from the mesh.
I am going to guess your equivalent defined value may not be set to a suitable value (maybe it's not set, or it's set to a really low number, ~1).
I cannot see your codebase, so I dont know anything about how you implemented the BVH algorithm, but if all the tests are definitely passing, it seems very likely the error in your scene configuration is that you havent set a reasonable value for the number of triangles in each leaf box of the BVH data structure.
Maybe I'm a complete idiot, but without having access to your code, that's the most obvious place to look.
|
|
|
Post by poster on Jan 15, 2021 13:18:15 GMT
Actually, that is helpful. I will play around with those values you mentioned further and see what I get.
|
|