Hex terrain editor [updated]
Hex terrain editor [updated]
Finally I released my terrain/splatting editor. Here are some screenshots:
Features:
Terrain editing
Lightmap (with shadows) generation and filtering
Splatting
For now editor supports only 2 splatting overlays (because of limitations of Irrlicht).
Load save lightmap/splat map (heightmap saving does not work for now, but I will fix this) and save project into .xml file (later I will release the terrain scene node, which is able to load them).
Future plans:
Changing/editing brushes.
Changing the light direction
LOD
More splatting layers
Download: here
Development thread: here
Check it out and post your suggestions etc. here.
Features:
Terrain editing
Lightmap (with shadows) generation and filtering
Splatting
For now editor supports only 2 splatting overlays (because of limitations of Irrlicht).
Load save lightmap/splat map (heightmap saving does not work for now, but I will fix this) and save project into .xml file (later I will release the terrain scene node, which is able to load them).
Future plans:
Changing/editing brushes.
Changing the light direction
LOD
More splatting layers
Download: here
Development thread: here
Check it out and post your suggestions etc. here.
Last edited by elvman on Fri Sep 28, 2007 2:04 pm, edited 5 times in total.
I will decide later if I will release the source of the editor, but I for sure will release the source of modified ShlTerrain scene node (you will be able to load Hex editor's output in your application with it). For now I just want to give Irrlicht developers a tool to generate good quality terrain for their game.mhack wrote:Will you be releasing it with source code?
Hey I modified the shaders so that it automatically produces rock texture on steep parts without doing any splatting. Here is an image showing this in action:
This is what the new shaders look like:
HLSL PS:
HLSL VS:
This is what the new shaders look like:
HLSL PS:
Code: Select all
sampler2D coverage; //coverage
sampler2D lightmap; //lightmap
sampler2D splat1;
sampler2D splat2;
// Pixel shader output structure
struct PS_OUTPUT
{
float4 Color : COLOR0; // Pixel color
};
struct PS_INPUT
{
float4 Position : POSITION;
float4 Diffuse : COLOR0;
float2 LightmapTexCoord : TEXCOORD1; //lightmap texture coords
float2 SplatTexCoord1 : TEXCOORD2; //1st spalt texture coords
float2 SplatTexCoord2 : TEXCOORD3; //2nd spalt texture coords
float normalDist : TEXCOORD0;
};
PS_OUTPUT main( PS_INPUT Input )
{
PS_OUTPUT Output;
float4 TexColor = lerp(tex2D( splat2, Input.SplatTexCoord2),
tex2D( splat1, Input.SplatTexCoord1),Input.normalDist);
float4 LightmapColor = tex2D( lightmap, Input.LightmapTexCoord ); // lightmap
Output.Color = Input.Diffuse * TexColor * LightmapColor;
return Output;
}
Code: Select all
float4x4 mWorldViewProj; // World * View * Projection transformation
// Vertex shader output structure
struct VS_OUTPUT
{
float4 Position : POSITION; // vertex position
float4 Diffuse : COLOR0; // vertex diffuse color
float2 LightmapTexCoord : TEXCOORD1; //lightmap texture coords
float2 SplatTexCoord1 : TEXCOORD2; //1st spalt texture coords
float2 SplatTexCoord2 : TEXCOORD3; //2nd spalt texture coords
float normalDist : TEXCOORD0;
};
struct VS_INPUT
{
float4 Position : POSITION;
float3 Normal : NORMAL;
float4 Diffuse : COLOR0;
float2 TexCoord0 : TEXCOORD0;
float2 TexCoord1 : TEXCOORD1;
};
VS_OUTPUT main(VS_INPUT Input)
{
VS_OUTPUT Output;
// transform position to clip space
Output.Position = mul(Input.Position, mWorldViewProj);
Output.Diffuse = Input.Diffuse;
Output.LightmapTexCoord = Input.TexCoord1;
Output.SplatTexCoord1 = Input.TexCoord0;
Output.SplatTexCoord2 = Input.TexCoord0;
Output.normalDist = Input.Normal.y;
return Output;
}
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact:
It shouldn't be over the capabilites. IIRC it didn't allow more than 4 texcoords so its probably even lower than PS 1.4. It'll run fine on your card MonkeyCracks...
BTW The thing I just made goes faster then the original splatting thing because it doesn't have to read from an additional texture to know how to splat it, it just tests the normal.
BTW The thing I just made goes faster then the original splatting thing because it doesn't have to read from an additional texture to know how to splat it, it just tests the normal.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Nice editor. Your terrain is very smooth. And the texture splat looks good too. Great.
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
Hey no offense but "Hex Editor"? A Hex editor is a used for modifying code such as this one:
http://www.chmaas.handshake.de/delphi/f ... /xvi32.htm
I came thinking someone had built a Hex Editor in Irrlicht code...
http://www.chmaas.handshake.de/delphi/f ... /xvi32.htm
I came thinking someone had built a Hex Editor in Irrlicht code...
-
- Posts: 275
- Joined: Fri May 12, 2006 6:37 pm
- Location: Germany
There were many reasons why we chose the name "Project Hex" for our project an that's the reason why project's built-in level editor is named "Hex editor". But I agree that it can be confusing and changed the topic's title to "Hex terrain editor".Hey no offense but "Hex Editor"? A Hex editor is a used for modifying code such as this one:
P.S. The editor I am presenting here is not a fully functional level editor, it is only a terrain editor (the real level editor is a little bit upgraded and has all needed features for our game).