Project 4: BVH vs Grid

 

My grid once again whacked the hard drive for a million spheres, but still got significantly better results on nearly all #’s of spheres (which most people seem to have gotten)

 

Times (not counting loads)

BVH:                                                               Grid:

1000 spheres:

Build time: 3s                                                    .06s

Render time: 5s                                     7.56s

Total time: 8s                                                    7.62s

 

10,000 spheres:

Build time: 8s                                                    .16s

Render time: 14s                                           19.27s

Total time: 22s                                      19.43s                                     

 

100,000 spheres:

Build time: 18s                                      1.48s

Render time: 1min 2s                                                44.27s

Total time: 1min 20s                                           45.75s

 

1,000,000 spheres:

Build time: 2min 28s                                           25.82s

Render time: 7min 34s                                  137.03s

Total time: 10min 2s                                              162.85s (2min 42.85s)

 

Compiling in release mode has significantly improved my times, even on my 5 year old computer. It still thrashes the hard drive on 1mil spheres, though. Also, the new timings were on spheres that had diffuse and specular lighting on, instead of just ambient.

Here’s some new timings for 1,000,000 and 100,000 spheres:

100,000 spheres:                                               

Build Time: 1.73 secs                                              0.43secs

Render time: 21.2 secs                                  19.3 secs

Total Time: 22.95 secs                                19.76 secs

 

1,000,000 spheres:

Build time:  41.2 secs                                              30.3 secs

Render Time: 4min 20 secs                            1min 41secs

Total Time: 5min 1.2 secs                           2min 11.3secs

 

I’m not sure why, but the release mode didn’t seem to help grid quite as much as BVH…maybe alterations I made to BVH and other intersection code have sped it up (or made grid slower) since I last made these tests.

 

The views and opinions expressed in this page are strictly those of the page author.
The contents of this page have not been reviewed or approved by the University of Minnesota.