Game Development Community

dev|Pro Game Development Curriculum

TSE optimizations

by Brian Ramage · 06/06/2006 (5:43 pm) · 41 comments

Hey everyone, just wanted to give a little bit of an update on the optimizations I've been working on for TSE. The batching system is working out very well as you can see in the fps of the screenshots I've posted. That's 10 space orcs in one shot running around 140 fps on a 3.4ghz P4 with an x800.

The batching essentially will group up draw calls into one manager, stuffing them into bins like mesh, interior, translucent, glow, etc. Each bin is then sorted by Material, and then at draw time, it will loop through each Material and send the appropriate draw and shader data to the card. It greatly reduces the number of render calls to the GPU and speeds things up quite a bit.

Since you can control the order that the bins are drawn and you can add your own fairly easily, a lot of the sorting issues in TSE should be eliminated, and also customized to the needs of your game.

While working on the new batching system I also found and resolved more issues related to the skinning system in TSE. Dynamic vertex buffers have now been fully implemented (as opposed to the existing 'volatile' vertex buffers), so transferring vertex data up has been further optimized.



public.garagegames.com/brianr/planPics/06_06_2006/screen01.jpg

In this lower shot, you can see the new "Warning" material that I've created to let the user know that there is an unmapped material in the scene. This should make it easier to detect than the previous "drop to fixed function with no lighting" system. It works for most of the major geometry - interiors and meshes.


public.garagegames.com/brianr/planPics/06_06_2006/screen02.jpg

This update should go live pretty soon, I'm just cleaning up some minor remaining issues and waiting for some Atlas changes to be complete before it's released. I'm also hoping to kill some bugs over the next few days that the community has brought to my attention.

Almost forgot to mention - the batching has been tested on Geforce cards and seems to have substantially increased performance. This scene runs about 120fps on Matt Fairfax's laptop with a Geforce 6800 in it. I put a 6600 in my machine and it runs about 40ps - not spectacular, but I'm not sure even one Orc ran at that speed previously.

I also want to mention the great work Joe Maruschak did on optimizing the space orc and his gun to use just two materials. This reduced the number of separate meshes in the orc from 27 down to 16 and almost doubled the performance when combined with the batching. Thanks Joe!

About the author

I have over 16 years of professional game development experience at both AAA studios like Dynamix, to indie studios like GarageGames and my own Black Jacket Games. I worked for 5 years at GarageGames as the lead developer on TGEA (precursor to T3D).

Page «Previous 1 2 3 Last »
#1
06/06/2006 (5:59 pm)
PS - those orcs are about 4500 verts and have no LOD on them.
#2
06/06/2006 (6:30 pm)
That is an awesome news! I can't wait until I'll be able to "touch" the updated TSE :)
#3
06/06/2006 (6:44 pm)
Awesome Blossom! This will go excellently in Kuiper, which uses a lot of objects that would benefit from batching!
#4
06/06/2006 (6:54 pm)
Very nice. I'm looking forward to seeing this in action. :)
#5
06/06/2006 (7:07 pm)
That is awesome stuff Brian, I can't wait to get my hands on the code! :)
#6
06/06/2006 (7:13 pm)
Nice, I've noticed that a lot of game engines seemed much more optimized than both TGE and TSE, and was wondering why. Glad to know something's being done about it.
#7
06/06/2006 (7:49 pm)
nice work :]

- Raxx, "much more optimised?" - probably a little exgeratad, of course i dont know what engines your
comparing torque to - tse is incomplete, tge is geared towards older hardware...if its tge your comparing
against other engines, you need to ask yourself - "do those engines run better than tge on older hardware",
by that i mean hardware without shader support and vertex buffer objects.
heh..anyway, im in no position to argue the point to any sensible conclusion, im not an engineer..

er..yeh, anyway....sounds great + will there be any new demos?
#8
06/06/2006 (8:19 pm)
NICE, happy to see this implemented. :)
#9
06/06/2006 (8:31 pm)
Good news indeed.
#10
06/06/2006 (8:59 pm)
Huh, cool stuff. Sound good. :-)
#11
06/06/2006 (9:01 pm)
This is the kind of rendering optimization you find in the latest incarnations of the Quake engine, or in things like Unreal - definitely a big step up from our previous rendering architecture. :)

It's also way cooler and cleaner to program against, and makes the engine generally much more of a pleasure to work with. I'm very happy with how it's going, and it's only going to get more refined and performant from here...
#12
06/06/2006 (9:44 pm)
The future is so bright.. I got to wear shades.

:)
#13
06/06/2006 (10:57 pm)
Randy: hehe
#14
06/07/2006 (12:04 am)
This is cool stuff!

Brian, did you notice the thread in the TSE Bugs Forum about Materials not getting sent over the network properly? And specular not showing up on clients but on the server? If you haven't nailed these yet, I got some more info which might be helpful.

Let me know.
#15
06/07/2006 (12:12 am)
EDIT---Didn't actually read his bug, now I did. Cheers :)
#16
06/07/2006 (12:45 am)
Grouping draw calls by material definitions... very clever! We're very excited about the new performance gains. Thanks team!!!
#17
06/07/2006 (1:28 am)
44 fps with one Orc would be an improvement from what i get with the 6600... 10 is all gravy. =)

Can't wait to merge this bad boy.
#18
06/07/2006 (1:40 am)
Sounds like a nice big step forward, congrats!
#19
06/07/2006 (3:15 am)
Waooohh... Sounds very interesting. I think this changes are going to increase drastically FPS. When you say it's ready pretty soon... Do you mean to the end of the month? Which Atlas changes do you wait?
#20
06/07/2006 (3:29 am)
Brian,

Would this system be a good starting point to support instancing? I've got a hankering to play around with instancing although when I spoke to Richard Huddy he didnt sound absolutely convincing to the extra framerate I might get for it.

I'm glad to see the batching coming together though, if it can help me fix the alpha render order stuff that'll be great (and getting new atlas stuff in there together will be supah!).

Just want to say I appreciate the effort that goes into this stuff, youre a star!

As Ben said, its only up from here.

So is now the time to ask, whats next? :)
Page «Previous 1 2 3 Last »