Outdoor Level Attempt Number 1


outdoor level.jpg
It’s been an interesting week of almost damaging my computer, lots of crashing, and yes failure at times. I had an idea of what I wanted my outdoor level to look like. Along with the function it would play in my game. There were a number of approaches I could have gone with and what I went with for me is not working out as I was hoping.

While it feels like a large amount of time was wasted this week. The truth is it was a learning experience. Much like what I’m doing overall it was another week of me just jumping into the deep end of the swimming pool and hoping I could swim. This time I sank a number of times. It was not a total failure, but, I am considering scrapping most of what was done this week.

There were a couple of different ways I could have made an outdoor level. I could have just using the tools in Unreal Engine and created a landscape for my outdoor area and the town I wanted this level to be based around. That, however, can take quite a long time. After a quick attempt, I was concerned I would not be able to get a decent lake and mountain in the background doing it with a mouse.

The next option was taking a look at real-world data points. There are a number of scientific and government-funded projects that collected topography data. They then publish this data in databases that people can across who are carrying out all sorts of things with that data. From creating a zone such as my interest in a video game to carrying out environmental studies. There is quite a wide range such data can be used for.

My other option was to try and use a map generation program. One, in particular, was recommended to me by a couple of people who have heard about them but have not used it themselves. I myself have also heard about a couple. My biggest fear was having to invest a lot of time into learning yet another program and then getting it into my own game.

All of these options are going to be a lot of learning and work either way. It’s also tempting to build out a couple of different levels using each method. Then pick which one I feel meets my needs without causing more trouble than it’s worth.

Real World Data

landmas.jpg
I ended up going with using real-world data points and converting that into a useable map that I could than important into Unreal Engine 4. My hope was to take a large area that had a bunch of different features that I was looking for and hopefully find a site to sculpt into my needs making it my own.

While it would sound like it is quite an involved process and it somewhat was. There are a number of sites like Opentopography that not only collect their own topography data but are funded for doing so from places like the National Science Foundation. They themselves also host other collections of data to be made publicly available with certain conditions for use.

After selecting a region and looking into some other use cases I sent a request for data. They were kind enough to provide it in only a minute or two for download. From there I needed to convert it into something useable that Unreal Engine itself could use.

There are a number of programs out there that are made for converting such kinds of data. I ended up going with L3DT which grants the user both a private and a for-profit license for using the final result of what their software does.

The most intimidating thing about using L3DT was the fact the activation key was over 350 characters long. Yes, you read that correctly. 350 characters long to use the version of the software I ended up needing for the massive data set I had on my hands.

After that, I more or less just made a greyscale image to overlap with it that was black. The program would convert the black values into zero which would fill in any holes in the data and serve as the bottom layer.

They even had an option for saving the data in an Unreal Engine 4 format. It could not have gotten much easier than that. It was also rather easy to import it into the game engine itself. I was quite shocked at how quickly I suddenly had this massive landscape to explore and use.

The only issue was I had way too much of an area than I needed. I knew that going into it. I was hoping I could just lasso the section I wanted and cut it out into a separate map. From my understanding, I can’t just do that in Unreal Engine at least not without buying third-party tools.

The good news is this massive map I had was broken down into 12 separate chunks. This thing was so huge a player could spend a week(s) walking around in it. I’m sure an entire game could be made out of this map alone.

Working On The Map

perfect spot for my town.png
Even better news there were some amazing mountains right at the edge of one of these chunks of land with an area I could shape to hold the town I wanted to build. The next chunk of land before it was a decent-sized lake with dozens of other lakes behind it. I thought I had found the perfect place.

Since I could just load in the two chunks I needed I was just going to disregard everything else. I spent quite a lot of time building out the landscape. From filling in some lakes with water and making others look liked dried out lakes. I also did some other landscaping such as smoothing out the terrain and using some build-in tools Unreal Engine has to try and solve some issues I was having.

dirt grass and rock layer blueprint.png
I even created a basic material blueprint that allowed me to select which layer I wanted to use for painting the landscape as grass, dirt, or rock. These were not very detailed in themselves they just gave a very basic coat that I then could put actual grass and other things over if I felt a need later on.

While I did not need to invest the time I did into areas you would have never seen. I treated it as a learning experience to play around with different things. I was also starting to see use cases for other parts of this land I could send the player off to later on in the game.

That was all fine and dandy for a while. That was until l I really started to add a bit of depth and character to my landscape. My computer itself is getting a bit old. It was also a budget computer I build a couple of years back just for gaming. It was not built for rendering or making a game. So I did expect things to take a fair amount of time for loading in maps to rendering the lighting.

Quirks, Crashing, OH MY $#@$

somthing not right.png
There were also quite a lot of quirks along the way from both Unreal Engine 4 itself and my lack of experience of using such data. I had so many crashes. Moments I thought I really messed things up. Heck, I thought I killed my graphics card at one point. It was a rough week.

The above screenshot was the result of a failure of loading in the entire world I had at one point. It overlaid all 12 sections onto each other! While this is quite funny looking back to it now it was not at that time. Let’s just say I spent more time than I wished before finding a solution.

wtf.png
There was also the time where I let things run for a while. It was the first time I was trying to load something in for this massive area I was working with. After a while, it was still sitting at 0% completed. I thought I would just let it run for a while on its own. I came back to over 50 gigs of paging ram being used after my own physical ram was maxed out. WTF???? I’m sure it would have consumed my entire hard drive if I had given it enough time.

I also had a few either game engine or entire system crashes. You would think I would have given up at the first couple of times it happened. It was quite clear my system was having a hard time at the task I gave it.

There was even one point at 4: 30 AM where I thought I had killed my graphics card. While I do have some money put away for building a new system so I could have at least dealt with the situation with little downtime. Needless to say, I was still freaking out at that hour of the day. Thankfully a cable had come loose and I just needed to jam that sucker back in. It is interesting how the perfect storm is made to lead one into such thinking when in reality it was an easy fix.

I also discovered while things like lakes and houses where being saved to my zone level file. All the landscape data, painting, sculpting, and other stuff are on a file that was not being saved. As the situation was different than my first level regarding that data so my guess it would be in the level map file was wrong.

How did I come to realize this? After I got an error message that flattened my entire landscape for whatever reason I’ll never understand. It was also at 3 AM or so and I watched the popup for the message “auto-saving files in 30 seconds.” I sat there dumbfounded and let it save my now corrupted map!!!

While I had my own full backups in the case something really went wrong. Unreal Engine also has its own backup saves. After finding where those were and replacing the backup it had for that level. I realized my landscape was still flattened like a pancake.

As far as the file most of my landscape data is saved on. Well, Unreal Engine backed that up three days prior. Between that and me now knowing I had this other file that needed to be backed up I was looking at an eight hours’ worth of landscaping lost. At least I still had my own full backup of everything.

it was fine.png
Thankfully after a couple of hours and my insanity being lost I gave rebooting my system a try before giving up for the day. Shocker everything was just how it was supposed to be. Not a clue why but you bet your butt I made sure to make a backup of that Land Screaming Proxy layer file.

I’m A Grass Man

amazing grass.jpg
Do you know what is just fucking sexy? Amazing grass in a video game that you could just walk and run around in all day. After I got past so many issues, it was finally time to start putting foliage into the game. I went a bit nuts with it.

Up until this point, my computer was doing the best it could. Once you add in a fully loaded with shadows 120k objects of grass, 10k trees, and a bunch of other shit. Well, you get like 5 FPS and a computer running likes it’s a slideshow.

The grass itself would not have been so bad, except, it was a tiny thing that you put on the ground. I might have upped its uniformity scaling to five or so times. For the player, it’s about waist height maybe a little taller. It also filled up a decent sized area. It was perfect or so I thought. I’m still messing with the scale factor as that is a bit tall.

Thankfully there where quite a lot of things one can do to solve performance issues. One of them being simply disabling the grass from rendering its own shadows which saved a lot on performance. There are also things like cull distance which were set by default as zero so the entire map more or less was trying to load in all the grass I had placed. While giving cull distance value does give the grass and other objects that pop in and out of view as the player moves around. it’s also nice to have 70+ FPS instead of 5. Along with some other changes.

grass sticking up.jpg

There is one thing I’ve not been able to address yet. For whatever reason, it will just stick up off the ground in this glitched manner. I’ve tried playing with a bunch of different settings. Looked into how others use grass. Heck, I’ve even made some major modifications to areas to see if it would help out. Sadly this would not be acceptable if I can’t fix it.

I’m sure there is some way to add in the logic I need even as it being a foliage object for it to course-correct itself when this happens. That is, however, something that still eludes me. I have looked at some very complex blueprint setups and even coding examples. I’m just not at a skill level yet to fully understand what everything is doing and if what others have done would result in this issue possibly being resolved. People, for the most part, seem to stick to the rather flat ground when explaining using foliage in Unreal Engine.

Otherwise using Unreal Engine 4’s foliage tool has been amazing. You can drag and drop a bunch of different objects from trees to flowers and grass. Each one of these individual groups of that object you can control the size, spawning density, and a whole lot of other settings.

While I have not fully filled out the massive map that I am on yet with a couple of different foliage loadouts creating unique little areas. I’ve done quite a fair amount to my local area that the player would be around. If I do end up choosing to stick with this map I need to go back in and smooth the terrain out a bit more. Along with fixing some clearly broken spots that did not have any data that created deep holes.

Final Thoughts

landscape with grass trees and a lake.jpg
While I have explored the first two options for making an outdoor level and spent a large amount of time using one based on real-world data. I’m still tempted to try using a third-party program for creating a map and seeing what other aspects it can also populate into it.

I’ve also not attempted to rebuild the lighting for this map as I’m quite concerned about how long that would even take if my system could perform such a massive task. While I have set up a Light Importance Volume area and done some other things that will help. I can fully understand now why Unreal has a swarm program to use the computing power of connected devices on a network to handle tasks like this.

I really love this area I just wish I could take a hot knife and size it down a bit. I also don’t want to redo a bunch of work to start over with the smaller area if I can even find it exactly on the map and get the data. I was also just using a trial period for converting that data into something Unreal can use so time is rather limited.

Next up I’m most likely going to look into using an actual program for making a map. I also need to do more research to see if I can just cut out what I don’t want without too much of an issue inside of Unreal Engine myself.

Other Content

Information

Screenshots were taken and content was originally posted by our main developer on his blog found [here]. Screenshots are from Unreal Engine 4.

Files

NPC Combat And Loot Demo 7.9 GB
Version 1 May 16, 2021

Get Nightly Dungeon

Leave a comment

Log in with itch.io to leave a comment.