Large maps in 3DSMax!

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
ChrML
Posts: 30
Joined: Sun Oct 03, 2004 2:45 pm
Location: Norway

Large maps in 3DSMax!

Post by ChrML »

Hi all,

I'm making a huge and partially dynamic city / country for a game quite similar to the GTA gameplay using Irrlicht (ofcourse) only my goal is more realistic physics. Since the world is huge, everything can't stay loaded at once, so threads will do the loading of objects far away and creation / destruction of dynamic objects like traffic and pedestrians closer (god I hope Irrlicht's SceneMgr and loader's are thread-safe!!). The idea is that individual world objects (like a hangar) are seperate models, while the world description files (holding information about where objects must be placed and their load / collission priority) simply reference them by name (the ground will obviously have first priority, then buildings, then stationary vehicles). The ground is divided in 1000x1000 meter files and are obviously also loaded in 1000x1000 meter chunks. The ground has a quite low poly count (budget is 10 000 polys in ony chunk). Again in 3DSMax I divide the 1000x1000 meter chunk into 100x100 meter chunks to maintain managable pieces. UV mapping 1000x1000 meter, move one vertex, and see the entire texture mess up, and having to UV map again is not fun! Well, this was a lot of possibly unneccessary explainations, but I like to describe the scenario in details so it's easier to figure out a solution.

To the question, in 3DSMax, the meshes are split in 100x100 meters as mentioned and placed right next to eachother (seamless!), but it would be easier if I could UV map 100x100 meters and still treat it like a single 1000x1000 meters mesh I think. Any ways (and eventual workarounds) to make that possible, or atleast a way to treat the two meeting edges between two 100x100 pieces as one edge (and single vertexes)?

Added: One more thing, any potential performance problems I haven't thought about in my system?

Christian
Dances
Posts: 454
Joined: Sat Jul 02, 2005 1:45 am
Location: Canada
Contact:

Post by Dances »

I couldn't tell you much about performance, but if you want to use 10 100x100 chunks as a 1000x1000 chunk then you should do exactly as you were going to, texture map the 100x100s, but then tell them all to look into the same giant texture file and designate a space for each mesh. Once they're all looking at the same texture file and all look good you should be able to attach them all together as one mesh in 3ds max and they should keep their UVW data.... I've never tried anything like this but I don't see why it wouldn't work.
ChrML
Posts: 30
Joined: Sun Oct 03, 2004 2:45 pm
Location: Norway

Post by ChrML »

Dances wrote:I couldn't tell you much about performance, but if you want to use 10 100x100 chunks as a 1000x1000 chunk then you should do exactly as you were going to, texture map the 100x100s, but then tell them all to look into the same giant texture file and designate a space for each mesh. Once they're all looking at the same texture file and all look good you should be able to attach them all together as one mesh in 3ds max and they should keep their UVW data.... I've never tried anything like this but I don't see why it wouldn't work.
I see. I have some bad experience from UV maps from before, so I see a lot of reason why it wouldn't work (are the UV coords relative to something?), and it still won't save me the edge adjusting time during development. What you said gave me a great idea! If the only texture is mapped to one big texture it would need to be atleast 2048x2048 (anything bigger would be too big for many video cards, especially when up to four km^2 chunks can be loaded at once (when the player is located in a corner of a chunk). 2048x2048 is not that great on a km^2, so mapping a smaller and more detailed texture repeatly as a second layer it would be cool I think (variation in scenery and detailed ground). I haven't played too much around with Irrlicht functions, so I don't know how possible it is or how this may affect any rendering performance (as a 3rd layer may also be required for lightmaps at certain areas). If I remember correctly, older video cards (< GeForce 4 or something, I don't know about ATI) have a maximum of 2 layers so I don't know how it will work out. Any thoughts?

Back to the problem, adjusting the edges of one chunk to the edge of the chunk next to it takes me approximately 5 minutes extra per edge, and there are lots of edges. Has 3DSMax got any magic for speeding those things up?
awareninja
Posts: 5
Joined: Tue Jul 05, 2005 8:31 am

Post by awareninja »

Well for managed worlds, i think you don't use the right way.

You split your world into chunks of 100*100.
I have used a method already used in games of that type.

-Construct simple floor 100*100 squares where you apply textures like
ground, road etc...
- create your world editor where you can position entities like houses,assets,
etc... in each floor square.

in your engine just display the squares around the camera and you can have a pool of objects like houses etc... and you have a house in a square,
just make it visibe , and put the coordinates to the good on the floor.

I don't know if you understand, but that's one way to do it.
and a pool of objects is for performance, because loading, creating, and destroying objects is very slow, instead ,
create 20 houses in a pool and display the number you need at position
you need, when you leave a square , if you don't need a house,
just put the mesh not visible and at coordinate -1000,-1000-1000 for example.

Ciao.
begin a little prototype , it will become
a solid great thing at the end.
Post Reply