Landscape Material Blending With Runtime Virtual Textures - Building Worlds In Unreal - Episode 23

  Рет қаралды 18,981

Ben Cloward

Ben Cloward

Күн бұрын

In this video, I show how to blend the landscape material in Unreal with the materials of rocks and other objects that intersect with the landscape. This gets rid of the harsh seams between the rocks and the landscape and helps these assets feel much more natural - like they fit and blend in with the landscape instead of being shoved into it. We use the runtime virtual textures that we set up in the last episode to achieve this. #UnrealEngine #Landscape #Blending
Here's the previous episode on rendering landscape materials using runtime virtual textures:
• Landscape Optimization...
And here's the playlist for the whole series:
• Building Worlds in Unr...
Learn more!
• Unreal Engine 4: Ultim...
• Landscape Virtual Text...
• Unreal Engine Runtime ...
• Easy Runtime Virtual T...
• Landscape color blendi...
Shader Book Recommendations
www.bencloward...
------------------------------
Theme Music
Peace in the Circuitry - Glitch Hop
teknoaxe.com/Li...
Background Music
Speo - The Little Things
• Speo - The Little Things

Пікірлер: 94
@Madlion
@Madlion 2 жыл бұрын
This technique skyrockets my shader complexity
@DebbieSmith_Kam
@DebbieSmith_Kam 2 жыл бұрын
Excellent video - stumbled across your series via a random search yesterday and your material is exceptionally good. Thanks!
@alexandraminues
@alexandraminues 3 жыл бұрын
This is brillant! Thank you for the amazing explanation
@danielgraham4616
@danielgraham4616 3 жыл бұрын
Thanks for this, very useful. Minor critique (well not so minor for me as I didn't understand :) ) when going through the nodes, I sometimes end up being not sure why I've added half of them. For example, @12:25 multiplying and multiplying again and the subtracting values, I literally had no idea why that was being done. Whilst I have the end result, I like to be able to apply knowledge in other use cases. I know some videos may take a decade if you were to explain every action, but in certain cases I think it could be super useful, as you can't always know the skill level of the viewer. Thanks!
@BenCloward
@BenCloward 3 жыл бұрын
This is really good feedback, Daniel and I appreciate you sharing it with me. I don't always explain everything in as much detail as I should - mainly in the interest of keeping the video shorter. I try to do better at that.
@mc.kenzey4936
@mc.kenzey4936 3 жыл бұрын
Exactly what IAM currently looking for. Thanks again!
@lianghanli835
@lianghanli835 3 жыл бұрын
Hello, Ben. You could use the node called "RuntimeVituralTextureSampleParameter" to expose RVT as a parameter then change it within your material instance.
@BenCloward
@BenCloward 3 жыл бұрын
This sounds like it could be useful, but I don't understand. What are you suggesting I use it for?
@momomadi2
@momomadi2 3 жыл бұрын
@@BenCloward there is literally a node on the material editor called RuntimeVituralTextureSampleParameter - witch is rvt but parameter and u can change it on instances
@0xSirius
@0xSirius 3 жыл бұрын
@@BenCloward I think they refer to the problem you mention in 21:15
@BenCloward
@BenCloward 3 жыл бұрын
@@momomadi2 Oh - this is a solution for the problem of needing to change which RVT is used depending on which map you place the asset in. Got it. Thank you, I'll give that a try!
@PeterLeban
@PeterLeban 3 жыл бұрын
You can also sample the same RVT in different levels and it worked just fine in my case.
@andyjgough
@andyjgough 3 жыл бұрын
Thanks for this tutorial and all the others. They have helped me immensely. I look forward to a solution to the problem of texture tiling on the landscape when using rvt if there is one.
@aukehuys2297
@aukehuys2297 3 жыл бұрын
@Ben Cloward Yep, same here. You mentioned you would share a fix for this is on a later episode and since then I waited for it. Sadly this series is over now and I would really like to know your solution. Maybe any hint so I could figure it out on my side? Would be really appreciated :) Beside that, thanks for your awesome videos!
@hammertl2673
@hammertl2673 3 жыл бұрын
@@aukehuys2297 use View Property as VIrtual Texture Output Level, it will output the miplevel that RVT currently used, and you can use this value to lerp the near and far tilling.
@WszelkieBro
@WszelkieBro 2 жыл бұрын
Dear Ben that is a way to do camera blend testures with RVT :D Take View Properity node in virtual Texture Output Level mode and create power parametr with base2 nad exp of properity from view properity. Then multiply by 1000 and add start offset parametr then devide falof paramet saturate and voilà! :D you can use runtime texture replace node with old cameta depth fade to switch the modes. Greetings!
@BenCloward
@BenCloward 2 жыл бұрын
Oh wow, this is super valuable. Thank you so much for sharing! I'm going to have to try this out!
@HaloDude557
@HaloDude557 2 жыл бұрын
Can you post a screenshot of an example or forward me to a tutorial please? Thanks!
@pubudu781
@pubudu781 3 жыл бұрын
I found out that using macro variations to break the tiling works really well with this.
@unrealdevop
@unrealdevop 3 жыл бұрын
I believe that's what OpenLand uses, it looks really great. The only thing I didn't like about OpenLand is that if you get close you'll notice the mountain rock material looks like it's been clawed open and a grass material is left behind in those claw marks....looks pretty ugly up close but I'm sure you could add a falloff to that so that it's not so sharp or use a neutral material that won't stick out against the different types, like a dirt material maybe...I haven't looked at the bp for that too closely so I'm not real sure what the best approach would be.
@pubudu781
@pubudu781 3 жыл бұрын
@@unrealdevop it's used on many auto mats,not only on open land, you can even use the default gold matireal macros from unreal content for that, works really well, however i won't stick only to macro variations, i would use somehing like texture splating or cellbombing with it. even maybe distace blending, but using distance blend with RVT is bit tricky also it somewhat messes up FPS becaus you can use RVT only in distance, i really hope unreal would come up with a solution for that. or someone find another method to do that.
@unrealdevop
@unrealdevop 3 жыл бұрын
@@pubudu781 Yeah I was just pointing out the example I had seen. I'll having to look into those other methods you mentioned.
@FrecklesOpenMic
@FrecklesOpenMic 3 жыл бұрын
@@pubudu781 why not rvt only close to the camera?
@jabirvp9813
@jabirvp9813 3 жыл бұрын
Thank you so much!! Can you explain again RVT blending using new megascans materials pls..
@mrtobycook
@mrtobycook 3 жыл бұрын
Yes it’s a problem as this video of Ben’s features an old Quixel material. :-( If it helps, the solution is to actually make your own variation of the MF_MapAdjustmenrs material function, then you basically do exactly what Ben does in his tutorial, sort of. :-) hopefully Ben will break protocol at some point and do an “out of sequence” video that is purely an update to getting rvt working again with quixel assets :-)
@JohnDowson100
@JohnDowson100 3 жыл бұрын
Amazing lesson @Ben Cloward. Thanks for sharing! I was wondering.. what so you think of the texture-bombing node as an alternative strategy to the camera distance texture scaling which is breaking the RVT workflow?
@순두부찌개순한맛
@순두부찌개순한맛 3 жыл бұрын
We are now able to make the RVT Sample as a parameter and give change in the MI!
@andreyegorov4496
@andreyegorov4496 3 жыл бұрын
Ben, thank you for tutorials. It's very helpful. Do you plan to do lighting tutorials?:)
@BenCloward
@BenCloward 3 жыл бұрын
Here's a tutorial on lighting: kzbin.info/www/bejne/qKjSn6GZf8ikgdU I haven't applied these things to this new scene yet though. The lighting here still looks pretty plain.
@benmiles7945
@benmiles7945 3 жыл бұрын
Since this is a top down projection, where the rock has almost vertical edges, it stretches the landscape material and looks strange. How would you correct that?
@BenCloward
@BenCloward 3 жыл бұрын
I would create a mask in the material based on slope angle and use it to not show the landscape material at those angles. I considered showing that in this video, but the issue wasn’t very bad so I just decided it wasn’t worth it.
@dylantomberlin901
@dylantomberlin901 3 жыл бұрын
To use this material in other scenes, can you pass the landscape virtual texture indirectly by having inputs for BaseColor, Specular, Roughness, and Normal? Thanks for another great video!
@syedhs
@syedhs 3 жыл бұрын
Very cool technique. But the previous was on how VT saves FPS.. but now the material seems more complicated - how much FPS drop? Or rather milliseconds? Probably good for some selected stones.
@theobai8986
@theobai8986 3 жыл бұрын
Transfer to local space to fix that hard edge of normal and blending would be more natural.
@theobai8986
@theobai8986 3 жыл бұрын
sorry, *world space to tangent space
@BenCloward
@BenCloward 3 жыл бұрын
Does the RVT store normal in world space?
@theobai8986
@theobai8986 3 жыл бұрын
@@BenCloward After I check the normal buffer, it helps to hide the seam. So I think it stroes normal in world space.
@lukecagevans8596
@lukecagevans8596 3 жыл бұрын
Suggestion: I think you should make some breakdowns of Paragon's effects materials. Triple A materials made by epic games and released for free. I am asking this because recently i saw a dude making the breakdown of aurora's Ice shader (a Very cool shader that grows with time, like materialize effect).
@qwetry-j2u
@qwetry-j2u 3 жыл бұрын
Hi Ben, I have a question for you. It's not exactly about landscape blending, but related to material blending in general (based on vertex paint). Actually I asked it yesterday here in the comments, but for some reason KZbin has deleted my message. I'm going to ask my question again if you don't mind. What I want to make is a blend material representing an old brick wall covered with plaster, but the plaster fell off in some places showing the brick underneath. This effect can be easily done in Substance Painter or Designer. I also can make a basic blend in UE4 using a HightLerp node with addition of some noise to the mask, but there's one thing I have no idea how to achieve. How can I get a height difference effect on the edge between the two materials so that the brick layer looks under the plaster? Sorry for a vague eplanation, but I hope you can imagine what I'm talking about. It seems like I need to generate a normal map effect inside my shader, but how is it done in UE4? Could you please make a tutorial on that? I'm sure it will be interesting not only for me, but for others as well. Thanks in advance!
@antoineflynn
@antoineflynn 3 жыл бұрын
Amazing content! You're PC seems to struggle in the viewport though :P Thank you!
@BenCloward
@BenCloward 3 жыл бұрын
It was the capture process that wasn't working right. I mistakenly had it set to only capture frames when the mouse moved. My bad. Hope everything is still clear enough.
@manollobango
@manollobango 2 жыл бұрын
Thanks for the helpful information! I only know this and the previous video from your tutorial, but I couldn't find out which version of the Unreal Engine you're using. Is this UE4 or already UE5?
@BenCloward
@BenCloward 2 жыл бұрын
This series was in UE4.
@manollobango
@manollobango 2 жыл бұрын
@@BenCloward Okay, thanks for the info!
@tranceemerson8325
@tranceemerson8325 3 жыл бұрын
what I think would be better is having another texture that is intermediate between the rocks and terrain that fills in the gap.
@BenCloward
@BenCloward 3 жыл бұрын
The nice thing about this solution is that it happens automatically - so I don't have to make anything additional. It would be a LOT of work if I had to make a custom blend texture for every rock I placed.
@medmel2160
@medmel2160 3 жыл бұрын
Hello there, what a luck to get these learning materials from someone as experienced as you. It's highly appreciated. Question: how could I tackle terrain blending with stylized graphics not using texture? My terrain has a texture but my rocks are using a basic albedo with some noise. Have a good day sir
@BenCloward
@BenCloward 3 жыл бұрын
Sounds like you need to blend between the basic albedo color of the rock to the color of the landscape. If your rocks use normal maps, you could also fade between the rock normal and the landscape normal.
@medmel2160
@medmel2160 3 жыл бұрын
@@BenCloward thanks you!
@ripunjoyk3617
@ripunjoyk3617 3 жыл бұрын
Sir, my height texture is just showing two colours, white on the left and black on the right half. The previous texture for landscape is working well. Only this heigh t texture is causing this problem.
@makeunrealthings
@makeunrealthings Жыл бұрын
HI Ben, can you help me for this RVT feature? So what if I have dynamic puddles or snow deformation in my material so how RVT will work in this situation? Anyway thanks for gold tutorials.
@BenCloward
@BenCloward Жыл бұрын
RVT works best for static materials. The dynamic parts can be added in the section of the shader that comes after sampling from the RVT.
@BruceWayne-bm2dk
@BruceWayne-bm2dk 3 жыл бұрын
Please make a video on procedural river system and waterfalls. Thankyou
@BenCloward
@BenCloward 3 жыл бұрын
Rivers coming in the next episode - this Thursday.
@BruceWayne-bm2dk
@BruceWayne-bm2dk 3 жыл бұрын
@@BenCloward Thakyou sir
@unreal_metronomus678
@unreal_metronomus678 3 жыл бұрын
Great Video, thanks. But does this work with tesselation? I haven‘t found any solution to get rvt and tesselation working together.
@BenCloward
@BenCloward 3 жыл бұрын
Yes, if you set your RVT texture to use the format that has a mask, you can plug your heightmap into the mask input socket. Then when you sample the RVT, plug the mask output into the tessellation/displacement function, and connect the outputs of that into the root tessellation and displacement inputs.
@mrtobycook
@mrtobycook 3 жыл бұрын
@@BenCloward This made my head explode, in a good way lol. :) So displacement CAN work with RVT on landscapes? I’m so confused 😂
@turalmemmedov3648
@turalmemmedov3648 3 жыл бұрын
Thank you, very much as always )) Is it possible to mask landscape part where specific meshes placed, to rise the part of that area of landscape with this technique? I mean, not only the material information blend to that mesh but actually deform that part of landscape and rise it with some noise texture to break straight line on the edge of for example house wall? To do it by hand is soo painfull.
@BenCloward
@BenCloward 3 жыл бұрын
That's a super cool idea, Tural. I haven't tried it myself, but I imagine you could write into an RVT with you object and then read from that RVT in the landscape to displace it. I can't tell you how to do it since I haven't tried, but maybe there's another tutorial video that could . . .
@turalmemmedov3648
@turalmemmedov3648 3 жыл бұрын
@@BenCloward Ohhh, actually yess, as you said, why I didnt think about it. We can right information to RVT. I will try it when I be free. Actually I saw something like this, who made it in UE as Star Wars battlefront did but I cant find it. Anyway, again Thank you very much again ))
@michaelblackmer8183
@michaelblackmer8183 3 жыл бұрын
Might not be possible, but could you configure the landscape to blend between a runtime virtual texture (using only the far away texture sample) and the near texture based on the camera settings? So theoretically your only "Real-time" calculations would be the auto-material nearby, and then far away textures would sample the runtime virtual texture?
@Ki7suneGF
@Ki7suneGF Жыл бұрын
Perhaps with a fresnel node
@marcinesa1336
@marcinesa1336 3 жыл бұрын
hello what do you recommend instead of virtual textures so that in the landscape and the object they were not visible this linking line ?? ?? I use dither but I'm not happy with it
@BenCloward
@BenCloward 3 жыл бұрын
Sorry, I don't understand the question very well. You're looking for a different way to do this that doesn't require virtual textures?
@marcinesa1336
@marcinesa1336 3 жыл бұрын
@@BenCloward yes :)
@alienrenders
@alienrenders 7 ай бұрын
My landscape height in the virtual texture is completely flat. Any ideas why this would be happening?
@alienrenders
@alienrenders 7 ай бұрын
Found it. The Landscape material has to render out to the Runtime Virtual Texture Output node.
@alienrenders
@alienrenders 7 ай бұрын
Except the height map is extremely low resolution. edit: Found it. Increase Virtual Texture Num LODs to 5 or something like that.
@AvB.83
@AvB.83 Жыл бұрын
Sounds cool, looks cool, but RVTs reliably are killing my project 😢 Tried to use it for the landscape using the previous tutorial (in UE 5.2) and it just freezes 3/4 times I start the editor. If it doesn't freeze at start, it will a few minutes later, but definitely if I try to do anything about the RVTs...
@BenCloward
@BenCloward Жыл бұрын
A couple of other people have mentioned that as well. I guess there are some bugs with RVTs in Unreal 5 that they need to work out.
@hasanjanamat8231
@hasanjanamat8231 3 жыл бұрын
how we can fix Runtime Virtual Texturing and Stretching in some vertical side of rock plz let me know if there is way to get ride of this issue thanks
@BenCloward
@BenCloward 3 жыл бұрын
I didn't cover that in my video since my landscape doesn't have any areas that were steep enough for it to be an issue. The RVT is always a top-down projection, so it will always have stretching if the landscape gets too steep. You could fix it by doing front and side projection of a cliff material after sampling the RVT and then creating a mask for the cliff material based on the slope. So the cliff material would be blended in on top of the RVT using that mask.
@hasanjanamat8231
@hasanjanamat8231 3 жыл бұрын
@@BenCloward thanks a lot it help a lot alway root for u best wishes to u
@superfluousvii9686
@superfluousvii9686 3 жыл бұрын
i keep getting D3D compile exception error every time i apply, any help? Im on 4.26
@BenCloward
@BenCloward 3 жыл бұрын
Can you send me a screen shot of your graph and another shot of the error? ben@bencloward.com
@deepakgiri.j1973
@deepakgiri.j1973 3 жыл бұрын
How to fix blocky sharp landscape
@BenCloward
@BenCloward 3 жыл бұрын
I'm sorry, I don't understand the question. Could you be more specific and provide more details?
@deepakgiri.j1973
@deepakgiri.j1973 3 жыл бұрын
@@BenClowardthank you for reply my landscape looks lowpoly in some area its like blocky low resolution geometry I want it to smooth with out loosing the terrain detail
@BenCloward
@BenCloward 3 жыл бұрын
@@deepakgiri.j1973 Have you tried adjusting the LOD 0 Screen Size, LOD 0, and Other LODs settings on your Landscape? I have mine set to 0.5, 1.0, and 1.6 - but you could adjust them a little to get better results.
@liquaard2824
@liquaard2824 Жыл бұрын
is Runtime virtual texture expensive ?
@BenCloward
@BenCloward Жыл бұрын
It depends. (This is a very common answer to questions about graphics features.) It uses a lot of texture memory - so it's expensive for that. But it bakes parts of your graph into a texture that only gets updated occasionally instead of every frame. So if you have an expensive shader, you can use RVT and the shader will only get run when the RVT is updated instead of always. Best thing to do if you're not sure if you should use it or not is implement it and compare before/after results.
@liquaard2824
@liquaard2824 Жыл бұрын
@@BenCloward yes will definitly test that with Unreal's new perfomance analysing tools
@AndreaFromTokyo
@AndreaFromTokyo 3 жыл бұрын
It ended up Not working for me sadly. if i rotate or put the object at a different altitude i would have to change the material instance parameters once again wich means pretty much useless (or one instance per object). I came up with something similar but using distance fields, it kinda works... i just have little control on the distance field itself ...but im no expert so i could do only so much
@BenCloward
@BenCloward 3 жыл бұрын
Hmm, that doesn't sound right. The material is supposed to be set up so that you can place rocks anywhere on the landscape and they will blend correctly. I wonder what went wrong? I can try to help you troubleshoot it if you want.
@AndreaFromTokyo
@AndreaFromTokyo 3 жыл бұрын
@@BenCloward Thanks for the offer, i wouldn't want to waste your time in such manner so don't worry. The funny thing is that my shader graph is basically like yours, the only thing that changes is that i blend with my textures rather than the megascan material's texture inputs. I have no clue but oh well. Still, i'm loving the series and i'm learning quite a lot from it! Thank you for sharing!
@jukai4091
@jukai4091 3 жыл бұрын
Ben again, ty for that great tuorial. i have some problem with raytracing and procedural-grown-foliage. if the meshes are all placed by procedural then i dont have any shadows from raytracing. if i place them by hand then they have raytraced shadows. also i got a problem with swarm agent. "[Interface:EndJobSpecification] Error: Das interne Array kann nicht mehr als Int32.MaxValue-Elementen erweitert werden. System.Runtime.Serialization.SerializationException: Das interne Array kann nicht mehr als Int32.MaxValue-Elementen erweitert werden." it says "the intern array cant even more than int32. ..." maybe anyone can help? :( if someone want ask me for my rig: AMD 5950X, RTX3090, 64GB Ram. so im sure its not my hardware
@BenCloward
@BenCloward 3 жыл бұрын
I don't know the answer to that unfortunately.
@jukai4091
@jukai4091 3 жыл бұрын
2. :D
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 23 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 54 МЛН
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
Height Lerp Node | 5-Minute Materials [UE4]
6:06
PrismaticaDev
Рет қаралды 48 М.
Unreal Engine Basic Dynamic Snow Tutorial - with Runtime Virtual Textures - UE4.25
19:05
Marvel Master (Marvelmaster)
Рет қаралды 70 М.
Water Decals - Building Worlds In Unreal - Episode 10
14:26
Ben Cloward
Рет қаралды 27 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 23 МЛН