Skip to main content
gamedev.net
🔒 Locked 🎮 Unity

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

Started by RavNaz 2 replies 850+ views
Original Post
RavNaz
RavNaz
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......
Brian Lawson
Brian Lawson
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.
RavNaz
RavNaz
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?
matches81
matches81
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 ;)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.