Immersive Stream for XR from Google Cloud currently supports Unreal Engine. The recommended specifications are based on asset integration and development with Unreal version 4.27.2.
Recommended specifications
The specifications are selected to guarantee that the assets will render at 30 FPS and load in 2 seconds or less when deployed in the cloud.
File size
To check the size of your map in Unreal Editor, use the right-click menu of the car level umap asset and then select Size Map. Including large assets tends to increase loading times. Enable streaming for meshes and textures.
Keep asset names to a maximum of 30 characters.
Textures
There is no limit for texture size, but we recommend optimizing the textures for optimal loading times and rendering performance.
You can use the Required Texture Resolution view to analyze the texture size needs for each asset.
Bake any textures that you use from Substance or any other dynamic plugins.
Materials
Translucent materials
Use Surface ForwardShading as the lighting mode for translucent materials.
Ray tracing
Currently, Immersive Stream for XR does not support ray tracing.
Meshes
Shadow casting
Leave shadow casting enabled for most meshes, but we recommend that you disable dynamic shadow casting for smaller meshes when possible.
Instancing
Meshes should use instancing as much as possible.
Triangle and mesh count
Keep the total triangle count of all meshes and the number of distinct meshes within a reasonable range. For example, for the Search Autos example, we used 17,000,000 triangles or less for LOD 0 and 700,000 or less for LOD 1, with a mesh count of less than 300. This speeds up model loading times and avoids a large number of draw calls.
Connectivity
Keep repeated vertices to a minimum. In general, the number of vertices per mesh should be less than 1.75 times the number of triangles. You can check whether the vertex and triangle count of your original mesh roughly match the one in Unreal Editor after importing.
LODs
When the total triangle count for all meshes is above the 700,000 limit, high triangle count meshes can provide both a high (LOD 0) and low detail LOD (LOD 1). LOD1 will be shown initially while LOD0 is streamed in.
- Apply the C9Streaming LOD Group to these meshes.
- Set the Screen Size to 0.0 for LOD 1.
- Set LOD for collision to 1.
You can provide a custom, externally generated mesh for LOD 1 or use Unreal Engine's built-in mesh simplification.
Adding Videos
The experience is run using Linux and Vulkan, so the supported type of video formats are:
- Image sequence
- WebM
Lighting setups
3D mode background levels
Ideally, 3D mode background levels should use one movable DirectionalLight
and
dynamic shadow casting. The scenes can include an HDRI_Backdrop
with a stationary SkyLight
. In some cases, you can use additional static light
sources that use prebuilt lighting.
AR mode background level
Our AR mode background level uses one movable DirectionalLight
for lighting
and dynamic shadow casting, and one movable SkyLight
for environment
reflections. Don't modify these settings.
Asset levels
You can add light sources to the asset levels, but these light sources need to have static mobility and Cast Shadows turned off.
Orientation
Rotation
For the assets to face the camera at the start of the experience when using the default camera setup, rotate the assets to face the -X axis. The 3D default pawn starts with a 45 deg rotation in Z.
Optimization
Textures
Make sure the following values are within the bounds listed in the the following tables:
Fully Loaded Memory ≤ 1,500,000 KB | Limit total size of all loaded textures. |
---|
Make sure that for each texture the following value is within bounds.
Max dimensions ≤ 4,096x4,096 | Limit the maximum dimensions of each texture. |
---|
Make sure that the number of rows (distinct textures) is ≤ 150.
You can view these values for your application by following these steps:
- In the Statistics window, select Texture Stats from the drop down menu.
- Select All Streaming Levels in the upper right dropdown.
Geometry
Select Primitive Stats from the upper left drop down menu in the Statistics window and select All Objects in the upper right dropdown. Make sure the following values are within the bounds listed below in the first row of the following table:
Count ≤ 300 | limit the number of unique meshes |
---|---|
Inst Section ≤ 1000 | limit the number of sections within each mesh |
Sum Tris ≤ 17,000,000 | limit the total triangle count |
Avg R ≤ 75 | limit the average mesh bounding sphere radius |
Optimizing one of the requirements above might make others worse. It is important to find a balance such that all numbers stay within the bounds.
Rendering
You can analyze the statistics of a rendered frame in Unreal Editor. To do so,
position the camera to show the full car model. Run the r.AllowOcclusionQueries
0
console command to avoid GPU object culling. Then run the following
commands:
Run the stat RHI ]console command and make sure the counters for
Triangles drawn are ≤ 35,000,000 and DrawPrimitive calls ≤ 1,500. |
---|
Run the stat GPU console command and make sure the average timing for
the Basepass is less than or equal to one third of the entry for
[Total]. |
Asset analysis
Fig. 24 | To make sure the models are up to the required specifications, you can analyze most of the specifications listed above within Unreal Editor using the Window → Statistics window or using the Asset Analysis tool. This tool should be loaded by default when opening the template project. If you don't see the window, you can activate it with the following steps: Click Window > Editor Utility Widgets > AssetAnalysis.* |
---|
Links and resources
Automatic LOD generation
To generate the low detail LOD (LOD 1) using the automatic LOD generation
that Unreal Engine provides, start with a simplification percentage that
generates meshes totalling 500,000 triangles or less. From there, add additional
triangles for meshes with obvious mesh defects. You can check the total
triangle count of a view sing the stat
commands described in the
Rendering section. To force rendering of LOD 1, you
can set Forced Lod Model to 2 on all meshes (don't forget to reset Forced
Lod Model to 0 before sharing). For the automatic LOD generation to work
optimally, make sure to merge all duplicate vertices to get a better
representation of the mesh connectivity.
Limitations
Plugins
Cloud project currently only supports plugins at the Unreal Engine
project level located in the Plugins
subfolder. Engine plugins are not
supported. Project plugins either need to be prebuilt for Linux or will be built
as part of building the Content resource you
create. The latter requires the upload of the source files of the plugin.