49
High-End 3D Visualization with CityEngine, Unity and Unreal Pascal Mueller

High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

  • Upload
    others

  • View
    77

  • Download
    1

Embed Size (px)

Citation preview

Page 1: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

High-End 3D Visualization with

CityEngine, Unity and UnrealPascal Mueller

Page 2: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Agenda

• Introduction into Game Engines (including Unity-Unreal Comparison)

• User Examples

• GIS2VR workflow: CityEngine to Unity

• GIS2VR workflow: CityEngine to Unreal

• Unreal Basics & Principles

• CityEngine VR Template

Page 3: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Unity vs Unreal

Introduction into Game Engines

Page 4: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Architectural

Visualization

“Unreal Engine is 4th most used

production renderer (including offline

renderers)” CGarchitect 2018 Survey

Industry is using game engines for

high-end 3D real-time visualization

Page 5: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

What is a Game Engine?

A SW dev environment designed for people to build video games:

- Rendering engine for 2D or 3D graphics

- Physics engine, collision detection

- Spatial audio rendering

- Animation, artificial intelligence

- Scripting, scene graph

- Video support for cinematics

- Networking, memory mgmt, threading, localization support …

Page 6: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Why Game Engines?

A SW dev environment designed for people to build video games

An environment designed for people to build experiences

Experience != line of sight tool where you can do multiple things with

Experience = use-case specific intuitive real-time UX e.g. find sniper

…BUT: game engines don’t support geo-referencing!!!

Page 7: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Unity vs Unreal

Both are for free as long as you basically don’t publish “exe”

Page 8: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Unity vs Unreal: Tech

• Unreal more built-in features (Blueprints, Material Editor, etc.)

- Unity catching up on features (Material Editor)

- Some available via plugins (not all of them for free though)

- Replicating high-end features of Unreal can be complicated in Unity

• Unreal default materials and assets are of higher quality

• Unreal tends to better suited for HQ/performance applications

- E.g. global illumination system of Unity not dynamic and slower

Page 9: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Unity vs Unreal: Development

• Unreal has built-in visual scripting called Blueprint

• Development in Unity in C# & JavaScript and in Unreal in C++

• Source code for Unreal is public for everybody!!!

• Unreal exceptionally good for devops & source code mgmt.

• Unity supports more platforms (Nintendo Switch etc)

• Both support browser - but stability & performance lacking…

Page 10: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Unity vs Unreal: Adoption

• Unity tends to be more beginner

friendly

• Unity has more indie developers

i.e. asset store of Unity is bigger

• Epic Games supporting non-game

applications more

• Unreal about 3 times more used

than Unity in architectural viz

Page 11: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Vrbn, City of Zurich, HOK

CityEngine User Examples

Page 12: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching
Page 13: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching
Page 14: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

FBX-based Workflow

GIS2VR: CityEngine to Unity

Page 15: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

CityEngine: Select, «Export Models...»

Page 16: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Choose FBX, Tweak Settings, & Click Finish

Page 17: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Unity: Drag&Drop FBX to Assets & into scene

Page 18: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Move «Main Camera» to center

Page 19: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Enable VR

• Edit, Project Settings, Player

• Check «Virtual Reality Supported»

• Add OpenVR Support

- Click «+», «OpenVR»

- Drag above «Oculus»

Page 20: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Start in VR: Press «Play» and experience it in HTC Vive

Page 21: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

VR: Add Locomotion

• Window, «Asset Store»

• Search «SteamVR Plugin»

• «Import»

• «SteamVR_Settings» Dialog

- «Accept All»

Page 22: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Add «Player»

• Delete «Main Camera»

• Drag in

«SteamVr\

InteractionSystem\

Core\Prefabs\Player»

Page 23: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Add «teleport» prefab

• Drag in

«SteamVr\

InteractionSystem\

Teleport\

Prefabs\Teleporting»

Page 24: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Add Teleport Points

• Drag in multiple

«SteamVr\

InteractionSystem\

Teleport\

Prefabs\TeleportPoint»

• Optional: Increase

their scale

Page 25: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

In VR, Teleport Using Click on Wheel

Page 26: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Teleport anywhere

• Click Mesh in Assets

• «Generate Colliders»

• «Apply»

Page 27: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Teleport anywhere

• Double-click street

• Copy/Paste

• Drag

«SteamVr\

InteractionSystem\

Teleport\

Scripts\TeleportArea»

on street copy

Page 28: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

In VR, Teleport Anywhere on Street

Page 29: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Datasmith-based Workflow

GIS2VR: CityEngine to Unreal

Page 30: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Unreal Material Handling in CGA Rules

In CityEngine

• (Optional) Modify CGA rules to assign appropriate Unreal materials

• Export scene with Datasmith exporter

In Unreal

• Create CityEngine Template project

• Import Datasmith file into Unreal

Page 31: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

CityEngine to Unreal Workflow Overview

• set(material.shader, «path/to/material/in/unreal/») in CGA

• Template has 3 uber-shaders (opaque, semi-transparent, masked)

• Or create custom materials in Unreal and reference them from CGA

Page 32: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Exporting from CityEngine

• Options to modify

mesh granularity

• Choose between

standard instancing

& foliage system

• Datasmith takes care

of game engine

optimizations

Page 33: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Importing into Unreal

• Create CityEngine Template Project

• Open project and import Datasmith file

• Default options fine for normal sized meshes

• For lightmap baking the lightmap resolution

might need tweaking

Page 34: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Quickstart Guide

Unreal Basics & Principles

Page 35: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

UI

Page 36: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Material Handling

• De-facto standard for

material definition

• Graph-based editor UX

• Custom nodes can be

created with HLSL code

• adding glow to M_CE_Opaque

Page 37: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Visual Effects: Height Fog

Page 38: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Visual Effects: Atmospheric Fog

Page 39: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Postprocessing

• Depth of Field

• Lens effects

- Vignette

- Chromatic Aberration

- Bloom

• Color Grading

• Ambient occlusion

• …

Page 40: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Development Example: UI Popup

• Popup with metadata (CSV) exported from CityEngine

Page 41: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Widget Designer (UMG)

• Can either be HUD

based or in-game UI

elements

• Functionality can be

added using

Blueprints

Page 42: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Blueprint Example

• asdf

Page 43: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Blueprints or C++?

Typically computational expensive

methods should be written in C++,

everything else via Blueprints

• Create C++ Actor class with

special annotations

• Create Blueprint Actor based

on this C++ class

• Call function from Blueprint

Page 44: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

C++ Example

UCLASS()class BLUEPRINTCPPTEST_API AMyActor : public AActor{

GENERATED_BODY()

UFUNCTION(BlueprintCallable)void ExpensiveFunction();

}

Page 45: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Work in Progress

CityEngine VR Template

Page 46: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Based on the Tabletop UX

• Common UX pattern

in MR, VR & AR

• Collaborative

• Intuitive, people

relate to table

• Specific for selected

urban planning

workflows

© 2017 City of Zurich

Page 47: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching

Using the CityEngine VR Template

• Create CityEngine VR Template Project

• Open project and import Datasmith file (optional: import own room)

• Downscale city to fit in Room

Page 48: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching
Page 49: High-end 3D Visualization with CityEngine, Unity, and Unreal · 2018-03-27 · Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching