Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Okay, so I've created these sleek-looking spaceship models for an OpenGL game that I'm going to make. To make them look sleek and smooth, I used a Subdivision Surface modifier in Blender. Hmm... 100000+ triangles.

I've managed to get the files down to the 30 to 40 thousands range (EDIT: under ten thousand, but with loss of quality) in terms of triangles though. So the file size is usually around a few megabytes.

Soon I found out that this wasn't really a problem when rendering the spaceships. However, I did quickly notice that it takes forever for Firefox to load one spaceship. And I want to load three of them, possibly more.

Chances are if I create a game that starts up with a "Please wait five years whilst everything loads" loading bar, it's going to turn away a lot of users. And I still haven't even considered loading planets, images, and a bunch of other stuff.

So now, for my questions:

  • Has anybody else run into this before? Is there a generally accepted solution for this type of problem?
  • Speaking of libraries, is there one that could apply the subdivision surface modifier on the models at run time? Then I could just export the model frames, which are only somewhere around 1000 triangles.

Also, any other input would be very much appreciated.

Thanks! :)

EDIT: What I've tried so far:

So far, compression looks like a no-go but I'm not sure.

  • method 1: zip folders: zipping the files drastically reduces filesize, but it requires a gigantic zip.js library to actually use the zip folders. So far I've been unable to get it to work, I guess the zip.js API is just way over my head.

  • method 2: custom compression: I've managed to make my own sort of compression system, but it's not nearly as effective and only cuts away half of the file size. Oh and it also looks like it is broken ATM xD

EDIT: just realized that the bottleneck might not be my internet speed, but rather the Collada file loading script that I'm using. (ColladaLoader.js, it's from three.js) in this case compression is definitely out of the picture.

share|improve this question
1  
The only solution to loading too much data is to load less data. Do you really need all those polygons? Have you tried compression? –  Anko Aug 23 at 12:19
    
@Anko I think I've reduced the model down to the lowest number of polygons that is visually acceptable. At least I would like the high quality models available for faster GPU computers. I am wondering though how much compression will actually be worth it, I figure that if I compress a MB of data that means uncompressing about a fifth of that server side which might just end up taking the same amount of time as the loading anyway. –  Superdoggy Aug 23 at 12:27
    
@Anko just spent a few hours hacking together a huffman-tree style compressor, and turned a DAE file into a BIN file. Unfortunately that only actually saved half of the file size. I think that compression probably is not going to be worth it, especially because now I'd have to decompress it on the client. :P –  Superdoggy Aug 23 at 22:27
    
30-40 thousand triangles seems rather excessive. Have you considered looking at using normal maps to provide smoothing? Some of the games I used to mod seemed to have about a 10k triangle limit for most characters and used normal maps to smooth out the edges, making them seem like they were of HQ than they actually were without having HQ models. –  Alex Bunn Aug 24 at 5:02
    
@AlexBunn that sounds interesting! How do I generate those normal maps though, assuming I don't have super-fancy software like CrazyBump or anything? And what should the normal map be based off of anyway, do I just take a snapshot of the high quality spaceship and normal map it onto the low quality version? –  Superdoggy Aug 24 at 12:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.