Derivatives of Parametric Equations

text only
 
progress indicator progress indicator progress indicator progress indicator

Performance Considerations

Figure 6.6 shows the advantage of using subdivision. One curve is rendered with 100 vertices, the other with 30. A curve with 50 vertices is virtually indistinguishable from the 100 vertex curve.


Figure 6.6: The advantage of subdivision.

As you can see, it is possible to produce nearly 100% visual quality with 30% of the vertices (for this particular curve). This means that you are passing far fewer vertices to the GPU. The method itself is not the best in terms of performance, but that might not matter if you are not animating the curve. If you are animating the curve using a vertex shader, you might find that it is actually better to send a larger number of uniformly subdivided vertices. The reasoning is that a larger number of uniform vertices can approximate any shape during the animation. Inefficiencies caused by a larger number of vertices might be offset by the fact that you are not continually transferring data from the CPU. In cases like this, you can only really decide what's best after experimenting with all of the alternatives.

progress indicator progress indicator progress indicator progress indicator


Focus on Curves and Surfaces
Focus On Curves and Surfaces (Focus on Game Development)
ISBN: 159200007X
EAN: 2147483647
Year: 2003
Pages: 104
Authors: Kelly Dempski

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net