Game Development Community

Decreasing mission load times (textures)

by Igor G · in Torque Game Engine · 07/13/2007 (11:13 am) · 3 replies

Hi all,

I don't think there has been a topic in the forums about increasing the load times of a mission based on textures.

I'm working on a project that features a REALLY dense city area with lots of buildings (700-1000). Most of the buildings are unique, so textures cannot be shared. For testing purposes, I usually go with 50 total buildings (18 unique) and the startup times on a local server are around 30s. Each of the 18 unique building contains 18 JPEG textures for about 18 MB total.
If I start a mission with all the buildings, trees, and other artifacts, (textures plus model files ~ 650 MB) my startup times on a powerful machine is about 2 minutes.

I profiled the startup sequence, and it turned out that gTexManager::createGLName was taking up all the CPU cycles. More specifically, the call to glTexImage2D was the reason.

I am not an expert on OpenGL, so I was hoping somebody could help me out or point me in the right direction in how to optimize this, that would be appreciated.

Thanks.

#1
07/15/2007 (2:10 am)
Wouldn't you want to decrease load times? Anyways, there are a few mission loading optimizations mainly for local clients here. Even if it doesn't decrease load times in multiplayer it will still make testing easier.
#2
07/15/2007 (9:19 am)
Oh sorry, I meant DECREASE mission load times.

I already know how to decrease mission load times by doing those optimizations, which was why I created a new topic about decreasing mission load times because of textures.

Like I mentioned, it's because of the OpenGL calls from the texture manager, so any OpenGL experts or somebody who knows how textures are managed know how to speed this up?

Thanks!
#3
07/16/2007 (11:36 am)
Well, setting setOpenGLMipReduction to 1 or 2 reduces the memory footprint and decreases the load time, but not by much.