Crystal Space
Welcome, Guest. Please login or register.
July 31, 2014, 01:15:49 pm

Login with username, password and session length
Search:     Advanced search
9005 Posts in 2043 Topics by 8263 Members
Latest Member: Shiecuanco
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  General Crystal Space Discussion
| | |-+  Huge terrains possible?
« previous next »
Pages: [1] Print
Author Topic: Huge terrains possible?  (Read 2041 times)
Wysardry
Newbie
*
Posts: 17


View Profile
« on: September 29, 2010, 02:25:10 am »

I am looking for a cross-platform game engine suitable for creating a first person RPG with a continuous playable area of over 65,000 square miles (168,350 square kilometres). In height map terms, that's probably around 131,072 pixels square.

It is my understanding that this would require terrain and object paging/streaming plus some sort of local/relative positioning system to avoid floating point inaccuracies.

Can Crystal Space currently handle terrains that large?
Logged
kickvb
Global Moderator
Jr. Member
*****
Posts: 79


View Profile
« Reply #1 on: September 29, 2010, 01:44:58 pm »

Crystal Space has many features that could be useful regarding your needs: a terrain system with paging and splatting, a mesh generator for details such as foliage and rocks, many Level Of Detail systems (static LOD, dynamic LOD with sliding window, and imposters), different water shaders and meshes, a portal system which would be helpful for detailed indoors areas, and a threaded loader for the streamed loading of all of that.

In CEL, there is also a world manager (see the iPcZoneManager property class) which stream load the objects depending on the position of the camera. In CEL, there are also some features such as the path finding and the behavior trees which would help building realistic NPC's.

I don't know how well the positioning problem you mentioned in order to avoid the floating point inaccuracies is managed by the iPcZoneManager property class, but this would at least still to be dealt at the physical simulation level.
« Last Edit: September 29, 2010, 01:54:02 pm by kickvb » Logged
Wysardry
Newbie
*
Posts: 17


View Profile
« Reply #2 on: September 30, 2010, 09:34:18 pm »

If I can work out how maps, regions, zones, sectors, cells and portals relate to each other, I think I may be able to come up with at least one way of doing this.

As a given world space coordinate can belong to more than one sector, I should be able to split the world into small enough pieces that floating point errors never become large enough to cause problems.

Are there any Windows binaries available so that I can test Crystal Space without having to compile the source and install dependencies?
Logged
kickvb
Global Moderator
Jr. Member
*****
Posts: 79


View Profile
« Reply #3 on: October 02, 2010, 04:46:14 pm »

If I can work out how maps, regions, zones, sectors, cells and portals relate to each other, I think I may be able to come up with at least one way of doing this.

The main environment would be made of one big sector. This sector would contain one terrain2 mesh (see http://www.crystalspace3d.org/docs/online/api/structiTerrainSystem.html).

You would have split the terrain in many cells (that can be loaded separately). You can configure the terrain2 mesh to load automatically in background the cells that are close to the camera.

You can add foliage, rocks and such objects on the terrain by using the mesh generator (see http://www.crystalspace3d.org/docs/online/api/structiMeshGenerator.html).

You can also add bigger objects such as small houses, big trees, etc. These objects would be genmeshes (see http://www.crystalspace3d.org/docs/online/api/structiGeneralMeshState.html). These objects can use either imposters, static or progressive LOD in order to have more details when close to them but still having many of them in view all the time (see http://www.crystalspace3d.org/docs/online/manual/Level-of-Detail.html).

When you want to create a big building or dig a cavern onto the terrain, you would create other sectors and connect them with portals. The sectors would be used to split the big building in small areas that can be loaded separately. Portals are used to go from one sector to another, they are also the main way to create a hole in a terrain (eg for the entrance of a cavern). The default level ('castle') of walktest is a good example of a heavy use of portals (although their exact position should be tweaked).

To actually manage to way all these sectors are automatically loaded and unloaded, you would use the iPcZoneManager (see http://crystalspace3d.org/cel/docs/online/manual/PropClass-ZoneMgr.html and http://crystalspace3d.org/cel/docs/online/api/structiPcZoneManager.html). This manager defines the following concepts:
- map: a sector or a list of entities (eg NPC's)
- region: a list of map (ie sectors or entities) that would be loaded alltogether
- zone: a list of region

By defining how the regions are shared by the zones, you can define how these regions will be loaded and unloaded in background from the memory.

Are there any Windows binaries available so that I can test Crystal Space without having to compile the source and install dependencies?

No, sorry, there are still no binary available.
Logged
Wysardry
Newbie
*
Posts: 17


View Profile
« Reply #4 on: October 04, 2010, 12:33:24 am »

Is there any other documentation available, such as in a printed book or on another site? I seem to need to jump around the official docs a lot to find all the info on a particular topic.

For example, I read that "Terrain consists of cells, each cell has its own coordinate system (2-axis position and 3-axis scaling)," but couldn't find mention of what coordinate system is used for positioning objects on or above it.

It doesn't help that the search seems to be broken.
Logged
kickvb
Global Moderator
Jr. Member
*****
Posts: 79


View Profile
« Reply #5 on: October 07, 2010, 05:12:42 pm »

There are several domains where CS is clearly lacking documentation. We would need some help to improve that. For example, if you find the information on the coordinate system of the terrains, then you can fix the documentation and provide a patch (for that, either ask for a programmer account or use the bug tracker http://crystalspace3d.org/trac/CS/report).

If you don't find the info you need on the API doc, the manual or the tutorials (http://www.crystalspace3d.org/main/Tutorials), then you may consider looking at the code of the demo applications (eg in data/terrain*). Blender2crystal has also some examples with terrains and portals (http://leapingcat.org/blender2crystal/index.php/Examples).

In last resort, you can have a look at the code of the terrain mesh. The associated XML loader object is also a general good way to find information on the usage of an object.
Logged
Wysardry
Newbie
*
Posts: 17


View Profile
« Reply #6 on: October 31, 2010, 03:07:20 am »

It took longer than I anticipated, but I've finally managed to get matching versions of CS and CEL to compile with most of the examples working (albeit with warnings about deprecated commands etc.).

I don't have a lot of experience with C++ and none with Python, XML or Texinfo, so it might be a while before I can contribute anything useful to the documentation.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.199 seconds with 15 queries.