Jump to content

Terrain material layers


Recommended Posts

Hi.

 

Fairly certain that what im experiencing is a bug..

 

I am using Leadwerks 3.1 Steam edition to create a terrain.

Under the terrain tab on the right side of the screen, there is a area where you can assign 16 seperate layers.

I can not get more than 2 to actually project onto the terrain at the same time.

Ive tried organising the layers in different configuration, but no matter what its like there might as well be only 2 layers.

 

To try to reproduce the bug, i suppose you could simply attempt to draw 3 seperate materials on a 256x terrain.

Grass, dirt and rock.

Link to comment
Share on other sites

Try and set all transitions to 1 and play with the height/slope for each layer.

 

Layer 1 covers all as a base layer

When you paint on top of base layer, you can only filter the painted layer through slope/height

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

Try and set all transitions to 1 and play with the height/slope for each layer.

 

Layer 1 covers all as a base layer

When you paint on top of base layer, you can only filter the painted layer through slope/height

 

I cant say im having much joy playing around with the settings you mentioned. All im able to do is swap which material had previously been drawn with another layer.

 

Either way, still not able to draw more than 2 materials on the same Terrain.

 

Why 2, anyway.? If its going through vertex colours it should limit me to 3.

 

 

Edit: Ok, ive got 3 materials drawn on screen. But i had to increase the height of the terrain to assign that material to a specific min/max height.

 

what materials I assign to the terrain should not be dictated by the heightmap.

That might be convinient for a mountainous, organic landscape.

But what im trying to achive will not benefit from this.

Link to comment
Share on other sites

As you can see, thats not going to appropriate.

Its meant to be a road btw.

I might have been able to work with it if i could have the road material drawn at min.height 0.5 .. But it always rounds up to a whole integer.

 

..Anyway as i said the height map should not be what decides where materials are drawn.

post-9128-0-28686800-1389541989_thumb.jpg

Link to comment
Share on other sites

I'm surprised that bug made it through. You can fix it immediately by setting Shaders\Editor\TerrainTools\Paint.shader pixel shader to this:

#version 400

uniform vec4 drawcolor;
uniform vec2 toolradius;
uniform float strength;
uniform sampler2D texture0;
uniform vec2 toolposition;
uniform vec4 mask;

in vec2 ex_texcoords0;
in vec4 vertexposition;

out vec4 fragData0;

void main(void)
{
   vec4 current = texture2D(texture0,ex_texcoords0);
   float d = length(vertexposition.xy-toolposition);
   if (toolradius[1]-toolradius[0]>0.0)
   {
       d = 1.0 - (d - toolradius[0]) /(toolradius[1]-toolradius[0]);
   }
   else
   {
       d = 1.0 - (d - toolradius[0]);
   }
   d = clamp(d,0.0,1.0);
   d *= 0.2 * strength;
   fragData0 = current + d * mask;
}

  • Upvote 2

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...