Announcement

Collapse
No announcement yet.

Terrain Blending Tool (based on Star Wars: Battlefront)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [TOOL] 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
    Wow, that one is really nice! I'd certainly buy it, especially if the material is suitable for mobile platforms too.

    Comment


    • #3
      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 .

      Comment


      • #4
        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!

        Comment


        • #5
          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.

          Comment


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

            WIP Thread

            Comment


            • #7
              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 .

              Comment


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

                Comment


                • #9
                  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

                  Comment


                  • #10
                    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, 02:43 PM.

                    Comment


                    • #11
                      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?)

                      Comment


                      • #12
                        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 .

                        Comment


                        • #13
                          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/foru...-and-Tutorials
                          Last edited by ayretek; 12-19-2016, 03:32 PM.

                          Comment


                          • #14
                            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!

                            Comment


                            • #15
                              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/foru...-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?

                              Comment

                              Working...
                              X