Hex terrain editor
Hex terrain editor
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):
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).
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):
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).
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:
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:
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;
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.
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.)elvman wrote:Ok, I simply changed the material's type from EMT_DETAIL_MAP to EMT_LIGHTMAP and everything works fine.
Cheers and nice work on the terrain editor, maybe I will use it hehe
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.
Here is a good gamedev article on terrain shadows: Fast Computation of Terrain Shadow Maps
Maybe it will help you somehow.