Instancing

Optimizations | Tuesday 21 October 2008 11:37 pm

Instancing is a new way to offload the CPU from some work when rendering many copies of the same geometry.  It does it by reducing the overhead of drawing multiple copies of the same vertex buffer.

In OpenGL it’s only fast to use instancing when the instanced mesh consists of very few triangles.

Nvidias instancing demo, here with 136499 meshes rendered at once with 24 triangles per mesh. It runs at 20 fps stable on a GeForce 8800 GTS. (left image is all objects viewed from far away, right is zoomed in)

Instancing

A image from Microsofts DirectX10 instancing demo

Instancing

Some test made that shows when to use instancing and when not
http://www.ozone3d.net/blogs/lab/?p=87

HLSL instancing (therefore DirectX)
http://developer.download.nvidia.com/SDK/9.5/Samples/DEMOS/Direct3D9/
src/HLSL_Instancing/docs/HLSL_Instancing.pdf

Nvidias DirectX10 implementation of instancing
http://developer.download.nvidia.com/SDK/10.5/direct3d/Source/InstancingTests/
doc/InstancingTests.pdf

Microsofts DirectX9 instancing sample
http://msdn.microsoft.com/en-us/library/bb174602(VS.85).aspx

Microsofts DirectX10 instancing sample
http://msdn.microsoft.com/en-us/library/bb205317(VS.85).aspx

An OpenGL implementation of a pseduo-instancing (recommended for old hardware).
http://http.download.nvidia.com/developer/SDK/Individual_Samples/
DEMOS/OpenGL/src/glsl_pseudo_instancing/docs/glsl_pseudo_instancing.pdf

OpenGL instancing:
http://www.opengl.org/registry/specs/EXT/draw_instanced.txt

Please share:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Current
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • StumbleUpon
  • Twitter
  • Reddit
  • Technorati
  • Yahoo! Bookmarks

1 Comment »

  1. Comment by torbjørn — November 18, 2011 @ 12:02 am

    SolHSA has written a few tips for doing instancing in OpenGL here:
    http://sol.gfxile.net/instancing.html

RSS feed for comments on this post. TrackBack URI

Leave a comment