Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites ›...

53
Pascal Mueller, Stefan Arisona Building VR/AR Experiences with CityEngine, Unity and Unreal Engine 4

Transcript of Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites ›...

Page 1: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Pascal Mueller, Stefan Arisona

Building VR/AR Experiences withCityEngine, Unity and Unreal Engine 4

Page 2: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

• Introduction to game engines • CityEngine user examples• Unity or Unreal Engine?• Importing GIS data in general• Importing GIS data into Unity• Importing GIS data into Unreal Engine• Summary and outlook

Agenda

Page 3: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Introduction to game engines

Page 4: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

A software development environment designed for people to build video games:• Rendering engine for 2D or 3D graphics • Multiple device support: desktop, mobile, console, VR/AR• Animation, game AI, physics, audio• Cinematics and virtual production• Asset management, increasingly also editing tools• Extensible, scriptable• Networking, memory management, threading, localization support …

What is a game engine?

Page 5: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences
Page 6: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

VR/AR experiences are use-case specific applications:• focused on story• intentionally limited functionality• real-time UI / UX• content centric, graphics intense• need to support a variety of VR/AR devices

These characteristics make them a good match for game engines.

Why use game engines to build AR/VR experiences?

Page 7: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences
Page 8: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Interactive experiences such as games, touchscreen apps, live video effects, VR/AR apps require fast refresh rates (60 fps or higher).

Alternatively, game engines can also be used for offline rendering of 3D still images and video sequences.

Interactive experience vs. offline rendering

Page 9: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

25% of users say they use game engines (mainly Unreal Engine and Unity) for architectural visualization.50% of users say they are experimenting with game engines.

Source:CGArchitect 2019Arch Viz Rendering Engine Survey

Architectural visualization

Page 10: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences
Page 11: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences
Page 12: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences
Page 13: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Creating experiences quickly: Epic Twinmotion and Unity Reflect

Page 14: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

CityEngine user examples

Page 15: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences
Page 16: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences
Page 17: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences
Page 18: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Unity or Unreal Engine?

Page 19: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

• Both are complete game development environments• Run on all major platforms, support many target platforms (PC, mobile, console)• Support state-of-the-art 3D rendering, both are well suited for XR• No built-in support for GIS data / coordinate systems yet

Unity vs. Unreal Engine: what they have in common

Page 20: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Unity• Subscription model• No royalties• Source code not generally available

• Both: options for custom licensing

• Licensing details are important when choosing your engine

Unreal Engine• Publishing license: royalty-based• Creators license: no royalties, free• Source code available

Unity vs. Unreal Engine: licensing

Page 21: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

• Unreal Engine is generally better suited for high quality / performance applications- More advanced render features (ray tracing, sky atmosphere model, etc.)- Can easily be customized with C++ code- Unity is however lagging only little behind, also providing more high-end features

• Unreal Engine has a visual scripting system called “Blueprints”- Makes it very easy to prototype functionality, implement high-level concepts where C++ is

overkill- Unity, so far, has no such feature, scripting is based on C#

• The Unreal editor environment is completely customizable- Use Blueprints, Python, C++ to add your own functionality- Unity allows extending the editor to some degree

• Unreal tends to be “heavyweight” in resource consumption than Unity

Unity vs. Unreal Engine: technology

Page 22: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Unity• Popular among beginners• Many indie developers• Originally 2D / mobile focus

- 3D engine is evolving though

• Non-game support emerging

• Large community

Unreal Engine• Not very beginner friendly• Used in larger projects / AAA• High-end 3D

- Quite resource hungry- Mobile support catching up

• Strong non-game support by Epic- Focus on AEC, CAD, simulation

• Smaller community

Unity vs. Unreal Engine: adoption

Page 23: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Unity vs. Unreal Engine: our conclusion so far...

“Winner”

Development environment Draw

Technology Unreal

Community Unity

Page 24: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Importing GIS data in general

Page 25: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

• Traditionally, game engines work in a local coordinate system and are not able to cope with georeferenced systems

- Thus data must be transformed (centered) before it’s imported

• Precision: typically 32bit floating point- Extent must be within limits (depending on base unit applied)

• Optimization- Game engines focus on rendering (with some additions, e.g. collisions) and therefore

optimize (e.g. merge) geometry so it can be batch-rendered- Consequently, originally structured data is turned into unstructured objects, making it hard

to interact with

• There is work in progress to address these limitations

Game engine limitations for geospatial and CAD data

Page 26: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Getting CAD data into game engines... is it really that complicated?

Source: https://www.researchgate.net/publication/258241826_Using_3D_Design_software_BIM_and_game_engines_for_architectural_historical_reconstruction

Page 27: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

• FBX (by Autodesk) is well supported by both Unity and Unreal Engine• 3D modeling and CAD tools often provide FBX exporters

• So, in theory, this should all work nicely, right?

• In practice however…

The classic option: FBX

Page 28: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

• …it’s typically a mess (not just for FBX).

• Incompatible format versions, nonstandard• Problems with mesh and material handling• Problems with handling large models• Unknown origin of source data• …

The classic option: FBX

Page 29: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

A different approach: Unreal Datasmith & Unity+PiXYZ

Page 30: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

A different approach: Unreal Datasmith & Unity+PiXYZ

Page 31: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

• You can hook into the engine’s import process to filter, optimize, replace, enrich, ...• In Unity: Using custom import scripts or by using PiXYZ• In Unreal Engine: Using scripted or visual dataprep

Dataprep: transform your data so it fits the engine

Page 32: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Include geospatial data using CityEngine

BIM / CAD

Base MapsOSM

ArcGIS OnlineArcGIS Urban

FBX import

Get map data

Sync

Unity Editor

FBX

Page 33: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Importing GIS data into Unity

Page 34: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Workflow: select models and chose “Export Models...”

Page 35: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Workflow: chose Autodesk FBX, tweak settings, and click “Finish”

Page 36: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Workflow: drag & drop FBX file to Unity assets and into scene

Page 37: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Workflow: move camera to a point of interest in the city

Page 38: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Workflow: press “Play”

Page 39: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Importing GIS data into UE4

Page 40: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences
Page 41: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Replacing CE preview materials with high quality UE4 PBR materials

Preparation of UV mappingTexture in CityEngine

Replacement of material

Page 42: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Replacing CE placeholders with UE4 assets

Unreal Engine foliage system

Page 43: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

UI for batch replacement of large amounts of placeholders & assets

Page 44: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Sidewalk greenery after applying replacements

Page 45: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Night scene using street light Blueprints

Page 46: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Terrain remains editable using brushes and other landscape tools

Page 47: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Realistic sky lighting and cloud rendering

Page 48: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Summary and outlook

Page 49: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

• Game engines are great for building real-time 3D experiences• They provide most required features, also for AR/VR, out-of-the-box

• However, they are heavily specialized on graphics performance- Experiences with special requirements will typically require coding

• Unreal Engine and Unity have many similarities, also some differences.

• Importing CAD data is generally well supported• Importing GIS data has limitations• CityEngine helps combine GIS and CAD data and resolve some of the limitations

Summary

Page 50: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

• With the growing use of game engines for non-games (AEC, CAD, ...), the engine companies are increasingly interested in GIS data

• We can expect engine enhancements to better handle GIS data soon

• In addition, we will see integration of CAD- and GIS enabling software directly into the engine. For example:

- CityEngine integration: plugins to generate procedural geometry directly in the engine- ArcGIS integration: plugins to access GIS content from within the engine

Outlook

Page 51: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences

Vitruvio: A CityEngine plugin for Unreal Engine

Page 52: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences
Page 53: Building VR/AR Experiences with CityEngine, Unity, and Unreal › content › dam › esrisites › en-us › ... · •Game engines are great for building real -time 3D experiences