How to create a city?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

How to create a city?

Post by krama757 »

I have been giving some thought to how I could make a decent looking fantasy city that doesnt lag and I am a bit overwhelmed by the complexities of my choices :D

Terrain modeling and texture development is simple with L3DT and NEM's terrain generator.

But what about buildings and placement? I belive there are a couple choices:
- BSP
- MIM/OCT
- Individual meshes placed on landscape
- One large city mesh?

Which one would you guys suggest? I want to keep the actual implementation time down because that takes away from modeling.

I wonder if OCTs/MIMs are also automatically culled like BSPs are. Being able to choose the absolute position of my meshes would be very nice indeed.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

even though you've stated you want a bunch of buildings, you havent talked enough about how those buildings will be _viewed_ by the player(s).

Is it top-down, first person or 3rd person? Can the player fly around, or are they limited in where they can go?

If its top down, you'll be showing many buildings at a time, mostly from the top-- this means smaller, lower-res models with triangles taken out from the bottoms when not seen.

Otherwise you have to answer questions about how much of the city is ever viewable at one time, and whether you can enter and exit buildings. BSP is only helpful for rooms, but if you can enter buildings you'll want to use it for that. Oct tree is useful for wavey/flat terrains, so if you have areas of the city such as a park, you'll want to use Oct for that.

Assuming you want something that could model, say, new york, where walking down the street is like walking down a steel canyon-- you'll need to have a custom LOD system for your buildings. It can probably be based merely on distance. Hopefully you can cull buildings that are behind others simply by knowing where the viewer is on the 'grid' if you make your city uniform enough.

hopefully this post has given you some more questions to answer
a screen cap is worth 0x100000 DWORDS
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

Ah yes, that does help a lot.

The camera is allowed to free roam on the terrain. So it has the same view as WoW.

I think a combination of of BSPs for bulidings you can enter, .X or .3ds meshes for static bulidings that you cannot enter, and a custom occlusion culling mechanism is probably best.

Thanks a lot.
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

If you have a lot of buildings that cannot be entered, a simple lopoly way would be in the textureing. One large block of buildings would actually be a solid block, with different fronts created by the texture.
You could then use your resources better in the buildings that can be entered.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

The difficulty with a system of terrain + bsp is that optimally you'd like to only have to run one or the other. You certainly dont want to run a BSP routine for the building your in + oct for the terrain outside + BSP for the building across the way that you can see into.

Its not quite as cool, but perhaps you can enforce a rule of having buildings with windows + doors shut. In this way you would simply 'enter' a building and you'd only be able to see whats inside (therefore not having to render other multiple systems) and while you were outside you wouldnt have to render what was inside of buildings.

Now heres where the artistry comes in. Initially, that system sounds simple and BAD. However, there are a couple of tricks you can use to cover it up. Firstly, when you are texturing the insides of your buildings, you can capture screens of what it looks like outside and render those to the window panes. You might even come up with a system that generates a partial view for windows in real-time so that you can see cars and pedestrians and the sunset moving along outside.

For outside, you can still have SOME building-like structures to interact with without entering BSP systems. For instance, if its like new york, you could perhaps stand to have a news stand or some other kind of room build into the first floors on the streets of each of your buildings. This would allow the feel of being 'inside' and still being able to interact with the outside, while saving you from having to consider all of the rooms in a skyscraper.
a screen cap is worth 0x100000 DWORDS
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

Those are good ideas Keless and Mike. You guys are going into developing a city like NewYork and I want to draw you guys away from that. It is my fault for not stating that this is an rpg city.

So here is the overall pic:
City style: Fantasy, WoW/Neverwinter Nights styled with a WoW 3rd person camera angle that follows the player on the landscape.

What I cant decide is what format to use to satisfy the following constraints:
- Models need to be realistically lit during day and night cycles
--- Thus I require texture baking
- Some houses have to be accessible on the inside, and some dont
TreyOne Games
Posts: 18
Joined: Wed Dec 14, 2005 12:44 am

Post by TreyOne Games »

heres a question? im working on a racing game and would like 2 add buildings on some levels....but mainly im worried about the roadway ,tunnels and bridges...any suggestions?
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

With Irrspintz now you can splat on detail textures for your road. For tunnels I would use BSPs becasuse you wont need dynamic lighting and because BSPs are pretty fast.

Bridges I would use 3ds or X because its an orginary structure....cant do much to change this.
Guest

Post by Guest »

You all are talking about using BSPs. Is irrlicht capable to use bsp for culling or can it simply load a bsp file and use it as octtree? What the advantage on using bsp in irrlicht?
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

I dont believe irrlicht does BSP culling. The only advantage you have is that BSPs are made by a lot of programs and contain lightmaps.
TreyOne Games
Posts: 18
Joined: Wed Dec 14, 2005 12:44 am

Post by TreyOne Games »

krama757 wrote:With Irrspintz now you can splat on detail textures for your road. For tunnels I would use BSPs becasuse you wont need dynamic lighting and because BSPs are pretty fast.

Bridges I would use 3ds or X because its an orginary structure....cant do much to change this.
Thanks ill try it...is it the same as irrlicht...because i really wanted 2 stay with the basic, so i dont have upgrade problems ( :( im still learning programming and my game is slowly coming together )
Post Reply