Am I asking too much?

Hi, I was wondering if somebody might b able to help me. recently I’ve begun building a walk through of a city for my end of year show, a bit like mayb a GTA sorta idea but without the weapons and stuff. I’m only new at this so mayb I’ve bitten off more than I can chew! Basically so far I’ve build some georgian fronts and when i duplicate the mesh and compose a street.It seems to be too much for the game engine and the programe doesn’t respond. It just crashes.

You may be using too many polys. A screenshot would help diagnose the problem.

Omg I’m sorry, but how do u add an attachment to this forum? Please excuse my stupidity!! :I

As PlantPerson said…You are likely to be modelling your objects with too many verts or faces (polys).

Games need to have much lower Poly counts than renders or animations or what have you.
Although the problem maybe something entierely different so follow PlantPersons advice.

Sorry! here’s a screenshot that might help.

I was a bit worried it might have something to do with that. Is the only solution then to have images of buildings mapped onto simple mesh objects?

I think it’s the only solution, but if you make prober use of normal maps and alpha textures, you won’t see much difference. For example, you can use normal maps for the windows.

OK, cool thanks I’ll try that. One more question. Would you build the windows and doors then as seperate objects rather than keep it all on the same mesh?

I never mentioned that. I assume you already know you can use more than one material on a object. It rather use one object for the building, but with seperate meshes for windows and doors (in the same object).

Yeah, sorry that’s what i mean’t. Yeah I know u can use diff materials. It’s just I had originally intended to keep the game objects as bare as possible, to keep em lookin really stark so I was tryin to avoid using textures by constructing the meshes in a sort of embossed way to give shadows and stuff. I realise now though that’s it’s just not gonna b possible.

Nice looking scene. :slight_smile:

There are certainly many workarounds and optimisations you can use to solve your problem.

The railings on the balconies look very complicated with curves and stuff. Looks like they may well account for most of the polys in the scene. These could fairly easily be replaced with an alpha plane with just a picture of the railings.

Normal maps would help to add an “embossed” effect to flat or sparse geometry. For example, a normal map could actually be used in addition to the alpha plane on your railings to give them a “3d” appearance. The front of each set of railings could then be a single polygon that is partially see-through and which has the normal map adding depth and detail to the simple polygon.

Normal maps can also be baked from complex geometry to simpler geometry from within Blender. See this page from the Blender manual to get an idea of the potential of normal maps, and an introduction on how to use them. By searching for “blender bake normal map” on Google, I got a load of hits for video tutorials on baking normal maps, they should help you with the baking process.

Baking the railings geometry could create the normal map for the railings and baking the windows geometry to a simple window model could create the effect you want for the leaded glass that they are made from. Like… model the basic window frame, but the leaded panels would be from a normal map.

By doing these couple of things you could probably remove most of the geometry from your city and be able to start growing it again. :slight_smile:

When your city hits the framerate barrier again you might want to look into LOD (level of detail) scripts to replace the geometry of distant buildings with something simpler like a simple box with normal map, but this is for later. :wink:


Would you build the windows and doors then as seperate objects rather than keep it all on the same mesh?

If you started with the windows and doors as separate objects then UV unwrapping them would have to be done only once for a window and once for a door. This mesh could then be duplicated many times and then joined to the building mesh to form one model for the building. This would save a lot of work.

I’m not sure, but I think that linked duplicates rather than full duplicates of your buildings will add speed to your simulation too, and incidentally decrease your file size (something to do with the “generate display lists” option?)… Although I have read somewhere that the less objects you have in the scene, the faster the game will render each frame so combining objects might be advisable. It depends on the individual situation and what trade-offs work best for your game. Testing various setups would be best.

Just wondering… Have you turned off collision for the buildings? Turning off collision for everything might increase speed massively. If collision is being calculated for all that geometry then that might slow down your game a lot too.
You could turn off collision for everything (except the ground) and model the outline of your buildings in simple planes that aren’t rendered, but which register collision. The street lights could have a tall, narrow collision boxes rather than trying to calculate collisions for all the faces that make up the curved surface. This technique is used in many if not all commercial games that represent complex, static environments.

That’s really helpfull, thanks FunkyWyrm. I had an idea that u could do something like that, but wasn’t sure how u did it at all. Will definitly look into that. Thanks a million. :slight_smile:

The fewer objects, the better. Join objects which are logically related to each other, and make sure you unset collision-sensitivity on objects the player is unlikely to come in contact with.