Archived

This topic is now archived and is closed to further replies.

Arturien

3D Maps

Recommended Posts

I was wondering what would be the best thing to make a 3D engine be able to show very large maps, I like the BSP format and was thinking of using it for indoor smaller scenes only, but for large landscapes..? I heard of scene graphs which are appearently good for large scenes... anyone have any advice? Also... I was wondering if anyone knows how hard it would be for my engine to recompile the maps as their used or something along those lines because, for example, if there is a house and its window is broken, I want it to stay broken. Thanks in advance for help ^_^

Share this post


Link to post
Share on other sites
quote:
Original post by Arturien I heard of scene graphs which are appearently good for large scenes... anyone have any advice?


a scene graph can take many forms, in fact, pretty much anything can be called a scene graph. You could probably label a meal from mcdonals as a type of scene graph but thats besides the point.

The classical scene graph is this:


you have a root node,
eg,
the universe.
Connected to that, you have your base entities.
eg,
a car body,
a player,
a rocket

connected to each, you have child or leaf nodes.
an example is the car body,
it has 4 suspension struts connected to it.
each has a wheel connected.

The idea is that you keep all position and rotation data realtive to the parent of a node.

Ie,
the car''s position is realitve to the world. So it''s a ''real'' position.
The suspension''s position is realtive to the car, ie, no matter where the car is, the suspensions ''position'' stays constant. But it''s rendered with the car pos accumulated first.
The wheel is the same.

So, to rotate the wheel, you rotate the wheel. No need to think about where in the universe it''s going to rotate around.

as for recompiling maps, well, forget it if you think you can recompile anything.
Saving geometry is easy enough.
But if you intend to completly rearange the space partitioning of a map to accomodate changes in real time, then your out of luck.

for landscapes, as with indoors, there arn''t any ''magic bullet'' formats/structures.
Quadtrees are ok, but not if you plan to allow for overhangs, caves, etc. Octress are good here, but use more memory. BSP is utterly out of the question, as is portals. So it''s mostly just a case of picking your limits early and working to them. You can''t do everything (we all try though )

| - Project-X - my mega project.. big things comming soon - | - adDeath - an ad blocker I made - | - email me - |

Share this post


Link to post
Share on other sites
quote:
Original post by RipTorn as for recompiling maps, well, forget it if you think you can recompile anything.
Saving geometry is easy enough.
But if you intend to completly rearange the space partitioning of a map to accomodate changes in real time, then your out of luck.

for landscapes, as with indoors, there arn''t any ''magic bullet'' formats/structures.
Quadtrees are ok, but not if you plan to allow for overhangs, caves, etc. Octress are good here, but use more memory. BSP is utterly out of the question, as is portals. So it''s mostly just a case of picking your limits early and working to them. You can''t do everything (we all try though )


Ok, so I''ll be using Octrees. But about saving the maps as they change, there I must be a way to do this! I mean seriously, you guys are smart think of a way... please

Share this post


Link to post
Share on other sites
dynamically updating an octree, especialyl if it accounts for node overlap, is a very tough challenge. It took me quite a while to get it working bang on (well, I think it''s bang on).
If your only going to do things like add craters in terrain, tne octrees are a no brainer there since they don''t take verticle height into how they are layed out in the data structure.

| - Project-X - my mega project.. big things comming soon - | - adDeath - an ad blocker I made - | - email me - |

Share this post


Link to post
Share on other sites
Does ANYONE know of ANYWAY I can make my maps continuously save itself when changes are made or something along those lines that can help me? I''m not using any particular map format at the moment so I''m quite open to suggestion.

Share this post


Link to post
Share on other sites
My engine implements exactly what you''re talking about, but it was designed to do that from the beginning, so I''m not sure if this will be helpful to you.
First, you need to know that worlds in my game are broken down into regions, so that I can dynamically unload regions far from the play and load regions near the player, thereby providing huge levels.
Second, in my engine, scripts control the logic that would handle actions like the window breaking (in your example). These scripts are remembered throughout the players journey through a region. When the player leaves a region, the scripts are then appended to the end of that regions ''lump'' in the map file.
So, when a player enters into predefined hot-spots (representing a region changeover is eminant) in the scene graph (bounding-spheres), an event is fired that loads all the scripts from the end of that hot-spots'' corresponding script section of the file. Basically, the region reloads its state. I also have utility functions that can erase the Scripts from the end of the file, to reset the world to its original state. There area down sides to this system, but the engine was designed for experimental purposes anyay, and I''m currently trying to figure some other things out.

I hope this helped.

Sage

Share this post


Link to post
Share on other sites
Hmm, thats sounds like a good idea, I just have one more problem let's say there are multiple players and I wanted it to save every, lets say, 30 minutes, does anyone think I would run in to problems with that if I use Sages idea? because I like Sages idea alot... Thanks Sages!

[EDIT] I've barely started my engine, so it's very flexible at the moment just to let everyone know.[/EDIT]

[edited by - Arturien on January 21, 2003 9:21:41 PM]

Share this post


Link to post
Share on other sites