x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UE4 landscape height blend

Hello i have some questions regarding UE4's landscape blending shaders.

Is it possible to height blend more than 3 materials? From the research i have done and the errors i get myself it does not seem to be possible. One year ago another user asked for help about this but apparently no one knew if there was a solution:

https://answers.unrealengine.com/questions/143369/landscape-painting-errors.html

And does tessellation work with more than 3 height-blended materials? There is a package for sale on UE4's marketplace called "Adv.Disp.Landscape Materials" with a landscape shader blending between 3 textures based on height-map. It looks to me like no one have been able to blend more than that with tessellation. Here is a link to my unanswered question regarding landscape tessellation blending:

https://answers.unrealengine.com/questions/193988/height-blended-tesselation-tearing.html

Landscape-height blend error: The error that most users get (and myself) is that when painting the fourth material in an area the whole area gets the "standard grid material" color. Having the first material as an alpha blend does not work.

Landscape tessellation height-blend error: Where two textures meet the geometry breaks which result in holes in the landscape.

Product Version: Not Selected
Tags:
more ▼

asked Mar 19 '15 at 09:58 AM in Using UE4

avatar image

Tireless
123 8 14 16

avatar image Zeroy Mar 24 '15 at 10:58 AM

This is superb work / results! Would you say its suitable for large landscape (25000unit square?) - Also for the Shader/MAT, I have tried to adapt the one from Landscape Example to accomodate more layers but results are not ideal and no tesselation, are you considering releasing the shader Tireless?

Thanks!

avatar image Tireless Mar 24 '15 at 02:11 PM

Thank you Zeroy! I can't be sure yet, since I just got this working but my guess would be yes. The tessellation is quite demanding but it's only dividing geometry close to the camera so it should not be dependent on map size. The other part is simply a number of textures/materials. I will post a breakdown of the shader when I have had time to do some more testing with more materials.

In the meantime check out the project on Polycount or my website: http://www.polycount.com/forum/showthread.php?p=2271221#post2271221 http://oskarselin.com/forest%20wip.html

Have you tried the stuff i mention further down on this page?: http://www.polycount.com/forum/showthread.php?t=150431

avatar image Zeroy Mar 24 '15 at 02:46 PM

Thanks! I am doing a very similar project, albeit without Modelling! I have tried tesselation on Landscape but my experience was that alone its ok in terms of FPS but when doing foliage stuff and fully dynamic lighting with LPV for GI it becomes too much! Still working on things anyway, I will follow your progress also!

avatar image Tireless Mar 24 '15 at 02:57 PM

Okay, I might have to remove tessellation when i add more things to the scene, like you say it eats fps. Fully dynamic lighting sounds really expensive, do you use that for foliage shadows mostly? Send me a link if you have your project posted somewhere!

avatar image Zeroy Mar 24 '15 at 03:11 PM

Nothing posted online yet, just started this a few weeks back. A great way to learn the Engine! To answer your question my project is an Island and has full day/night cycle so Skylight and Sunlight are fully dynamic which bring some interesting challenges :) - The main reason I am interested in your Lanscape is that it looks like you succeeded at using height map based very well, something I tried to do and failed so far - mind you I am greedy and want to keep ability to paint layers too ... Hence why I went for the Landscape Example and modified it to allow for 5 layer total

avatar image Tireless Mar 24 '15 at 03:19 PM

Sounds really interesting! Let me know if you post it in the future.

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Have you tried setting your Sampler source to Shared: Wrap?

alt text

more ▼

answered Mar 19 '15 at 11:54 AM

avatar image

MauroRobert
135 1 5 10

avatar image Tireless Mar 19 '15 at 04:17 PM

Thank you! Now I can blend my landscape materials with the height-map values. Here is a screenshot of the blending: http://i.imgur.com/xnsm0zS.png

In the corners where three textures blend I get a black gap. Can I do anything to prevent that? http://i.imgur.com/XdwL1jR.png

Do you have a solution to get tessellation working with this? Here is a link to my shader with tessellation applied: http://i.imgur.com/uRKejIg.png

Its only showing me two layers, not five.

Here is the tessellation landscape shader: http://i.imgur.com/m7ppLSk.png

If you need any more info let me know!

avatar image MauroRobert Mar 19 '15 at 04:35 PM

You're welcome! I can't really help you with the tesselation as I generally use bump offsets, but I have to admit this looks very stunning, especially your rock layer!

Usually when you have gaps this is because the height maps render a 'hard edge' where the mats are blended together. One could try to fill these with a (non heightblended) material. For example a layer of dirt painted in at 0.1% density is practically invisible, but may blend things together a little better. I don't know if that solves the tesselation gaps but it might pull the edges down back to default height.

You could also try to link your height to your displacement / height maps instead of having it directly hooked up to your tesselation (I don't know if that will work but it might be worth a try).

I am unsure how you set this up precisley but shouldn't Layer_01 and 02 be called Rock, Grass etc as well? As far as I know layers with different names never show up.

(comments are locked)
10|2000 characters needed characters left

Thank you Mauro Robert! I removed height-blend for the grass and used it as "blend fixer" as you suggested. Now i have tessellation and height-blending working with 4 materials! I'm exited to see if it will work when i stack on more materials later on.

Summary: Some of the fixes i applied that made it work :

  • Enable tessellation, add Flat Tessellation, check "Crack Free Displacement"

  • Change every texture sample source to "Shared:Wrap"

  • Use VertexNormalWS for the world displacement maps

  • Don't put in any value in "Tessellation Multiplier"

  • Name the first layer in the "Landscape Layer Blend" "LayerDontUse" and make it "LB Alpha Blend". Later on give it a non-weight-blend landscape layer info and don't use it.

  • Have one of the layered materials set to "LB Weight Blend" and not "Height-blend". I did that for my grass material and used it to "smooth" between the painted height layers.

I consider the question solved and i'm happy that this was possible in UE4. Later on I will make a thread on polycount and post my progress on the scene and do some breakdown on materials, shaders etc.

more ▼

answered Mar 19 '15 at 06:41 PM

avatar image

Tireless
123 8 14 16

avatar image MauroRobert Mar 19 '15 at 07:19 PM

Congrats on getting this working so quickly! Would love to see screenshots of it all working! :) Actually you convinced me to experiment a bit with tesselation too. Does it run well for you frameratewise and do your shaders take long to compile?

avatar image Tireless Mar 19 '15 at 07:44 PM

Sure, i will post a link to an imgur pic tomorrow. Nice best of luck to you! With settings on Epic and textures on High it is a bit laggy. I have a 1 year old laptop so with a good stationary computer i think it would run good. I have a big landscape imported from world machine and the shader takes about 3 minutes to compile. Cheers!

avatar image MauroRobert Mar 19 '15 at 07:51 PM

Very cool, looking forward to seeing that landscape! All the best!

avatar image Tireless Mar 19 '15 at 09:15 PM

Some pictures of the shader in action! This test scene is quite rough. It is possible to go over each rock/leaf and make sure no grass is showing through etc. http://i.imgur.com/Qig3G2y.jpg

http://i.imgur.com/Ux5vOMo.jpg

http://i.imgur.com/jNS5Cum.jpg

avatar image MauroRobert Mar 19 '15 at 09:38 PM

Gosh, that's absolutely amazing work! The shading looks spectacular! (Get it hehe) Props to your efforts in fixing all the issues... I'm wondering how much geometry the tesselation adds to your landscape, could you perhaps share your wireframe as well?

avatar image MauroRobert Mar 19 '15 at 09:53 PM

Quick suggestion: You could try adding a fourth target layer with merely a dark grey constant and an alpha blend, you dont even need specs or normals for it. Like a glue layer.

avatar image Tireless Mar 20 '15 at 06:37 PM

Thanks! My happiness reached new heights with your flattery! Here is the tessellation from some different distances: http://i.imgur.com/sPhdVdI.png It is possible to modify when the tessellation should start and end but i haven't dived into that yet. I will do that first when it starts lagging.

You mean to use that layer as a fix for buggy seams etc?

(comments are locked)
10|2000 characters needed characters left

any chance I could get you to give me this blueprint? lol. Wonderful work. I've been trying to achieve a good displacement result for a long time now. Yours looks awesome.

more ▼

answered Dec 30 '16 at 03:08 AM

avatar image

All 3D Design
16 1 3

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question