Terrain demonstration

A forum about everything related to the Cafu World Editor CaWE: mapping, editing, scripting, making GUIs and fonts, using the BSP, PVS and Light compilers.
User avatar
Thrawn
Posts: 302
Joined: 2004-08-30, 10:38
Location: NRW, Germany
Contact:

Terrain demonstration

Post by Thrawn » 2005-10-16, 14:56

Hi,

I'm playing around with some terrains to show the possible size. My first try was an empty arctic terrain, but you can't get the size of it though. Have to try something else. Anyways, here are some shots.

Image

The red arrow marks the trinity bot that failed to follow :D

Image
Image
ReFlex
Posts: 5
Joined: 2004-09-16, 20:18
Location: Austria
Contact:

Post by ReFlex » 2006-04-21, 11:35

looks very nice dude!
Image
Sindwiller
Posts: 108
Joined: 2006-04-14, 21:11
Location: Zürich, Switzerland

Post by Sindwiller » 2006-04-21, 11:51

Indeed, it looks very cool. I wonder how big the terrain is...

Wfr, Sindwiller
Im Working on:
- Some Linux Bash-Scripts for installing stuff. Dont ask further questions, because i can't explain that more simple ^^
User avatar
Kai
Posts: 177
Joined: 2004-08-19, 15:56
Location: Germany
Contact:

Post by Kai » 2006-04-21, 12:06

Very very big ;)

We tested dimensions for the upcoming techdemo, and currently we want to use a 1x1 km size which sounds small but it takes quite a while to go from one end to the other.

Of course its possible to create a much bigger terrain, im not sure what the limit is (if there is any at all ;) )
User avatar
Thrawn
Posts: 302
Joined: 2004-08-30, 10:38
Location: NRW, Germany
Contact:

Post by Thrawn » 2006-04-21, 12:15

Well they can be even BIGGER ^^

What you see on the screen is just 1 single terrain but you can also put multiple onces next to each other. It's easy to create levels that take you about 10 minutes to walk through :)

As Ca3DE also supports LoD models and soon other cool features of the Battlefield 2 engine, it's possible to build a BF2 like game or a flight simulator with this engine, of course with even larger maps if you wish... :D
Image
Sindwiller
Posts: 108
Joined: 2006-04-14, 21:11
Location: Zürich, Switzerland

Post by Sindwiller » 2006-04-21, 12:27

Sounds like fun! :D

Wfr, Sindwiller
Im Working on:
- Some Linux Bash-Scripts for installing stuff. Dont ask further questions, because i can't explain that more simple ^^
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Post by Carsten » 2006-04-21, 13:01

Wow, great shots, Thrawn!! :D
Best regards,
Carsten
User avatar
Thrawn
Posts: 302
Joined: 2004-08-30, 10:38
Location: NRW, Germany
Contact:

Post by Thrawn » 2006-04-21, 13:06

Posted: Sun Oct 16, 2005 2:56 pm Post subject: Terrain demonstration

Well their are a bit older, but noone ever saw them I guess :D
Image
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Post by Carsten » 2006-04-23, 10:34

Oh. :oops: At least I could not remember. I was just too impressed by tiny Trinity. ;)
Best regards,
Carsten
Jojimbo
Posts: 23
Joined: 2007-05-29, 09:38

Post by Jojimbo » 2007-06-01, 01:25

Thrawn "Trinity,come back!!! I didnt mean it!!!
hehehe took me a good long time to cross the terrain in the tech demo from end to end,I do believe its a partial size?
I was well impressed.

ok i have made a 1025 png heightfield but cawe is at first attempt really is a non starter.i followed the instructions on the wiki,but apart from the skybox i can see anything.even wireframe doesnt want to work and this program seems very memory intensive.

Thrawn could you please do a step by step explanation including "values" i was asked for i dont understand.ill browse some more see if theres something i missed.
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Post by Carsten » 2007-06-01, 11:47

Jojimbo wrote:hehehe took me a good long time to cross the terrain in the tech demo from end to end,I do believe its a partial size?
If by partial size you mean if this is the maximum possible size or not, then no, this is not the maximum, we can go bigger without problems. ;)
ok i have made a 1025 png heightfield but cawe is at first attempt really is a non starter.i followed the instructions on the wiki,but apart from the skybox i can see anything.even wireframe doesnt want to work and this program seems very memory intensive.
Sorry, I don't quite get the problem: Did you mean that apart from the skybox you cannot see anything? Please let us know what exactly you tried and what exactly didn't work as expected.

About the memory: Well, yes, for the TechDemo you need 1 GB of RAM. For CaWE, 512 MB should be sufficient for all but the biggest maps, 1 GB as always is better. (And not many other programs should run in parallel.)
Thrawn could you please do a step by step explanation including "values" i was asked for i dont understand.ill browse some more see if theres something i missed.
What exactly do you need step-by-step info for, and which values? Again, please let us know. :up:
Best regards,
Carsten
User avatar
Thrawn
Posts: 302
Joined: 2004-08-30, 10:38
Location: NRW, Germany
Contact:

Post by Thrawn » 2007-06-01, 16:21

Hi Jojimbo, I'm sorry that I can't answer you very detaild as I have no time at all (I will be gone till sunday night) in 5 minutes. Anyways I gave my best to write a quick terrain importing tutorial. The last step might be most interesting for you. I hope it helps, if not please ask Carsten for help or wiat until I return sunday night. Sorry again but I didn't have the time for more...

Here it is...

------------------------------------------------------

Tutorial: Importing terrains

Step 1: Create Terrain


The first step is to create your terrain with a heightmap editor. You need a heightmap (black&white picture) sized 257x257, 513x513, 1025x1025 or 2049x2049 pixels (supported formats are .ter / .bmp / .tga / .png / .jpg) . Furthermore, you need a texture map for your terrain. This texture has to have 256x256, 512x512, 1024x1024 or 2048x2048 pixels (supported formats: .bmp / .tga / .png / .jpg). In this example I tell my terrain "my_terrain.ter" .

Step 2: Move the terrain into the right directories

The heightmap has to be placed in:

Code: Select all

Ca3D-Engine\Games\DeathMatch\Terrains
The texture for the terrain has to be put into:

Code: Select all

Ca3D-Engine\Games\DeathMatch\Textures\Terrains
Step 3: Create a material/shader file for the terrain texture:

Open the texteditor to write a material file for your terrain texture,copy into it:

Terrains/my_terraintexture //this is the name of your texture
{
AmbientShader A_Terrain // Override the automatic shader selection.
LightShader none1234 // Override the automatic shader selection - make sure no light shader is selected.
// noDynLight // Same effect as the previous line.

diffusemap Textures/Terrains/Terrains/my_terraintexture.png, wrapS clampToEdge, wrapT clampToEdge
lightmap $lightmap // Ambient shader "A_Terrain" requires a lightmap.
lumamap Textures/Terrains/CommonDetail1.png // "A_Terrain" takes the Luma-map as Detail-map (optional).

shaderParamExpr fParam4 // The first eight shader parameters are taken from fParam4 to fParam11
shaderParamExpr fParam5 // and specify the coefficients of two planes for automatic tex-coord generation.
shaderParamExpr fParam6
shaderParamExpr fParam7
shaderParamExpr fParam8
shaderParamExpr fParam9
shaderParamExpr fParam10
shaderParamExpr fParam11
shaderParamExpr 21.3 // Scale / Repetitions of the Detail-map.

twoSided // "twosided" is required for the SOAR terrain algorithm.
}

Note: Change my_terraintexture.png accoding to your texture name and filetype. CommonDetail1.png is the default detail texture and can be found at

Code: Select all

Ca3D-Engine\Games\DeathMatch\Textures\Terrains
Save it as your_terrain.cmat and place the file into

Code: Select all

Ca3D-Engine\Games\DeathMatch\Materials
Step 4: Placing the terrain in the editor

Open up CaWE, the maping editor. Select the terrain tool in the menu on the left side, drag a „face/surface area“ and press Enter. A properties pop-up will occur. Terrain heightmap file name should be selected. In the small box next to it („value“) write

Terrains/my_terrain.ter

Of course you have to replace the filenyme and filetype with that of yours.

Press „Set all“ and close the window, the terrain will be loaded.

Now press Alt+Enter and select „Terrain material name“ and use as value

Terrains/my_terraintexture

Again press „Set all“ and the terrian texture will be loaded.

Done, now you can scale the terrain as you want by moving it's corners.
Image
Jojimbo
Posts: 23
Joined: 2007-05-29, 09:38

Post by Jojimbo » 2007-06-02, 02:20

thanks thrawn none of the files were in the right place let me look into it
Jojimbo
Posts: 23
Joined: 2007-05-29, 09:38

Post by Jojimbo » 2007-06-02, 03:20

ok did all that but how do i test it in the editor,ca3d only allows me to play 3 maps none of which is my test map?
ok i can see the map by adding a camera :oops: however i can't see all of the map due to view distance i think,how can i get the camera to see all of the map,its quite big :)
how do i make a cw file? so i can test in the engine?look at this compile error log whats going wrong?

> compile (quick) C:\Ca3DE-SDK\Projects\Ca3D-Engine\Games\DeathMatch\Maps\savanna.cmap

C:\Ca3DE-SDK\Projects\Ca3D-Engine>C:\Ca3DE-SDK\Projects\Ca3D-Engine\CaBSP.exe Games\DeathMatch\Maps\savanna.cmap Games\DeathMatch\Worlds\savanna.cw

*** Ca3DE Binary Space Partitioning Utility, Version 9 (Mar 6 2007) ***


Registering archive "Games/DeathMatch/Textures/TechDemo.zip".
Registering archive "Games/DeathMatch/Textures/SkyDomes.zip".
File Games\DeathMatch\Worlds/../Materials/Terrains.cmat, material "Terrains/savanna.png": duplicate definition (ignored).
*** Load World Games\DeathMatch\Maps\savanna.cmap ***
Face Children : 36 Draw World Outer Point Samples: 6
PointLights : 0
InfoPlayerStarts : 1
Other Children : 1
GameEntities : 0

*** Binary Space Partitioning *** 0: 0: 1
Nodes created : 30
Leaves created : 31
Faces : 42

*** Portalization *** 0: 0: 1
Portalization : done
Portals : 134

*** Fill Inside *** 0: 0: 1
Faces : 6

*** Chop Up Interpenetrations *** 0: 0: 1
Faces : 6

*** Binary Space Partitioning *** 0: 0: 1
Nodes created : 12
Leaves created : 13
Faces : 12

*** Portalization *** 0: 0: 1
Portalization : done
Portals : 36

*** Fill Inside *** 0: 0: 1

### LEAK DETECTED! ###

A leak is a hole in the world, where the inside of it is exposed to the
(unwanted) outside region. Thus, I generated a leak pointfile.
Load this file into your world editor, and find the beginning of the line.
Hint: The beginning is always near one of the "info_player_start" entities.
Then find and fix the leak by tracing the line until you reach the outside.
(I always take the shortest path, so this should be easy.)

Notes:
- Leaks can be *very* small. Use a close-up view, if necessary.
- Use the grid. The grid is useful to fix leaks + to avoid them from the start.
- Make sure that *all* "info_player_start" entities are inside the world!
- The pointfile assumes that WcMap2Ca.exe scaled the world by factor 25.4.
- Be aware that both the clip hull and the draw hull must be sealed.
- Please refer to the documentation for additional information.

Pointfile written to Games\DeathMatch\Maps\savanna.pts

FATAL ERROR: Stopped by leak.
Program aborted.


C:\Ca3DE-SDK\Projects\Ca3D-Engine>C:\Ca3DE-SDK\Projects\Ca3D-Engine\CaPVS.exe Games\DeathMatch\Worlds\savanna.cw -maxRecDepthSL 15

*** Ca3DE Potentially Visibility Set Utility, Version 05 (Mar 6 2007) ***


Registering archive "Games/DeathMatch/Textures/TechDemo.zip".
Registering archive "Games/DeathMatch/Textures/SkyDomes.zip".
maxRecDepthSL == 15
File Games\DeathMatch\Worlds/../Materials/Terrains.cmat, material "Terrains/savanna.png": duplicate definition (ignored).
*** Load World Games\DeathMatch\Worlds\savanna.cw ***

FATAL ERROR: Invalid file header. Not a Ca3DE world file.
Program aborted.


C:\Ca3DE-SDK\Projects\Ca3D-Engine>C:\Ca3DE-SDK\Projects\Ca3D-Engine\CaLight.exe Games\DeathMatch\Worlds\savanna.cw -gd=Games\DeathMatch\ -fast

*** Ca3DE Lighting Utility, Version 3 (Mar 6 2007) ***


Registering archive "Games/DeathMatch/Textures/TechDemo.zip".
Registering archive "Games/DeathMatch/Textures/SkyDomes.zip".
File Games\DeathMatch\/Materials/Terrains.cmat, material "Terrains/savanna.png": duplicate definition (ignored).
Loading World 'Games\DeathMatch\Worlds\savanna.cw'.

Type "CaLight" (without any parameters) for help.

FATAL ERROR: Invalid file header. Not a Ca3DE world file.
Program aborted.

Process 2828 ended normally with exit code 1.
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Post by Carsten » 2007-06-02, 11:49

Hi Jojimbo,
Jojimbo wrote:ok did all that but how do i test it in the editor,ca3d only allows me to play 3 maps none of which is my test map?
The reason is that your map is not properly compiled, so the fact that it is missing from the worlds list is a direct consequence of your next question, please see below. ;)
ok i can see the map by adding a camera :oops:
Ok, but please note that you can also move in the 2D and 3D views by just moving the mouse cursor over them, and then pressing the arrow keys.

In the 3D view, you can also use the A, W, S and D keys. These four keys and the arrow keys do always work, independently from the camera tool being currently active or not.

Moreover, when the Camera tool is active, you can move the mouse into the 3D view, then press and hold the left, the right or both mouse buttons, and then move the mouse while you hold the button(s). The left button alone will rotate the camera when you move the mouse ("look around", "aim"), the right button alone and in combination will move the camera when you move around.

This of course should be documented in the Ca3DE Wiki and its my fault that it still isn't. :oops:
however i can't see all of the map due to view distance i think,how can i get the camera to see all of the map,its quite big :)
In the config dialog
Image
please select the "3D views" tab. In that tab, you will find a slider "Back clipping plane" whose value is by default set to 5000. Move it to higher values in order to move the back clipping plane farther away.
However, please note that setting this value to big numbers can also decrease the rendering performance in CaWE, because CaWE is not as sophisticated as Ca3DE itself when it comes to rendering a huge number of objects (especially in the distance) at good performance.
how do i make a cw file? so i can test in the engine?look at this compile error log whats going wrong?
This is the important part of the log:

Code: Select all

*** Fill Inside ***                                 0: 0: 1

### LEAK DETECTED! ###

A leak is a hole in the world, where the inside of it is exposed to the
(unwanted) outside region. Thus, I generated a leak pointfile.
Load this file into your world editor, and find the beginning of the line.
Hint: The beginning is always near one of the "info_player_start" entities.
Then find and fix the leak by tracing the line until you reach the outside.
(I always take the shortest path, so this should be easy.)

Notes:
- Leaks can be *very* small. Use a close-up view, if necessary.
- Use the grid. The grid is useful to fix leaks + to avoid them from the start.
- Make sure that *all* "info_player_start" entities are inside the world!
- The pointfile assumes that WcMap2Ca.exe scaled the world by factor 25.4.
- Be aware that both the clip hull and the draw hull must be sealed.
- Please refer to the documentation for additional information.

Pointfile written to Games\DeathMatch\Maps\savanna.pts

FATAL ERROR: Stopped by leak.
Program aborted.
I just realize that here, too, the CaWE documentation is terribly sparse, and I will have to fix that asap.

In order to help you now rather than only when I've finished updating the docs, please take the following steps to understand and fix the problem:
  1. http://developer.valvesoftware.com/wiki/Leaks_Explained
    It's a non-Ca3DE site, but applies analogously. (TODO: I'll have to put something like this into the Ca3DE Wiki soon...)
  2. http://www.ca3d-engine.de/wiki/mapping:cawe:leaks
    The current Ca3DE documentation about leaks...
  3. CaBSP generates pointfiles, too, and you can load them also in CaWE, in most cases it even knows the right filename and so the process is fully automatic: Just select the Map --> Load Pointfile menu entry and then look for the red line.
Btw., you may also want to turn off the CaPVS and CaLight compilers for your first map tests, please see http://www.ca3d-engine.de/wiki/mapping:compiling_new for more details.

Jojimbo, I hope the above helps, please let me know otherwise. I'm also happy that you made me aware of the worst spots of missing material in the CaWE docs, and I'll do my best to fix them soon. :idea:
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests