Anyone done this with acceptable results > Height blending [SOLVED]

I can not seem to get the texture to pop out when using the height texture and blending the height layers. If i just attach one height map then i can get that texture to pop out and look ok.

What i am asking about is, has anyone blended the height textures into layers to apply to the landscape and get all the height maps to work properly. I either get errors trying to connect the HEIGHT sections together or i get them to connect, but its all to dark < can not see textures.

If any can help or are interested figuring this out and want to help i will give my height tessellation material function to you. This is for UDK, not UNreal4.

I’m not sure what you mean by “pop out” or “blending the height layers.”

Are you making a landscape? Maybe I don’t understand what you’re doing because I’m pretty sure that when you’re making a landscape you can only have one heightmap.

I think you might be having problems with importing layers? But I don’t understand what you mean by “trying to connect the HEIGHT sections” or why you would need to tessellate the landscape…

I’d like to help, but can you try to clarify what you’re doing? Maybe you can provide some screenshots.

I’ve gotten it to work UE4, but pretty sure it’s the exact same shader and functionality in UDK.
the result is quite limited though, making it pop out and look natural was never possible in my experience, so I resorted to implementing something similar to this method: Gamasutra: Andrey Mishkinis's Blog - Advanced Terrain Texture Splatting - there’s nothing there specific to UE4 that wouldn’t work in UDK

ok this is what i am doing i enabled dx11 so i could get tessellation to work and i set that code up np and it works excellent. The problem i have is i am adding in my height map as an alpha channel in the diffuse texture. Then i made 2 material functions to get the textures as in a diffuse and a normal and to seperate out the channels into different textures as in diffuse, height and normal then i take the 3 textures and i combine them as i have 3 for 1 layer to make that layers material then i apply the height textures to a lerp to combine them into 1 height texture then each layer i lerp the height together while being trigger by the layer name when used. but when i hook up the textures to the displacement node i get float errors. Iguess best place to start is i will show you the tessellation displacement material function. then i will post some pics of the height map stuff so we can maybe solve this so we can all use it.

Edit: Do you think maybe i should incorporate the height texture into the aplha of the normal? and pull it from there? We will need it in one or anothers alpha channel at the start.


Add that to your material and hook it up to the matching root settings. Also in the main material go down to tesellation section and enable flat tesellation. Then all we have to do is get the height maps all into 1 and hook it up to that height pin and we are done. if i hook up one height only i can get it to show up with 3d looking texture. if i combine them into 1 layer they are flat no 3d look. In the tessellation area when in the map playing. In editor put it on brush mode and you will see the tessellation is just around 150 units around the player only. So the displacement or height map will make that tessellated area look 3d. It looks awesome once it’s set right.

Here is the main materials function to get it started.

Here is my combine_mat_function to combine the materials to 1 mat of each in its layer.

Then in your main material it should look like so

Here is where i am having the issue at


When i hook that up i get those errors at the top left. Any ideas? But the error shows it is coming from the start function of each texture. No matter where i break the lines in the height section the error goes away from the start function. Just not sure where i messed up at.

Here is the result of 1 height texture applied and not multiple

If i take it from Lerp B and put it on Powers base then i can get that result in the pic. If i leave it to Lerp B . Then i get the above errors when all height layers are hooked up. The height texture is rough but works for testing. As you can see in the preview picture it is working.

If i do what is in this picture it is not 3d but flat.



If i unhook height from lerpA and put in a constant it will show a texture but it is flat no in 3d. So when i hook up all height textures into 1 then try to apply i get errors. until i do whats in second picture then it shows but not 3d.

Landscapelayerblend seems to have a problem, that wants to make a texture dark. If i hook up a texture directly to the root i can see it NP. If i hook 1 up thru a Landscapelayerblend node, all goes dark.
Can not get any brightness from the material, just breaks it. Buggy â– â– â–  â– â– â– â– !

Edit: Solved brightness issue preview set to 1.0. Not 0.0
Got it to work using multiples and not lerps. Lerps seem to kill the 3d effect. As soon as you hook one up, its info for 3d is gone. Using multiples gives this result


I did not use the 2 functions i made i just used this.

I figure few things out and i thought i would share these settings with you all.
In the UDK_Height_Func make settings 10 and -10 to -0.01 to 0.01 Ten was way to much, So i set it to 5. I will show you in pics.
Here is the 5.0 Setting

Here is the 0.1 Setting

Here is the 0.01 Setting


Here is what the tessellation out come looks like from using the UDK_Height_Func in wireframe.

Took a bit to realize the number had to be so low and it still does not see right. But you can see it is working.

I finally got the blend to work here is what i did in the material. When i did not have the dotproduct added after 3 minutes the editor would crash and restart my comp.

Here are couple pictures of the blending. I need to make much better displacement textures or there is something wrong in the engine?


Here is another but it looks terrible. But shows it does work.

Any one have any ideas? Bad displacement texture or engine causing this?

I just tried a 4k texture from mega scans and here is the results


You can see the right looks very nice that is the 4k texture then my displacement on left which is bad needs reworked.

Here are some finished pics using 4k textures.
I just added all 4k textures and normals and displacements to a map and this is the results

Dirt Road or dirt trail

Dirt Road or dirt trail landscape tessellation

Get good displacement textures and they will turn out nice.

1 Like

One problem left to solve. Anyone know the fix for this?
Tiny slices in the landscape. Do i need to use a mask on that to fix it?

Looking pretty good. What kind of impact to performance are you seeing? When I briefly tested tessellation on my landscape, I saw a big drop in performance. This was without much testing at all though.

Regarding those seams. I believe there is mention of UV seams in tessellated meshes in the documentation: UDK | TessellationDX11

Here are some pics of a few things i reworked.
Added Tessellation parameter adjusters to the function

Main material New inputs to hook up on tessellation to control it.

Here is Full material

Material instance with its new settings to adjust.

Here is pic textured.

Same pic in wireframe

Now that i got all this in. Let me test the fps with it on and off and will reply back on how it acts.

Interesting findings on my end here is old textures pic these textures are 512 to 1024 no tessellation or displacement added. 27.73 fps

Stat_Memory test OLD.

Here is the new 4k textures with tessellation and displacement enabled. 23.44 fps

Stat_Memory test 4k.

You can see on my machine there is no real difference in fps. It only dropped my fps by 4. No real difference here in fps. let me test rest the stats get back to you with those tests. We are hammering the volume memory full on in both. Lighting and shadow memory doubled. Texture memory went up 100 mbs.

@
What are your precomputed volume memory stats on your maps?

Fixed the slices, but had to extend out the distance to 500. Basically hiding them out of view.
Changed setting on the material instance to the following
Tessellation Distance = 500.0
Tessellation FallOff = 500.0
Tessellation FallOffCurve = 1.0
Tessellation FallOffDistance = 2.0

Hit me for a 10 fps more loss.
Pic of the slices gone


Same pic in wireframe

PICTURE OF FINISHED ROCK

PICTURE OF FINISHED ROCK MESH

To accomplish this i had to extend the distance out to 500 which took the tessellation out a bit picto show how far out it goes

Going to mess with setting in the height function to see if i can fix the slices to bring the distance back in some.

EDIT: NEW SETTINGS TO FIX SLICES
Tessellation Distance = 150.0
Tessellation FallOff = 150.0
Tessellation FallOffCurve =0.2
Tessellation FallOffDistance = 0.9

Seems to be about the best settings
Edit: settings change from editor to game, so you will just have to play around with the numbers until you find happy medium. Good luck with this if using it. Slices are a pain to get rid of. Also dropped 10 to 15 fps with this enabled.

After trying lots of different things today to get rid of the slices in the mesh. I found OUT A FEW THINGS THAT DO NOT WORK AT ALL. If you try and take the R and G channel from the normal and add them to make displacement. It will not work right, causes to many points or jags with tons of white spots. The secret to getting good results is coming up with good displacement map or texture. Once you have made those properly you will get good results. As in the formation of the mesh being properly made to match the material.

Have you tested reducing the mesh complexity on the tessellation. It seem unnecessarily high, and perhaps reducing it my 90% may not impact the visual quality, but dramatically reduce your scene rendering complexity.

On my main mesh i have it set in landscape properties 6 and 3, cant go anymore on those settings they seemed close as you can get the tessellation. have to set the close tessellation a lot closer and just keep playing with settings until i can find a good looking setting with good performance, if that is even achievable. Finally figured out how to make a half way decent displacement map which helps out a lot.

Picture of the creek i kind of got a decent displacement.


2nd creek picture.


Still figuring out good settings in adobe for making displacement textures. These have been the best results i have gotten so far on a 512x512 texture.

Edited the height function to this helps hide slices.

Before setting up settings


After setting up numbers in mat_inst

You can see no more slices up close.
EDIT: Settings to fix slices up close.
Tessellation Distance = 800.0
Tessellation FallOff = 750.0
Tessellation FallOffCurve =0.7
Tessellation FallOffDistance = 0.4

Took awhile to get it all functioning decently and usable.

I will definitely be trying this soon with my landscape.

One thing I’m unsure of though is how to force the game to run at DX11 without creating a shortcut and adding the launch param.