Hex terrain editor

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Hex terrain editor

Post by elvman »

Today I started making an editor for ShlTerrainSceneNode. I inspired from Ogres Editable Terrain manager found here.
Features: it can export the lightmap and heightmap to a .BMP file. Note: this is a really early version which is now under development.
This is the first screenshot (only lightmap generation, no shadows):
Image
I plan to add raytraced shadows tomorrow.
Your suggestions are welcome.
P.S. Arras, I guess I apply lightmap to ShlTerrain in a wrong way, the terrain is too light. I apply the base texture to material level 0 and the lightmap to level 1 (if I apply the base texture to level 1 and the shadowmap to level 0, it doesn't work at all).
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Textures in my terrain node are reversed due to some bugs in OpenGL. That may cause this.
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

This screenshot was made with Direct3D. With OpenGL lightmapping doesn't work at all.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

What I mean is that in my terrain difusemap is loaded as detail map and detail map as difuse map.

EMT_DETAIL_MAP material works like this:
texture layer 0 = difuse map
texture layer 1 = detail map

In my terrain node textures are swaped. detail map is loaded in to layer 0 and difuse map (which is my color map) is loaded in to layer 1:

In constructor:

Code: Select all

Material[0].Textures[1] = CTexture;
I did it in this way because color map was not updated properly in OpenGl.

It is not howe EMT_DETAIL_MAP is intended to work, thats why you may have problems with it. But that is only suggestion.

Another problem can be that you use too bright texture.
From API:
The detail map is added to the diffuse map using ADD_SIGNED, so that it is possible to add and substract color from the diffuse map. For example a value of (127,127,127) will not change the appearance of the diffuse map at all.
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

Ok, I simply changed the material's type from EMT_DETAIL_MAP to EMT_LIGHTMAP and everything works fine.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

elvman wrote:Ok, I simply changed the material's type from EMT_DETAIL_MAP to EMT_LIGHTMAP and everything works fine.
This maaay cause a very slight problem from the modified "shadowWrapper" i sent you. Infact it is easy just open it and change all the places that say "EMT_DETAIL_MAP" to "EMT_LIGHTMAP" and it will be fine. (The places where it checks what the material of the node is.)

Cheers and nice work on the terrain editor, maybe I will use it hehe
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

Ok, here is another screenshot:
Image
What I have done is:
Lightmap is now filtered.
Added brush support.
Added shadows, but I won't show them yet, they are really strange. I will have to tweak them a little bit.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Wow that looks awesome im really liking the lightmap.. What methods are you using to generate it?

Here is a good gamedev article on terrain shadows: Fast Computation of Terrain Shadow Maps

Maybe it will help you somehow.
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

Another screenshot (with shadows):
Image
The shadow looks weird because of the low resolution of lightmap.
Plans: tomorrow I plan to implement splatting and make the shadows look better (increase the resolution of lightmap).
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Looks nice. Good luck :)
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

Another screenshot:
Image
Improved the lightmap quality and filtering and finally fixed the shadows.

TODO:Add texture splatting to ShlTerrain.
JRowe47
Posts: 55
Joined: Sat Jun 30, 2007 9:09 am

Post by JRowe47 »

Why 'hex' ?
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

Thats the name of the game for which this editor is made. But I will release it as a separate terrain and splat editor/lightmap generator.
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

Image
Here is a new screenshot with splatting support.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Whoa that is amazing, Im sure MonkeyCracks cant wait for this one :P

Good job on the splatting it looks very smooth and nice.
Post Reply