PDA

View Full Version : geometry instance (geometry shaders)



azazello
04-28-2004, 09:56 PM
Is anybody have information about support of this NV4x technology in OpenGL API?

jwatte
05-01-2004, 05:05 PM
Geometry instancing under Direct3D isn't _quite_ instancing; it's implemented by specifying a stride for certain vertex attributes. This means that, to draw 20 trees, you need 20 copies of the position/normal/color attributes, in sequence. It also doesn't work with indexed lists, only with DrawArrays() style geometry.

Last, the instancing doesn't allow you to switch other render state, such as textures. Instead, you'll have to write a shader which can do that, which by necessity becomes somewhat limited.

I think that games with 100 NPCs that all look the same (or one of 5 models) would benefit from instancing, but programs where each instance is "custom" won't get much help, unless you also start using texturing in the vertex program -- but then you need the ability to re-bind textures between instances, or you quickly run out of available textures.

Dean Calver
05-03-2004, 03:09 AM
D3D9.0c has relaxed the instancing restrictions. This allows indexed lists and vertex data loops.

I expect NV to expose OpenGL extensions similar to these very soon.

This is very helpful for large scale exterior enviroments (trees, rocks, etc.).

Dean Calver
05-03-2004, 03:14 AM
D3D9.0c has relaxed the instancing restrictions. This allows indexed lists and vertex data loops.

I expect NV to expose OpenGL extensions similar to these very soon.

This is very helpful for large scale exterior enviroments (trees, rocks, etc.).

azazello
05-03-2004, 09:43 PM
Thanks to all.

jwatte
05-04-2004, 08:14 PM
Well, you're still going to run out of textures pretty quickly, if you try to use this for something other than lots of cloned things (which is pretty boring). I suppose a bit of procedural variation (based on world space position, say) might help somewhat, though...

KuriousOrange
05-04-2004, 10:36 PM
Ok, I have to ask...
What is geometry instancing in the context of which you speak?
I know my own definition would be: the same geometric data (verts & indices) drawn with a different transform for each 'instance'. A display list could also fall into the 'instance' description.
But I suspect that there is some new feature that has past me by....

GeLeTo
05-05-2004, 01:05 AM
I think this can be used to draw HOS? Can I put the series of 16 bezier control verts in the slow stream and the tessalated vertex grid(as s and t patch coordinates in the 0-1 range) in the fast stream which is looped for each patch? Then in the vertex shader the s, t and control verts are used to generate the final vert.

Another idea - store a unit 2D rectangle in the looped fast stream and pairs of 3D verts in the slow stream and use the vertex shader to generate a pixel-wide quad that connects the vertex pair and voila - fast line drawing. Is this possible? Line drawing is intentionaly crippled on consumer cards ( not Quadro/FireGL/Wildcat ).