User Tag List

Page 1 of 5 123 ... LastLast
Results 1 to 40 of 178

Thread: Terrain Blending Tool (based on Star Wars: Battlefront)

  1. #1
    31

    Cool Terrain Blending Tool (based on Star Wars: Battlefront)



    Hi guys, I'm a student Video Game Design at Digital Arts and Entertainment (in Kortrijk, Belgium). For my graduation project, I'm developing a tool to blend static meshes with the environment. I basically want to remove the harsh seam that you see when a static mesh intersects with a landscape actor. Here are some examples of landscape-seams in AAA games:



    I was inspired to make this becasue of the 2016 GDC talk by Dice about Star Wars Battlefront. In this presentation they showcased some in-engine tools to blend together natural meshes and the environment.



    I was also inspired by a terrain-blending plugin in Unity3D (which is currently outdated).



    So the solution I currently have is based on the Distance Fields functionality in Unreal 4. I didn't come up with this idea, I saw a forum-post about someone fusing meshes together by using Distance Fields. However, I cant seem to find this link anymore so if anyone knows which post I'm talking about, feel free to let me know .

    I use the DistanceToNearestSurface node to automatically detect the intersection between the terrain and a mesh. I combine this with a noise mask to get a nice procedural material transition.



    What really sells the effect is the adjustment of the vertex normals of the mesh. This removes the ugly lighting seam caused by intersecting geometry. To adjust the normals of the mesh to the normals of the surrounding area, I use the DistanceFieldGradient node. This system can be a bit finnicky and took a lot of tweaking to get right, but I'm pretty happy with the result.



    I currently have created three variants of this material. One automatically detects the landscape intersection, the second one uses a vertex-paint mask and the third one is a combination of the two.





    I also played around with some different materials and animated noise masks.





    It would be nice if the final result of this Graduation Project was a free tool on the Unreal Asset Store. However, I have little experience with tool development (certainly not in UE4) so I'm looking for all the advice I can on that front.
    So please let me know what you think . Would you be interested in something like this? Do you have ideas for other potential use-cases of this tool? Do you have some insight in making something for the Unreal Marketplace? All information is welcome!

    Cheers!

  2. #2
    0
    Wow, that one is really nice! I'd certainly buy it, especially if the material is suitable for mobile platforms too.

  3. #3
    6
    I'm planning to put it up for free . My material uses Distance Field functionality, so I don't know how optimized it is for mobile .

  4. #4
    0
    Nice to see that this problem in games is gettin' attention! I would love to have a tool for this altough I don't have any experience in tool development either. I hope others (mods and unreal dev's) notice this thread and help you out with it to make it a build in feature!
    Good luck with it!

  5. #5
    0
    Glorious!

    This artifact you're solving has been one of my biggest pet-pevs in videogame landscapes, I didn't really think it was solvable.

  6. #6
    0
    This is very good. Does it work with static meshes that have multiple materials?

  7. #7
    0
    Quote Originally Posted by Rhynedahll View Post
    This is very good. Does it work with static meshes that have multiple materials?
    Yeah, all the logic is all done in the material itself, so only one material can use this system or all of them can .

  8. #8
    0
    Excellent work! Can't wait to try it out myself!
    Check out our game Arcus!

  9. #9
    0
    If you want to make it a polished resource like what would be released (for $) on the Marketplce, I suggest doing this:

    * Encapsulate the material related stuff into its own Material Function.
    * Create a master material and some instances that use your MF.
    * Create a showcase level with some examples placed down ala your gifs.
    * Write a small guide to using the material function and to your examples.
    * Package it up into a project with your guide, showcase map and material function.

    -----

    Awesome work btw, I love this effect.
    Storyteller - An immersive VR audiobook player

    Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

  10. #10
    0
    Quote Originally Posted by n00854180t View Post
    If you want to make it a polished resource like what would be released (for $) on the Marketplce, I suggest doing this:

    * Encapsulate the material related stuff into its own Material Function.
    * Create a master material and some instances that use your MF.
    * Create a showcase level with some examples placed down ala your gifs.
    * Write a small guide to using the material function and to your examples.
    * Package it up into a project with your guide, showcase map and material function.

    -----

    Awesome work btw, I love this effect.
    Thank you so much for the advice! This is really helpful . If I put this up on the marketplace, it's definitely going to be free, I rather have the exposure than the money .

    I have a question in regard to Material Functions though. The material for the landscape is a MF that outputs a world-space material, I use this Material Function in the regular landscape material and in my special terrain-blending material for the rock. In this way, if I update the landscape MF, it's automatically updated in two places. I would love to add functionality to my material that allows for easy swapping of landscape materials. However, using Material functions as inputs for Material Instances seems to be impossible .

    I could use the textures of the landscape-material as inputs, but if I want to change the scale of this material, I would have to update it in two places, which is inconvenient . Any ideas for a solution to this problem?
    Last edited by OlmoPotums; 12-19-2016 at 02:43 PM.

  11. #11
    0
    Yeah, this looks great! What kind of changes did you make to make this happen? (As in: how hard would this be to put in self-contained plug-in, which in turn is maybe needed to put it on the marketplace?)

  12. #12
    0
    Quote Originally Posted by jwatte View Post
    Yeah, this looks great! What kind of changes did you make to make this happen? (As in: how hard would this be to put in self-contained plug-in, which in turn is maybe needed to put it on the marketplace?)
    I don't think there is need for the use of plug-ins. The only prerequisite is that Distance Fields are enabled in Unreal. Everything is done in the standard material editor .
    However, I don't know a lot about plug-ins in Unreal, so I might be totally wrong .

  13. #13
    0
    Looking Good!

    I think they are implying that you could make a plug-in which unreal has made a lot easier to do recently then sell the plug-in or for free. (I like Free!)
    And you could always ask for someone in the community to help you or just get help as you go along on the forums.

    you can always just put the add-on (plugin) up on google or someplace for download & link it to your forum post here or in the Content - Tools section:
    https://forums.unrealengine.com/forumdisplay.php?12-Community-Content-Tools-and-Tutorials
    Last edited by ayretek; 12-19-2016 at 03:32 PM.

  14. #14
    0
    Champion
    Join Date
    Jun 2014
    Posts
    599
    Great job! Does it work when placed on a static mesh, or Landscape only? I suspect that it works, since you use the DistanceToNearestSurface, am I right?
    Also, do you assign a material/texture to use for blending for every mesh, so e.g. if you place a rock on a sand, you assign sand texture for blending, and so on...? Or does it detect ground texture automagically? Sorry, my knowledge is limited here, I've never played a lot with Distance Fields...

    BTW. I've tried to make something similar for my game, but in my case it needs to be dynamic since my world generates procedurally - and I've stuck here, because I can't figure out how to e.g. detect ground texture below procedurally spawned rock + what if it spawns on top of two different textures (for example over some grass texture <-> mud texture intersection), etc.

    About Marketplace: I would buy it definitely, here you can read about submission guidelines. Just prepare the required folder structure, add some documentation/level with examples + demo video and you're good to go To submit your pack, you can start here: https://publish.unrealengine.com/

    Awesome WIP, keep it up!

  15. #15
    0
    Quote Originally Posted by ayretek View Post
    Looking Good!

    I think they are implying that you could make a plug-in which unreal has made a lot easier to do recently then sell the plug-in or for free. (I like Free!)
    And you could always ask for someone in the community to help you or just get help as you go along on the forums.

    you can always just put the add-on (plugin) up on google or someplace for download & link it to your forum post here or in the Content - Tools section:
    https://forums.unrealengine.com/forumdisplay.php?12-Community-Content-Tools-and-Tutorials
    Thanks for the reply ! I glanced over the Unreal plugin documantation and it seems pretty daunting (I'm an artist to the core ). Is there a way to create plug-ins without writing code? Or will I definitely need someone with more knowledge to help me out?

  16. #16
    0
    Quote Originally Posted by Slavq View Post
    Great job! Does it work when placed on a static mesh, or Landscape only? I suspect that it works, since you use the DistanceToNearestSurface, am I right?
    Also, do you assign a material/texture to use for blending for every mesh, so e.g. if you place a rock on a sand, you assign sand texture for blending, and so on...? Or does it detect ground texture automagically? Sorry, my knowledge is limited here, I've never played a lot with Distance Fields...

    BTW. I've tried to make something similar for my game, but in my case it needs to be dynamic since my world generates procedurally - and I've stuck here, because I can't figure out how to e.g. detect ground texture below procedurally spawned rock + what if it spawns on top of two different textures (for example over some grass texture <-> mud texture intersection), etc.

    About Marketplace: I would buy it definitely, here you can read about submission guidelines. Just prepare the required folder structure, add some documentation/level with examples + demo video and you're good to go To submit your pack, you can start here: https://publish.unrealengine.com/

    Awesome WIP, keep it up!
    Thanks a lot for the Marketplace guidelines! I was starting to fear that I had to start writing c code .

    To answer your first question, all the terrain-blending magic happens in the material of the static mesh . The landscape material is just a standard world-space material. I use a material function for the landscape material. This makes swapping the materials currently a bit of an issue, since Material Instances can't use Material Functions as inputs. If you have some insight into this feel free to let me know . Automatic landscape material detection is a far-away dream at this point .

  17. #17
    0
    Samaritan
    Join Date
    Jun 2015
    Posts
    92
    This is fantastic work!

  18. #18
    0
    Very well done! Did you have to disable tangent space normals for this to work? I did something similar with world-aligned textures to blend meshes with landscapes:




    Adding the mesh-distance field blend is a very smart addition, great work!

  19. #19
    0
    Quote Originally Posted by hippowombat View Post
    Very well done! Did you have to disable tangent space normals for this to work? I did something similar with world-aligned textures to blend meshes with landscapes:

    Adding the mesh-distance field blend is a very smart addition, great work!
    Thanks a lot! The thread where you originally posted that pebble-material was one of the things that inspired me to make this this tool . And you're absolutely right, for this material to work, tangent space normals need to be disabled. You can still use tangent-space normal maps in my material though, it just gets converted to world-space in the shader.

  20. #20
    0
    *deep breath*

    hnnnnng.

  21. #21
    0
    Nice work! I'd honestly pay for a well-polished version of this. Would be an awesome quality boost to my landscape assets

  22. #22
    0
    Looks really nice! How does it handle blending when there are multiple layers in the landscape material and the mesh gets placed between two of them?

  23. #23
    0
    Quote Originally Posted by Sitrec View Post
    Looks really nice! How does it handle blending when there are multiple layers in the landscape material and the mesh gets placed between two of them?
    Good question, no it doesn't do that . Currently, conveniently swapping materials is a bit of an issue since I'm using material functions for the landscape material. However, those landscape materials cannot be used as material insctance inputs . So I'm still struggling there a bit.

  24. #24
    0
    @OlmoPotums

    https://80.lv/articles/will-koehler-unreal-engine4-breakdown-scene/ << nice break down of how he handles material blending between meshes (I think that's what he does).

  25. #25
    0
    Quote Originally Posted by motorsep View Post
    @OlmoPotums

    https://80.lv/articles/will-koehler-unreal-engine4-breakdown-scene/ << nice break down of how he handles material blending between meshes (I think that's what he does).
    Yeah I just saw that too, it's super cool . Although I think he just uses world-space materials, I don't think he really "blends" meshes together, although I could be wrong

  26. #26
    0
    aye, I just like the idea of kit-bashing rocks together and not seeing intersection between the meshes

    Can't wait for you to release this asset!

    What's the added benefit of using distance fields ?

    Would it be possible to have an option not to use distance fields (for mobile projects) ?

  27. #27
    0
    Really awesome stuff, looking forward to see how it works!

  28. #28
    0
    Quote Originally Posted by OlmoPotums View Post
    Good question, no it doesn't do that . Currently, conveniently swapping materials is a bit of an issue since I'm using material functions for the landscape material. However, those landscape materials cannot be used as material insctance inputs . So I'm still struggling there a bit.
    Yeah I figured it would be hard to solve. Looks awesome anyway!

  29. #29
    0
    Quote Originally Posted by motorsep View Post
    aye, I just like the idea of kit-bashing rocks together and not seeing intersection between the meshes

    Can't wait for you to release this asset!

    What's the added benefit of using distance fields ?

    Would it be possible to have an option not to use distance fields (for mobile projects) ?
    Without the Distance fields I wouldn't be able to conform the mesh normals to the environment, so it is pretty essential .

  30. #30
    0
    Quote Originally Posted by motorsep View Post
    aye, I just like the idea of kit-bashing rocks together and not seeing intersection between the meshes

    Can't wait for you to release this asset!

    What's the added benefit of using distance fields ?

    Would it be possible to have an option not to use distance fields (for mobile projects) ?
    You could potentially use vertex painting to create a mask along a fixed area for the mesh to blend with the landscape, but it won't be nearly as dynamic as the system displayed here in terms of ease of placement.

    You could also use mesh painting in UE4, but again, it's a bit more hampering in the sense that you'd have to paint every single mesh you'd want to have blend.
    Last edited by hippowombat; 12-20-2016 at 07:14 PM.

  31. #31
    4
    Luminary
    Join Date
    Oct 2014
    Posts
    1,890
    @OlmoPotums: This should not be a tool but should be added in to Unreal by default. This looks very good and would definitely be useful to many people. Good job. 8-}
    Quinton Delpeche
    Founder - Gobbo Games | Designer - The Colony 2174 (Board Game) | Developer - Riders of Asgard

  32. #32
    0
    Promoter
    Join Date
    Mar 2014
    Posts
    165
    This looks great! Can't wait to try it out.

  33. #33
    0
    Yeah looks great i would pick it up for sure.

  34. #34
    0
    Champion
    Join Date
    Jul 2014
    Posts
    716
    Quote Originally Posted by qdelpeche View Post
    @OlmoPotums: This should not be a tool but should be added in to Unreal by default. This looks very good and would definitely be useful to many people. Good job. 8-}
    I agree , this should definitively be added to Unreal by default.

  35. #35
    0
    Just joining in to say this is incredible.
    Still new to this Unreal business, even after two years.

  36. #36
    0
    Count me among the people who would love to see this built into the engine.

  37. #37
    0
    ^ This. And much kudus, this is awesome.

  38. #38
    0
    Nice project. You should definitely put it up on the marketplace at some point!
    --------------------------------------------------------
    [New On Marketplace] Custom Character Creator
    --------------------------------------------------------
    [Marketplace] RPG Starter Kit - Multiplayer Melee Combat System - Animated Crossbow
    --------------------------------------------------------

  39. #39
    0
    I can hardly wait for this!

  40. #40
    0
    You could also plug a dither node multiplied by a strength factor into the pixelDepthOffset.

    In this screenshots it looks pixelated but in engine it's not very noticable.

    Name:  2f0afc77-0b84-412c-b371-5fa106b1a907.jpg
Views: 20702
Size:  347.2 KBName:  e6d130b2-2d50-46e0-8b6d-7e0d664ff76e.jpg
Views: 20708
Size:  276.2 KB

Page 1 of 5 123 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •