vr and game engine workflows with cityengine...unity vs unreal: tech •unreal more built-in...

57
VR and Game Engine Workflows with CityEngine Eric Wittner, Taisha Waeny

Upload: others

Post on 04-Jul-2020

39 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

VR and Game Engine Workflows with CityEngine

Eric Wittner, Taisha Waeny

Page 2: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Agenda

• Introduction into Game Engines - Taisha

• User Examples - Taisha

• GIS2VR workflow: CityEngine to Unity - Eric

• GIS2VR workflow: CityEngine to Unreal - Eric

• Unreal Basics & Principles - Eric

• CityEngine VR Template - Eric

Page 3: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

• Unity vs Unreal

Introduction into Game Engines

Page 4: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

GIS to Game Engines

GISdata

Game engine (Unity & Unreal) professional XR dev environment

CityEngine

CityEngine VR Experienceout-of-the-box premium VR via Unreal project template

ArcGIS 360 VRout-of-the-box mobile VR for Oculus Go & Samsung Gear

FBXDatasmith

Page 5: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Architectural Visualization

“Unreal Engine is 4th most used production renderer (including offline renderers)” CGarchitect2018 Survey

Industry is using game engines for high-end 3D real-timevisualization

Page 6: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Movie

Page 7: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

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 8: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

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 with which you can do multiple things

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

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

Page 9: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Unity vs Unreal

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

Page 10: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

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 11: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

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 12: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

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 used about 3 times more than Unity in architectural viz

Page 13: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Vrbn, City of Zurich, HOK

CityEngine User Examples

Page 14: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some
Page 15: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some
Page 16: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some
Page 17: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some
Page 18: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some
Page 19: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some
Page 20: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some
Page 21: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

• FBX-based Workflow

GIS2VR: CityEngine to Unity

Page 22: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

CityEngine: Select, «Export Models...»

Page 23: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Choose FBX, Tweak Settings, & Click Finish

Page 24: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Unity: Drag&Drop FBX to Assets & into scene

Page 25: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Move «Main Camera» to center

Page 26: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Enable VR

• Edit, Project Settings, Player

• Check «Virtual Reality Supported»

• Add OpenVR Support

- Click «+», «OpenVR»

- Drag above «Oculus»

Page 27: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

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

Page 28: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

VR: Add Locomotion

• Window, «Asset Store»

• Search «SteamVR Plugin»

• «Import»

• «SteamVR_Settings» Dialog

- «Accept All»

Page 29: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Add «Player»

• Delete «Main Camera»

• Drag in

«SteamVr\

InteractionSystem\

Core\Prefabs\Player»

Page 30: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Add «teleport» prefab

• Drag in

«SteamVr\

InteractionSystem\

Teleport\

Prefabs\Teleporting»

Page 31: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Add Teleport Points

• Drag in multiple

«SteamVr\

InteractionSystem\

Teleport\

Prefabs\TeleportPoint»

• Optional: Increase

their scale

Page 32: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

In VR, Teleport Using Click on Wheel

Page 33: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Teleport anywhere

• Click Mesh in Assets

• «Generate Colliders»

• «Apply»

Page 34: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Teleport anywhere

• Double-click street

• Copy/Paste

• Drag

«SteamVr\

InteractionSystem\

Teleport\

Scripts\TeleportArea»

on street copy

Page 35: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

In VR, Teleport Anywhere on Street

Page 36: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

• Datasmith-based Workflow

GIS2VR: CityEngine to Unreal

Page 37: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

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 38: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

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 39: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Exporting from CityEngine

• Options to modify

mesh granularity

• Choose between

standard instancing

& foliage system

• Datasmith takes

care of game

engine

optimizations

Page 40: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

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 41: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

• Quickstart Guide

Unreal Basics & Principles

Page 42: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

UI

Page 43: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Material Handling

• De-facto standard for

material definition

• Graph-based editor UX

• Custom nodes can be

created with HLSL code

Page 44: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Visual Effects: Height Fog

Page 45: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Visual Effects: Atmospheric Fog

Page 46: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Postprocessing

• Depth of Field

• Lens effects

- Vignette

- Chromatic

Aberration

- Bloom

• Color Grading

• Ambient occlusion

• …

Page 47: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Development Example: UI Popup

• Popup with metadata (CSV) exported from CityEngine

Page 48: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Widget Designer (UMG)

• Can either be HUD

based or in-game UI

elements

• Functionality can be

added using

Blueprints

Page 49: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Blueprint Example

Page 50: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

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 51: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

C++ Example

UCLASS()class BLUEPRINTCPPTEST_API AMyActor : public AActor{

GENERATED_BODY()

UFUNCTION(BlueprintCallable)void ExpensiveFunction();

}

Page 52: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

CityEngine VR Experience

Page 53: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

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 54: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Using the CityEngine VR Experience

• Create CityEngine VR Experience Project

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

• Set-up points of interest

Page 55: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some
Page 56: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some

Get in touch with us…

TaishaLinkedIn: www.linkedin.com/in/taishawaeny

Email: [email protected]

Erichttps://www.linkedin.com/in/eric-wittner-26002b21

Email: [email protected]

Page 57: VR and Game Engine Workflows with CityEngine...Unity vs Unreal: Tech •Unreal more built-in features (Blueprints, Material Editor, etc.)-Unity catching up on features (Material Editor)-Some