Sign in to follow this  
RavNaz

multiple DIP's vs multiple vertex transforms....

Recommended Posts

hi guys, currently I load in my geometry in static buffers...for example, if I had a planet model, I would load it's geometry into static vB/IB. so each render ( regardless of number of polys ) only uses 1 DIP call. say I want 100 of them on screen, then that would mean 100 DIP calls. I was wondering, would if be faster to have a dynamic VB/IB, and every frame transform the geometry into world space, and then have 1 DIP call to render all of them. the only problem I can see with that, is that I would have to loop through all vertices of the model for the number of times I wanted to display it, and transform them into world space. Cant this be done all at once??? If it can, then I would understand why this might be faster......

Share this post


Link to post
Share on other sites
That would definitely be slower. You'd essentially be reverting back to software transformation at that point.

The situation you describe and desire could cetainly benefit from hardware "instancing". However, that method becomes ever increasinlgy difficult to leverage once you have a scene full of dynamic lights, shadows, etc. that are uniquily affecting any given one of your "instances".

A good alternative that will only work with stationary geometry, is to pre-transform all of your verts into world space and then batch vertices from visible objects together into a single vertex buffer. But again, that method can also break down pretty quickly if you're going to have a lot of dynamic lights, shadows, shaders, etc.

Share this post


Link to post
Share on other sites
mmmm...interesting....

just read a thread here.....closed the webpage before getting alink..sorry :-(....that basically says that doing what I'm doing now is fine.

If I have a planet model that has 10,000 verts, then currently I can render all of those with 1 DIP. Multiple planets, multiple DIPS, but thats still a hell of a lot of verts in 1 DIP. Also all my models are sorted by texture and materials, so that all models with the same textures and effects etc.. are drawn 2gether ( minimising state and texture sets ), allbeit again with multiple DIPS. I think thats quite a good trade off....any thoughts?

Share this post


Link to post
Share on other sites
I´d say a DIP call that uses a few thousand vertices is well used, 10.000 per DIP call seems fine to me, and AFAIK around 100-300 DIP calls per frame isn´t anything out of the ordinary, so you´re alright I guess as long as you´re minimizing state changes (as you said you do) and don´t render anything (or not too much) that doesn´t appear on the screen anyways ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this