Announcement

Collapse
No announcement yet.

UE4 Voxel Terrain Tutorial

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

    UE4 Voxel Terrain Tutorial

    Hello forum people! I've been working on a tutorial series to show everyone how to implement voxel terrain in UE4, and I figured I should post it on the forums so it can reach more people. So far the series is up to the point of texturing the terrain using a basic world coordinate mapping material. I plan on covering infinite terrain, smooth terrain using marching cubes, and creating an editor extension to allow for terrain modification in the editor during the series. Let me know what you think!

    You can find the complete list of tutorials on my website: https://garvinized.com/portfolio/unr...torial-series/
    Twitter @BrandonCGarvin

    Watch me build with the Unreal Engine on hitbox at /LtBrandon

    #2
    Awesome tutorial series, really in depth!
    Storyteller - An immersive VR audiobook player

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

    Comment


      #3
      This is simply great! Many thanks, I have never thought I would want to create a voxel game...
      Edge of Chaos RTS
      "Age of Total Heroes" - RTS Pathfinding and Movement System for UE4
      RTS Camera C++ Tutorial

      Comment


        #4
        awesome, subscribing

        if I understood correct, you can do it all with an installer version of UE4 right? i.e. no compiling of the engine itself

        also I'd like to know, what's the performance in comparison with a Landscape?
        Follow me on Twitter!
        Developer of Elium - Prison Escape
        Local Image-Based Lighting for UE4

        Comment


          #5
          Originally posted by Chosker View Post
          awesome, subscribing

          if I understood correct, you can do it all with an installer version of UE4 right? i.e. no compiling of the engine itself

          also I'd like to know, what's the performance in comparison with a Landscape?
          Yup, no engine compiling required. The launcher version will work just fine!

          As far as performance comparisons go, it really depends on what you do with the voxels. Most of my setups have had roughly equal performance when compared to normal terrain, but it's pretty easy for performance to fall behind.
          Twitter @BrandonCGarvin

          Watch me build with the Unreal Engine on hitbox at /LtBrandon

          Comment


            #6
            Originally posted by LtBrandon View Post
            Yup, no engine compiling required. The launcher version will work just fine!

            As far as performance comparisons go, it really depends on what you do with the voxels. Most of my setups have had roughly equal performance when compared to normal terrain, but it's pretty easy for performance to fall behind.
            Yeah the procedural mesh component has some serious concerns as far as performance goes if you are creating a lot or very large mesh sections. There are a ton of optimizations and ways to improve it but it requires a modified mesh component to really pull off correctly.

            You might want to also base your polyvox code off of their cubiquity branch for UE4, it has been recently open sourced and has a lot of additional features over the base library, I would use parts of it myself except I barely have any of the original polyvox library left in my personal project.

            ANL is also a little slow, noisePP is a threaded and more optimized noise library that you might want to check out to improve more complicated noise generation.

            Nice write up though and cool project!


            Consider supporting me on patreon

            My Open source tools and plugins
            Advanced Sessions Plugin
            VR Expansion Plugin

            Comment


              #7
              This is exactly the type of tutorial series I have been looking for! I was just wondering though, are you still working on adding the other things you said you were planning on covering? If so, when do you think you will be adding them? I have been looking for a guide and tutorial to really help me accomplish all of these things for the game I am working on creating so let me know!

              Comment


                #8
                Originally posted by Jfrizz98 View Post
                This is exactly the type of tutorial series I have been looking for! I was just wondering though, are you still working on adding the other things you said you were planning on covering? If so, when do you think you will be adding them? I have been looking for a guide and tutorial to really help me accomplish all of these things for the game I am working on creating so let me know!
                Yup, I'm still working on it. In fact, part 4.5 is out today. That one covers updating to 4.12. Part 5 will follow shortly, probably later today or tomorrow. I've already written the code, and it is available on the project GitHub page if you'd like to check it out.
                Twitter @BrandonCGarvin

                Watch me build with the Unreal Engine on hitbox at /LtBrandon

                Comment


                  #9
                  Part 5 is finally here! Check it out over on my website: https://goo.gl/0uc8By
                  Twitter @BrandonCGarvin

                  Watch me build with the Unreal Engine on hitbox at /LtBrandon

                  Comment


                    #10
                    Awesome and in-depth tutorial! Great job.
                    I have been programming a small voxel engine in UE4 for awhile now. My time to work on it is limited. This tutorial was a very interesting read for me.

                    I do already use ANL, but I have never tried out PolyVox before. My concern is with something you said in the first tutorial about how you could not even safely read from the PagedVolume reliably in any thread other than the main thread.
                    I am very curious to see how you handle the multi threaded chunk generation.

                    Any spoilers are welcome.

                    EDIT:

                    I forgot to mention something - ninja edit

                    Have you seen the Runtime Mesh Component on the market place made by Chris AKA Koderz?
                    https://www.unrealengine.com/marketp...mesh-component

                    May be worth looking into. It is used pretty much the same way as the PMC made by Epic.

                    Lastly, handling the materials as individual mesh sections seems like it may cause performance issues with the number of draw calls? Say you have 256 kinds of voxel, so 256 draw calls per chunk seems like it could be an issue.
                    https://github.com/EpicGames/UnrealEngine/pull/2340 this is another item kept up by the Koderz I mentioned above. It looks like it is being merged into the engine now and would allows the draw calls to be significantly reduced if that becomes an issue.

                    Once again, keep up the great work!
                    Last edited by S0rn0; 07-26-2016, 03:59 AM.

                    Comment


                      #11
                      This is what I'm looking for a Voxel World like Minecraft that is purely made in cubes. Thanks for the tutorials mate.
                      UNREAL ENGINE 4 ENTHUSIAST
                      Games I Play:
                      1. World of Warcraft
                      2. Dota 2
                      3. SMITE
                      4. Tower Defense Games
                      5. Grand Theft Auto
                      6. Starcraft 2

                      Genre of Games I want to Develop:
                      1. Action
                      2. RPG
                      3. Zombie
                      4. Tower Defense
                      5. Open World
                      6. Survival


                      I am an ambitious person who wants to be rich by just making games. You can message me If you want to build a simple game together.

                      Comment


                        #12
                        that is great ,but i am interested in the part6,hope you can keep on working on this,thanks

                        Comment


                          #13
                          This is really cool but is it possible to make a smoother more realistic version for a game like AKA"7 Days to die" style maps in UE4

                          Comment


                            #14
                            Please make an updated tutorial version for the recent polyvox , ANL and UE4.15
                            I'm following step by step, but after compiling part2 i'll get all kinds of errors and my project will get corrupted and i need a new project and i'm really clueless on what to do.

                            Comment


                              #15
                              Awesome tutorial man, I've just implemented it in 4.19 preview and it works great. If you find the time, it may be worth going back and updating some of the sections with the edits you made later on especially the build.cs changes as this had me googling for a few minutes only to read the edits in the subsequent section after I had already implemented the fix.

                              Also, a little more detail on what some of the things do would be awesome and allow people to take it further.

                              Great tutorial overall though and provides people with a good foundation to build upon. Top Marks!!
                              [FREE] Procedural Bridge Blueprint, [FREE] Spline Enabled Ivy BP

                              Comment

                              Working...
                              X