Terrain distance blending

Node-based Shader Editor

Terrain distance blending

Postby cAyou » Fri Nov 02, 2018 2:43 am

Hi there !
I was wandering on the web, looking for awesome shaders to do, and I've stumbled upon this page, telling how to do terrain blending like in starwars battlefront, using Unreal Engine.
https://forums.unrealengine.com/community/work-in-progress/104455-terrain-blending-tool-based-on-star-wars-battlefront
I can't find anything that would do the trick using ASE, so I was wondering if you guys have any idea.
My first step would be to do something similar to a soft particle shader, detect the distance to nearby geometry, but even that cannot be found....yet.

Thanks !
cAyou
 
Posts: 39
Joined: Mon Oct 29, 2018 7:12 pm

Re: Terrain distance blending

Postby Ricardo Teixeira » Fri Nov 02, 2018 12:11 pm

cAyou wrote:Hi there !
I was wandering on the web, looking for awesome shaders to do, and I've stumbled upon this page, telling how to do terrain blending like in starwars battlefront, using Unreal Engine.
https://forums.unrealengine.com/community/work-in-progress/104455-terrain-blending-tool-based-on-star-wars-battlefront
I can't find anything that would do the trick using ASE, so I was wondering if you guys have any idea.
My first step would be to do something similar to a soft particle shader, detect the distance to nearby geometry, but even that cannot be found....yet.

Thanks !


Greetings!

I'm afraid that's not possible due to the way Unity renders its objects "by default". You would need a custom solution beyond the scope of what a shader editor, such as ours, can provide.

This is something that could change with the new HD Rendering Pipeline.

Thanks!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Terrain distance blending

Postby cAyou » Fri Nov 02, 2018 1:48 pm

Thanks for your reply !
Are you sure I can't even reproduce what the soft particles is doing? I was using ShaderForge before switching to ASE, and I had a Depth Blend node, which was used to retrieve the distance to a near surface. It's not enough, but it was a starting point.
There is someone that did the effect on Unity: https://www.youtube.com/watch?v=d_at-NawTbY
But I can understand that couldn't be possible using ASE, I just wanted to try.
In fact I'm currently working on how to blend a mesh on an animated skinmesh surface, like "3d decals". You can check how I did it here: https://answers.unity.com/questions/1567640/skinmesh-with-attached-objects.html

I wanted to "merge" the two objects by creating an effect similar to the solution used for terrain blending. I guess I will investigate more into an hand coded solution :)
cAyou
 
Posts: 39
Joined: Mon Oct 29, 2018 7:12 pm

Re: Terrain distance blending

Postby Amplify_Borba » Mon Nov 05, 2018 2:39 pm

Hello! You can, on ASE, pick the screen depth, and through that you can do some math on the objects distance to what is behind it, but this might be a bit different from what you want. You can also use depth fade, but this is not something that's on the shared references, it's belongs to a different technique.

The mesh blending example you've shared is based on the Distance Fields functionality in Unreal 4, which samples the level global distance field ( which is automatically calculated by the engine ), and is something we don't have access in ASE. In Unity you would likely need to precompute the distance fields outside the shader and then feed them into it.

In any case, this is a fairly complex effect that will require some elements external to our editor in order for it to be achieved. Unfortunately, we don't have any immediate advice or samples that we can provide, so for now I would recommend that you look into a package that would specifically solve this problem, such as Terrain Mesh Blending, or even Micro Splat.

On a final note, an alternate way to simulate blending would be to use world projected textures on both the terrain and your mesh, however, this is not an ideal solution and it differs from the other technique.

Hope this helps!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Terrain distance blending

Postby cAyou » Tue Nov 06, 2018 1:46 am

Thanks for your complete answer ! I think I will turn into assets if I'm not able to do it myself, it seems that is over my skills haha :D
Really appreciate the support, it's incredible !
cAyou
 
Posts: 39
Joined: Mon Oct 29, 2018 7:12 pm

Re: Terrain distance blending

Postby Amplify_Borba » Tue Nov 06, 2018 9:25 am

No problem, we're happy to help!

Please don't hesitate to get back in touch if you have any further questions or issues.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests