11 Dias a Ixtlan: Tiempo Perdido
by Gibby · 10/29/2012 (7:09 am) · 7 comments
Tiempo Perdido: The Dark Arts of Framerate and the Downward Spiral of 3rd-Party Assets
So, after my last installment, I found myself compelled to spend a few days concentrating on my 'real' job, given that it was the season/fiscal year end and I had to meet with all the supervisory folks. A worthy diversion, given that it finances my development efforts ;)
With my responsibilies dealt with I thought I'd use my procedural techniques to finish up the ground cover and obstacles in my level and get on with the AI Implementation. I opened up the forest editor and went to town, adding in all the assets I'd collected for the project. After the first few minutes, I had the rock layer done, simulating fallen talus, as well as a sub-layer of small bushes and succulent plants, including the obligatory nopales.

I literally had used my tree brush twice when the lag got so long I couldn't continue. Using FRAPS to measure its performance, I saw that my beautiful new level was running at a whopping 9fps.
NINE.
To quote Marvin the Martian: "Uh-Oh, back to the drawing board..."
So then two more days of fixing assets. First step was to re-skin all of the rock models to use the same texture, adding a thread of consistency along with freed-up texture memory. While at it, I fixed some of the collision issues that could/would become problems for vehicles:

Another issue I had was that many of my models didn't have collision geometry, had holes in the models or both. Almost across the board I had to setup the materials as well. Here's one of the beautiful nopales from Dexsoft:

First, the transparency of this model's textures was fixed in the material editor 'advanced' pane so that it was no longer translucent. I then re-imported it into Max and used gasman's DoIt! to add LODs, collision and bounding box. After all the assets were re-assembled, I tried again. Still with the updates, framerates resembled an elephant dancing in mud. I was at a loss, as I had used the RRGTS trees, because they are some of the only drop-in foliage for Torque that have proper LODs, and look amazing. After some research I found this thread:
Framerate Post
DOH! After a couple of hours converting my .png and .jpg files to .dds, I went from 9fps to 24fps. Better but not better enough. Next step was to lose most of the rocks, and convert my 'bush' layer to groundCover instead of a forest brush. This got me back up to 30+fps, almost good enough, but likely too low once a few dozen bots and humans are duking it out. I used this resource to map my multiple-textured models to one UV-mapped file, gaining another 5-10 fps in the process. My biggest problem was that I couldn't seem to get the transparent files used for tree leaves to work with the UU3D 'Map UVs' function. Despite this, now my assets were optimized and much more useful. I added a tree ground cover to fill in the perimeters of the level, and then carefully added my tree layer. After considerable tweaking, I have it looking like the high desert terrain I'd envisioned, and averaging 55 fps. My system averages 62 fps in the busy demo levels such as Deathball Desert, so I'm accepting this framerate as usable for my eye-candy level. We'll see soon if it stands up to the AI bots and AFX effects I'm finally ready to add:

Day 7
Day 8
#2
those info will be huge live sever for me.
thanks to share your experiments and their result.
in future,i will poke u to hear more info on your future tries
10/29/2012 (10:33 am)
Quote:After a couple of hours converting my .png and .jpg files to .dds, I went from 9fps to 24fps. Better but not better enough. Next step was to lose most of the rocks, and convert my 'bush' layer to groundCover instead of a forest brush. This got me back up to 30+fps, almost good enough, but likely too low once a few dozen bots and humans are duking it out. I used this resource to map my multiple-textured models to one UV-mapped file, gaining another 5-10 fps in the process. My biggest problem was that I couldn't seem to get the transparent files used for tree leaves to work with the UU3D 'Map UVs' function. Despite this, now my assets were optimized and much more useful. I added a tree ground cover to fill in the perimeters of the level, and then carefully added my tree layer. After considerable tweaking, I have it looking like the high desert terrain I'd envisioned, and averaging 55 fps. My system averages 62 fps in the busy demo levels such as Deathball Desert, so I'm accepting this framerate as usable for my eye-candy level. We'll see soon if it stands up to the AI bots and AFX effects I'm finally ready to add
those info will be huge live sever for me.
thanks to share your experiments and their result.
in future,i will poke u to hear more info on your future tries
#3
that is a very helpful tutorial.anybody knows easy way to do same in blender or 3d max?
i can use google but if anybody knows any specific link then plz post here.
10/29/2012 (11:01 am)
"I used this resource(http://unwrap3d.com/u3d/tutorial_repaint.aspx) to map my multiple-textured models to one UV-mapped file"that is a very helpful tutorial.anybody knows easy way to do same in blender or 3d max?
i can use google but if anybody knows any specific link then plz post here.
#4
10/29/2012 (7:13 pm)
nice, good info!
#5
@Dan and Kory: Thanks! Coming from you guys, I'll take the compliments ;P
11/01/2012 (12:07 pm)
@ahsan: If you're already using MAX to rig or create new assets, I would get DoIt! from Game Art Store. It has a great UVMapping script as well as the other functions I'm using here. As much as Ultimate Unwrap has it's own set of quirks, it is probably the best 'Swiss Army Knife' for 3D skinning, and is an important part of the T3D after=market tools...@Dan and Kory: Thanks! Coming from you guys, I'll take the compliments ;P
#6
I came across this the other day forum.thegamecreators.com/?m=forum_view&t=169854&b=21
Haven't tried it myself yet but looks like it could save a bit of time.
I love DoIt also, a real time saver :-)
11/02/2012 (6:05 pm)
Quote:After a couple of hours converting my .png and .jpg files to .dds
I came across this the other day forum.thegamecreators.com/?m=forum_view&t=169854&b=21
Haven't tried it myself yet but looks like it could save a bit of time.
I love DoIt also, a real time saver :-)
#7
11/17/2012 (5:25 pm)
@David: Thanks for that, very cool app, loved the 'pull hair out' in the description, I can so relate to that... 
Torque Owner Dan Webb
PsyCandy Games