googlevr / seurat-unreal-plugin

Seurat is a scene simplification technology designed to process very complex 3D scenes into a representation that renders efficiently on mobile 6DoF VR systems.
Apache License 2.0
54 stars 21 forks source link

Importing Seurat Meshes Into Unreal

Seurat is a scene simplification technology designed to process very complex 3D scenes into a representation that renders efficiently on mobile 6DoF VR systems.

This document covers how to import Seurat meshes into Unity. To learn more about the Seurat pipeline, visit the main Seurat GitHub page.

Introduction

This document describes the process to import the output of the Seurat pipeline (generated from any source capture) into Epic Games’ Unreal Engine. The document assumes some familiarity with the Unreal Engine, and is written against version 4.16.

Import Instructions

Follow these steps:

Setup

  1. Start the Unreal Editor.
  2. Create a new blank project, with no starter content.
  3. Locate the Content Browser panel, typically at the bottom of the Editor main window.
  4. Locate the folder containing the Seurat output .OBJ, .EXR files. Give them separate file names, as Unreal requires unique names for each asset.
  5. Disable some rendering settings that interfere with Seurat rendering:
  6. Edit | Project Settings
  7. Locate the Translucency group
  8. Disable Separate Translucency
  9. Locate the Default Settings group
  10. Disable Bloom, Ambient Occlusion, and Auto Exposure
  11. Prepare Light Source for Unlit
  12. Locate the Light group
  13. Set Intensity to 8.0
  14. Disable Cast Shadows

Import the OBJ Model

  1. Click the Import button near the top left corner of the Content Browser panel.
  2. Navigate to the folder containing the Seurat .OBJ, .PNG, and .EXR file.
  3. Select the .OBJ file and the .EXR file (.PNG import has some artifacts).
  4. Click the Open button.
  5. The Editor displays a model import configuration dialog.\ Unreal import options
  6. Change the Import Rotation X axis to 90.0.
  7. If the Seurat capture was processed in meters, then change the Import Uniform Scale to 100.0 to scale the geometry to centimeters.
  8. Click the Show Advanced rollout in the Mesh options group.
  9. Disable Build Adjacency Buffer.
  10. Disable Generate Lightmap UVs.
  11. Click Import.
  12. The Editor will import the model and show an icon for it in the Content Browser.
  13. Double click the asset icon.
  14. The Editor will display the Model configuration editor.
  15. Locate the Details panel.
  16. Enable Use Full Precision UVs (to prevent crack artifacts).
  17. Locate the LOD0 options group.
  18. Expand the Build Settings subgroup.
  19. Check Use Full Precision UVs.
  20. Finally, place the Seurat mesh into the scene by clicking the imported asset icon in the Content Browser window and dragging it into the viewport.

Import the Texture

  1. Click the Import button near the top left corner of the Content Browser panel.
  2. Navigate to the folder containing the Seurat .OBJ, .PNG, and .EXR file.
  3. Select the .OBJ file and the .EXR file (.PNG import has some artifacts: 1,2,3).
  4. Click the Open button.
  5. The Editor will add the texture asset to the Content Browser panel.
  6. Double click the texture.
  7. The Editor will display the Texture editor in a new window.
  8. Locate the Details panel.
  9. If the input EXR is not HDR, change the compression type to RGBA or DXT1/5.

Create the Material

  1. Click the Add New button near the top left corner of the Content Browser panel.
  2. Click Material in the Create Basic Asset group.
  3. The Editor will add a material with the name NewMaterial in the Content Browser.
  4. Double-click NewMaterial to open it in the Material editor.
  5. Run the File | Save As... command and give the material a meaningful name, e.g. SeuratMesh.
  6. Click Save.
  7. Locate the Details panel.
  8. In the Material options group, change the Blend Mode to Translucent.
  9. Configure Shading Model to Unlit.
  10. In the material graph viewport, add a TextureSample node.
  11. Right click, open the Texture group, locate TextureSample and click it.
  12. Connect the RGB (white circle) output from the TextureSample node to the Emissive Color input in the SeuratMesh node.
  13. Connect the alpha (gray circle, near the bottom) output from the TextureSample node to the Opacity input in the SeuratMesh node.
  14. Save the material.

DISCLAIMER: This is not an officially supported Google product.