Car race game
by Renzo Sanchez · in General Discussion · 04/21/2006 (9:28 am) · 6 replies
Hello, I am working in a car race game in a city, this is my first experience with a complete game (introduction, video, menu, game). So, I want to be sure about optimization and actual standard about game creation. The big question is, how the big companies (like EA) work?
Some information about the art of my game:
1 car = 56 000 polygons
1 block (12 houses) = 5 500 polygons
Objects in the block (traffic light, posts, etc) = 19 226 polygons
Highway = 2 000 polygons
1. What texture size should I use for each house (2048x2048, 1024x1024, etc)?
2. Should I use differents texture size, for differents screen resolutions and differents video cards?
3. What extension and compression should I use for my textures?
4. How should I load (import) the art of the game (1 block, 2 blocks, all city, etc) (considering collision detection)?
5. Where can I read about this kind of information, considering that the rule "you should use a texture size of 256x256" is an old rule?
In a game developer magazine appear information about code lines, plataform, number of bugs, developers, etc. What about information like number of polygons, texture size, etc?
Thank you,
Renzo.
Some information about the art of my game:
1 car = 56 000 polygons
1 block (12 houses) = 5 500 polygons
Objects in the block (traffic light, posts, etc) = 19 226 polygons
Highway = 2 000 polygons
1. What texture size should I use for each house (2048x2048, 1024x1024, etc)?
2. Should I use differents texture size, for differents screen resolutions and differents video cards?
3. What extension and compression should I use for my textures?
4. How should I load (import) the art of the game (1 block, 2 blocks, all city, etc) (considering collision detection)?
5. Where can I read about this kind of information, considering that the rule "you should use a texture size of 256x256" is an old rule?
In a game developer magazine appear information about code lines, plataform, number of bugs, developers, etc. What about information like number of polygons, texture size, etc?
Thank you,
Renzo.
#2
your texture size should almost never be larger than the average resolution the game is going to be played at. And can usualy be a lot smaller. It's just to wasteful to use such large textures. If possible you should try and keep under 512x512 or you will run out of Vram really fast.
2. Your better off with a good compromize than several texture sets unless you have the luxury of shipping retail on a disk. The difference in visual quality probably isn't going to be big enough to waste the bandwidth if your making a Indie game distributed online. Most people have broadband, but would still prefer smaller downloads.
3. PNG is my favourite uncompressed format, DXTC 1,3,5 for compressed stuff. Torque compresses for you and doesn't give you a choice that I'm aware of. It's either on or off.
4. Thats really up to you, some kind of custom system that culls big chunks of your city is going to be best I imagine.
5. I still think 256x256 is best, Torque suffers a little against current and next gen engines in that it doesn't support multiple UV's so it's harder to hide repeating textures, but 256x256 is still most common I think. Usualy you wouldn't skin a building with one big texture but combine tiled textures and use a lightmap to make it look less uniform. You might also want to consider creating prefab parts for buildings that you can mix and match if designed well. And share the same parts in a block as much as possible to make it more efficient.
You man not need much collision in your racing game, the road surface obviously. and the walls around the track, but a block needent be more complicated than a box really, and you may need none at all if there are walls and barriers in front. Just depends on your particular level.
If your shooting in your racer you might want to consider more complex collisions, but otherwise make it as minimalistic as possible.
BTW, I assumed that your 56.000 poly car was a mistake and you meant 5,600?
I've found with most engines Batches of 2000 polys work best on the broadest range of GPU's. And sometimes wheels can be quite costly if they have detail, since you have 4 of them per vehicle. Not so much on modern Geforce 5 and up video hardware.
04/21/2006 (10:02 am)
1. What texture size should I use for each house (2048x2048, 1024x1024, etc)?your texture size should almost never be larger than the average resolution the game is going to be played at. And can usualy be a lot smaller. It's just to wasteful to use such large textures. If possible you should try and keep under 512x512 or you will run out of Vram really fast.
2. Your better off with a good compromize than several texture sets unless you have the luxury of shipping retail on a disk. The difference in visual quality probably isn't going to be big enough to waste the bandwidth if your making a Indie game distributed online. Most people have broadband, but would still prefer smaller downloads.
3. PNG is my favourite uncompressed format, DXTC 1,3,5 for compressed stuff. Torque compresses for you and doesn't give you a choice that I'm aware of. It's either on or off.
4. Thats really up to you, some kind of custom system that culls big chunks of your city is going to be best I imagine.
5. I still think 256x256 is best, Torque suffers a little against current and next gen engines in that it doesn't support multiple UV's so it's harder to hide repeating textures, but 256x256 is still most common I think. Usualy you wouldn't skin a building with one big texture but combine tiled textures and use a lightmap to make it look less uniform. You might also want to consider creating prefab parts for buildings that you can mix and match if designed well. And share the same parts in a block as much as possible to make it more efficient.
You man not need much collision in your racing game, the road surface obviously. and the walls around the track, but a block needent be more complicated than a box really, and you may need none at all if there are walls and barriers in front. Just depends on your particular level.
If your shooting in your racer you might want to consider more complex collisions, but otherwise make it as minimalistic as possible.
BTW, I assumed that your 56.000 poly car was a mistake and you meant 5,600?
I've found with most engines Batches of 2000 polys work best on the broadest range of GPU's. And sometimes wheels can be quite costly if they have detail, since you have 4 of them per vehicle. Not so much on modern Geforce 5 and up video hardware.
#3
About the car polygon count, it is correct 56 000 polygons for a playable car. And I am sure that it is less than Need for Speed: Most Wanted polygons on average per car. So, maybe my mistake is not using a 56K polys per car, maybe my mistake is trying to make a game using same "art" that the big companies.
You can check this link about poly count per car:
http://www.bit-tech.net/news/2005/10/14/pgr3_poly_count_lie/
"The actual average number of polygons per car model is closer to 96,000"
"Some cars have around 85,000 polygons, but many go as high as 105,000"
So what I want to find is same kind of information about textures, because I don't think that a very nice city like "Need for Speed: Most Wanted" is using 256x256 texture size.
About the complexity of the collision, there will be a lot of objects and the reaction will be different, however right now the collision detection don't worry me, because FPS is going down not for collision detection but by HDRI.
Regards,
Renzo.
04/21/2006 (3:19 pm)
Hi, thank you a lot for your feedback.About the car polygon count, it is correct 56 000 polygons for a playable car. And I am sure that it is less than Need for Speed: Most Wanted polygons on average per car. So, maybe my mistake is not using a 56K polys per car, maybe my mistake is trying to make a game using same "art" that the big companies.
You can check this link about poly count per car:
http://www.bit-tech.net/news/2005/10/14/pgr3_poly_count_lie/
"The actual average number of polygons per car model is closer to 96,000"
"Some cars have around 85,000 polygons, but many go as high as 105,000"
So what I want to find is same kind of information about textures, because I don't think that a very nice city like "Need for Speed: Most Wanted" is using 256x256 texture size.
About the complexity of the collision, there will be a lot of objects and the reaction will be different, however right now the collision detection don't worry me, because FPS is going down not for collision detection but by HDRI.
Regards,
Renzo.
#4
look at it this way, your rendering 56,000 polys per frame with that one car, at 30FPS that same car is doing almost 1.7 million polys persecond just rendering that one car and nothing else.
If your using more than 5000 polys per car full res your probably doing something wrong. If you build your models carefully there's no need to go higher than that without being wasteful.
What platform are you making this game for, I don't think you will get anywhere near that using torque, or any other affordable solution. They may very well still be using 256x256 textures, and even less in many cases. Those next gen engines rely on fancy multipass shader effects to composite a lot of visual information that you see as the final rendering in the game.
With games everything effects everything else, your polycount effects Vram as does your texture sizes, and these all effect your shaders efficiency. Personaly I'd take the info in those articles with a pinch of salt and look at car models in recent games yourself. There are tools to let you look at models from in games which will give you a realistic idea of what you can and can't do with a recent DX8 era engine
04/21/2006 (3:32 pm)
Um, 56,000 polys would be good for a normal map render but I'm pretty sure they don't use that many polys, there's really no need. you would be amazed what you can do with 3000 polys even without any textures.look at it this way, your rendering 56,000 polys per frame with that one car, at 30FPS that same car is doing almost 1.7 million polys persecond just rendering that one car and nothing else.
If your using more than 5000 polys per car full res your probably doing something wrong. If you build your models carefully there's no need to go higher than that without being wasteful.
What platform are you making this game for, I don't think you will get anywhere near that using torque, or any other affordable solution. They may very well still be using 256x256 textures, and even less in many cases. Those next gen engines rely on fancy multipass shader effects to composite a lot of visual information that you see as the final rendering in the game.
With games everything effects everything else, your polycount effects Vram as does your texture sizes, and these all effect your shaders efficiency. Personaly I'd take the info in those articles with a pinch of salt and look at car models in recent games yourself. There are tools to let you look at models from in games which will give you a realistic idea of what you can and can't do with a recent DX8 era engine
#5
Each Tire: 7 876 (4 Tires = 31 504)
Interior: 9326
Each lateral mirror: 437 (both 874)
Body: 14 350
You can see pictures about the model here:
http://www.artigames.com/Temp/1.jpg
http://www.artigames.com/Temp/2.jpg
http://www.artigames.com/Temp/3.jpg
http://www.artigames.com/Temp/4.jpg
About the engine, you are right, most of the engines are difficult to work with a lot of polygon or it is hard to make a good convertion from .max to .X to .EngineFormat. However, I've already import 1 000 000 polygon count without a problem with Open GVS.
Regards,
Renzo.
04/22/2006 (8:11 am)
Hi Adrian, about my car polygon count, here is the distribution:Each Tire: 7 876 (4 Tires = 31 504)
Interior: 9326
Each lateral mirror: 437 (both 874)
Body: 14 350
You can see pictures about the model here:
http://www.artigames.com/Temp/1.jpg
http://www.artigames.com/Temp/2.jpg
http://www.artigames.com/Temp/3.jpg
http://www.artigames.com/Temp/4.jpg
About the engine, you are right, most of the engines are difficult to work with a lot of polygon or it is hard to make a good convertion from .max to .X to .EngineFormat. However, I've already import 1 000 000 polygon count without a problem with Open GVS.
Regards,
Renzo.
#6
04/22/2006 (8:24 am)
Yeah but it's one thing loading a model, and another thing making a game with them in. YOu have yet to add physics, AI, collisions and all the scenery and general gameplay stuff. Looks like a nice render, but thats a piece of cake compared to the rest the system has to deal with.
Torque Owner Badguy
mostly researching your target hardware.
1.) 2048x2048 is Alot of texture memory. probably not necessary.
if we are talking optimization this texture is on the table.
will visual quality improve that much beyond say an 512x512 texture?
how much total texture memory will we be using and how much will we have?
2.) I would not use different ones for different screen rez. Maybe different video cards (good, bad)
3.) see what your engine supports
4.) Each building should be its own collision dataset. many building together increase the workload.
using all the bsp technology to reduce collision sets is the way to go (portals, collision hulls)
5.) I would not say its an "Old Rule" I would say you can now raise the resolution for high visibilty textures.
and also areas where you need/want higher detail. Start low and work your way up. staying small to keep performance in mind where you can.
now to your car.
I think 56,000 polies is nuts.
unless you only ever want one maybe 2 of the cars on the screen.
are you sure the 56,000 polies are being put to good use?
could you now dramatically reduce this count and still have a quality model?
if you put 100,000 polies in your scene of just cars and start adding the rest of the scene.
lots of hardware out there will not be happy to be playing your game.