07.01.2013 Views

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Level of detail 73<br />

A discrete LOD example<br />

As a simple example, consider the following sphere. A discrete LOD approach would cache a certain number of<br />

models to be used at different distances. Because the model can trivially be procedurally generated by its<br />

mathematical formulation, using a different amount of sample points distributed on the surface is sufficient to<br />

generate the various models required. This pass is not a LOD-ing algorithm.<br />

Image<br />

Visual impact comparisons and measurements<br />

Vertices ~5500 ~2880 ~1580 ~670 140<br />

Notes Maximum<br />

detail,<br />

for closeups.<br />

Minimum<br />

detail,<br />

very far objects.<br />

To simulate a realistic transform bound scenario, we'll use an ad-hoc written application. We'll make sure we're not<br />

CPU bound by using simple algorithms and minimum fragment operations. Each frame, the program will compute<br />

each sphere's distance and choose a model from a pool according to this information. To easily show the concept, the<br />

distance at which each model is used is hard coded in the source. A more involved method would compute adequate<br />

models according to the usage distance chosen.<br />

We use OpenGL for rendering because its high efficiency in managing small batches, storing each model in a display<br />

list thus avoiding communication overheads. Additional vertex load is given by applying two directional light<br />

sources ideally located infinitely far away.<br />

The following table compares the performance of LoD aware rendering and a full detail (brute force) method.<br />

Rendered<br />

images<br />

Visual impact comparisons and measurements<br />

Brute DLOD Comparison<br />

Render time 27.27 ms 1.29 ms 21 × reduction<br />

Scene<br />

vertices<br />

(thousands)<br />

2328.48 109.44 21 × reduction

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!