Automatically Create an Unreal Scene Using Real-World Bathymetry Data | AUV Deep Dive, Part 7
From the series: AUV Deep Dive
For engineers who are not experienced in graphic design, creating a photorealistic simulation environment can be time-consuming. With RoadRunnner, you can create a high-quality Unreal® scene using both real-world bathymetry data and a library of building blocks
Hello, and welcome to what I consider to be the first of two focused tutorials. In this video I'll cover how to create the terrain and ocean features for your 3D environment in Unreal Engine 4. Specifically, we will look in detail at the RoadRunner workflow.
However, when possible I will point out some tools you could use to achieve hand terrain creation directly in Unreal Engine 4. For other workflows using 3D modeling tools such as Blender Maya or 3Ds Max, I would recommend you look up their documentation and associated resources.
First and foremost, we need some terrain data. In this case, I will retrieved a netCDF file from the NOAA website. These netCDF files are not directly compatible with RoadRunner. However, we can leverage MATLAB to quickly and easily convert them using functions like NC read to extract the height map data and GeoTIFF right to convert these CDF files to GeoTIFF.
Once we have a GeoTIFF file we can go straight into RoadRunner. Here, we can customize which portion of this height map data we want, add terrain using the surface tool, and toss in some props. In the case of a sea floor crosswalks, sidewalks, and traffic signs seem a bit out of place so instead let's add some rocks using the prop tools.
In this step, let's at least make sure we add all four individual rock props in the mix folder which you can find in the library browser under props. Adding these with a prop point tool will allow us to manipulate the individual rocks more easily when we're in Unreal Engine. This is important for both props and terrain, we remember to apply the GIS data such that the rocks sit on the terrain and the terrain surface is molded around the height data appropriately.
At this point we're nearly ready to export. However, I encourage you to explore options for optimizing your scene before we move on. I'll point out to in particular, first if you use the prop polygon tool which allows you to lay down props or props sets over an area in your scene, you could choose to combine these props on export. This merges multiple prop meshes into a single mesh.
Second as of R2021a, we can customize and export levels of detail inside RoadRunner. With this option RoadRunner export lower polygon representations of objects in the scene. Unreal 4 can then use these less detailed models to render sections of the environment, which are not as important to us. For example, things which are too far away to be relevant. Each of these options will improve the performance and thus the frame rate of your finished project.
Finally, we can export from RoadRunner. Remember to check the embed texas box to make sure the sand and the rock texture go along with the rest of the scene. If the environment is exceptionally large we can export it in sections. Don't worry about the warning that pops up regarding open drive, we don't have any roads so this is fine. Once we have the expert files we can move to Unreal Engine. In this case, I'm using the version compatible with our 2020b which is Unreal Engine 423.1.
I've already created a blank C++ world with starter content in Unreal Engine 4 and I've built the RoadRunner plugin files according to the documentation. First I got a file, new level select default and save this level as sea floor. We can delete the player start floor and the sphere reflection capture from the scene.
Now I can drag the files which we exported from RoadRunner into the Unreal Engine content browser and a pop up will alert me that the RoadRunner plugin is going to import these files. In this case, we want to modify the options to import level actors. This is not entirely necessary if we just want to view the terrain.
However, the level actors option will enable us to use the Unreal Engine prop tools later should we so desire. After the import has concluded the sea floor we exported from RoadRunner should be present in this level. At this point, we can verify that the textures are correct.
In other words, we want to make sure that the ground looks like sand and the rocks look like rocks. If they are gray checkerboards or matte gray, the textures may not have been embedded appropriately. You may try to resolve this either by exporting scene from RoadRunner again or manually by searching for sand or rock in the content browser in Unreal Engine to see if the appropriate textures were imported and just not applied. You could also add your own textures at this point or textures from the starter content.
Once we're sure the scene looks good and the textures are the way we want them, we can copy paste resize otherwise maneuver the four rocks we imported individually to create unique undersea features, something specific to your scene scenario or objective. We could also put a cube in the environment at this time and texture to make it look metallic orange. This will be our MacGuffin in this case, a black box.
Next we want to create that underwater effect, this is done via post-process volume. We can drag one of these into our scene from the modes panel on the left hand side of the Unreal 4 editor. Simply search for post process in the classes. Once the post process volume is in a scene, we can select it either directly in the scene or using the world outliner which should be in the upper right hand corner of the default layout of the Unreal 4 engine editor.
Once you've selected the post process volume, a details pane should appear below the world outliner. I have provided a list of details and their values in the live script. Changing each of those values to match should allow you to replicate the effect you see here.
Next we'll need to fit this post process volume to the location of the ocean, which should be everything below the xy plane. We could then add the ocean surface using a scaled up plane resized cube or in my case, the terrain generation tool in Unreal Engine.
This terrain tool is multipurpose in this case, we're using it for the ocean surface. However, if you were generating the terrain by hand, you could use the scope tools to create hills and valleys. And retexture this great checkerboard to look like sand or sea floor.
In my case, I can retexture it to look like the ocean. At this point our 3D environment is complete, we have a sea bed, ocean's surface, some clutter, and a McGuffin. At this point, we can couple the environment the Simulink in order to visualize the behavior of the submersible.
Featured Product
RoadRunner
Related Videos:
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other bat365 country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)