万本电子书0元读

万本电子书0元读

顶部广告

Unreal Engine 4 Virtual Reality Projects电子书

售       价:¥

5人正在读 | 0人评论 9.8

作       者:Kevin Mack

出  版  社:Packt Publishing

出版时间:2019-04-30

字       数:61.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Learn to design and build Virtual Reality experiences, applications, and games in Unreal Engine 4 through a series of practical, hands-on projects that teach you to create controllable avatars, user interfaces, and more. Key Features * Deploy your virtual reality applications on the latest Oculus Go and Samsung Gear * Build real-world applications such as 3D UIs, mini games, and 360° media player applications using Unreal Engine 4 * Master multiplayer networking and build rich multi-user VR experiences Book Description Unreal Engine 4 (UE4) is a powerful tool for developing VR games and applications. With its visual scripting language, Blueprint, and built-in support for all major VR headsets, it's a perfect tool for designers, artists, and engineers to realize their visions in VR. This book will guide you step-by-step through a series of projects that teach essential concepts and techniques for VR development in UE4. You will begin by learning how to think about (and design for) VR and then proceed to set up a development environment. A series of practical projects follows, taking you through essential VR concepts. Through these exercises, you'll learn how to set up UE4 projects that run effectively in VR, how to build player locomotion schemes, and how to use hand controllers to interact with the world. You'll then move on to create user interfaces in 3D space, use the editor's VR mode to build environments directly in VR, and profile/optimize worlds you've built. Finally, you'll explore more advanced topics, such as displaying stereo media in VR, networking in Unreal, and using plugins to extend the engine. Throughout, this book focuses on creating a deeper understanding of why the relevant tools and techniques work as they do, so you can use the techniques and concepts learned here as a springboard for further learning and exploration in VR. What you will learn * Understand design principles and concepts for building VR applications * Set up your development environment with Unreal Blueprints and C++ * Create a player character with several locomotion schemes * Evaluate and solve performance problems in VR to maintain high frame rates * Display mono and stereo videos in VR * Extend Unreal Engine's capabilities using various plugins Who this book is for This book is for anyone interested in learning to develop Virtual Reality games and applications using UE4. Developers new to UE4 will benefit from hands-on projects that guide readers through clearly-explained steps, while both new and experienced developers will learn crucial principles and techniques for VR development in UE4.
目录展开

About Packt

Why subscribe?

Packt.com

Contributors

About the authors

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Get in touch

Reviews

Thinking in VR

What is virtual reality?

VR hardware

VR isn't just about hardware though

Presence is tough to achieve

What can we do in VR?

Games in VR

Interactive VR

VR cinema – movies, documentary, and journalism

Architecture, Engineering, and Construction (AEC) and real estate

Engineering and design

Education and training

Commerce, advertising, and retail

Medicine and mental health

So much else

Immersion and presence

Immersion

Using all the senses

Make sure sensory inputs match one another and match the user's expectations

Keep latency as low as possible

Make sure interactions with the world make sense

Build a consistent world

Be careful of contradicting the user's body awareness

Decide how immersive you intend your application to be and design accordingly

Presence

Simulator sickness

Safety

Best practices for VR

Maintain framerate

Tethered headsets

Standalone Headsets

Never take control of the user's head

Do not put acceleration or deceleration on your camera

Do not override the field of view, manipulate depth of field, or use motion blur

Minimize vection

Avoid stairs

Use more dimmer lights and colors than you normally would

Keep the scale of the world accurate

Be conscious of physical actions

Manage eyestrain

Make conscious choices about the content and intensity of your experience

Let players manage their own session duration

Keep load times short

Question everything we just told you

Planning your VR project

Clarify what you're trying to do

Is it a good fit for VR? Why?

What's important – what has to exist in this project for it to work? (MVP)

Break it down

Tackle things in the right order

Test early and often

Design is iterative

Summary

Setting Up Your Development Environment

Prerequisite – VR hardware

Setting up Unreal Engine

What it costs

Creating an Epic Games account

The Epic Games launcher

Installing the engine

Editting your vault cache location

Setting up a Derived Data Cache (DDC)

Setting up a local DDC

Launching the engine

Setting up for mobile VR

Creating or joining an Oculus developer organization

Setting your VR headset to developer mode in Oculus Go

Installing Android Debug Bridge (ADB)

Setting up NVIDIA CodeWorks for Android

Verifying that the HMD can communicate with your PC

Generating a signature file for Samsung Gear

Deploying a test project to the device

Setting up a test project

Checking that your OculusVR plugin is enabled

Setting a default map

Clearing the default mobile touch interface

Setting your Android SDK project settings

Setting your Android SDK locations

Launching the test project

Using the Epic Games launcher

The Unreal Engine Tab

Learn

The content examples project

Gameplay concepts and example games

Marketplace

Library

Setting up for C++ development

Installing Microsoft Visual Studio Community

Recommended settings

The UnrealVS plugin

Installing the UnrealVS plugin

Turning on the UnrealVS toolbar

Unreal debugging support

Test everything out

Building Unreal from source code

Setting up a GitHub account and installing Git

Setting up or logging into your GitHub account

Installing Git for Windows

Installing Git Large File Storage

Installing a Git GUI

Connecting your GitHub account to your Epic Games account

Downloading the Unreal Engine source code

Choosing your source branch

Forking the repository

Cloning the repository to your local machine

Option 1 – Cloning using GitHub Desktop

Option 2 – Cloning from the command line

Downloading engine binary content

Generating project files

Opening and building the solution

Updating your fork with new changes from Epic

Option – Using the command line to sync changes

Setting the upstream repository

Syncing the fork

Reviewing the Git commands we just used

Option – Using the web GUI to sync changes

Creating a pull request

Merging the pull request

Pulling the origin to your local machine

Re-synchronizing your engine content and regenerating project files

Going further with source code on GitHub

Additional useful tools

A good robust text editor

3D modeling software

Image-editing software

Audio-editing software

Summary

Hello World - Your First VR Project

Creating a new project

Setting your hardware target

Setting your graphics target

Settings summary

Taking a quick look at your project's structure

The Content directory

The Config directory

The Source directory

The Project file

A summary of an Unreal project structure

Setting your project's settings for VR

Instanced Stereo

Round Robin Occlusions

Forward and deferred shading

Choosing the right rendering method for your project

Choosing your anti-aliasing method

Modifying MSAA settings

Starting in VR

Turning off other stray settings you don't need

Turning off default touch interface (Oculus Go/Samsung Gear)

Configuring your project for Android (Oculus Go/Samsung Gear)

Verifying your SDK locations

Making sure Mobile HDR is turned off (Oculus Go/Samsung Gear)

Mobile Multi-View (Oculus Go/Samsung Gear)

Monoscopic Far Field Rendering (Oculus Go / Samsung Gear)

Project Settings cheat-sheet

Decorating our project

Migrating content into a project

Cleaning up migrated content

Deleting assets safely

Moving assets and fixing up redirectors

Setting a default map

Testing our map on desktop

Testing our map on mobile (Oculus Go/Samsung Gear)

Setting up a game mode and player pawn

Creating a VR pawn

Creating a game mode

Assigning the game mode

Overriding a GameMode for a specific map

Placing a pawn directly in the world

Setting up the VR pawn

Adding a camera

Adding motion controllers

Setting our tracking origin.

Adjusting our Player Start location to the map.

Testing in the headset.

Packaging a standalone build

Summary

Getting Around the Virtual World

Teleport locomotion

Creating a navigation mesh

Moving and scaling the Navmesh Bounds volume

Fixing collision problems

Excluding areas from the navmesh

Modifying your navmesh properties

Setting up the pawn Blueprint

Iterative development

Make it work

Make it right

Make it fast

Do things in order

Setting up a line trace from the right motion controller

Improving our Trace Hit Result

Using navmesh data

Changing from line trace to parabolic trace

Drawing the curved path

Drawing the endpoint after all the line segments have been drawn

Teleporting the player

Creating Input Mappings

Caching our teleport destination

Executing the teleport

Allowing the player to choose their landing orientation

Mapping axis inputs

Cleaning up our Tick event

Using thumbstick input to orient the player

Creating a teleport destination indicator

Giving it a material

Adding the teleport indicator to the pawn

Optimizing and refining our teleport

Displaying UI only when teleport input is pressed

Creating a deadzone for our input

Fading out and in on teleport

Teleport locomotion summary

Seamless locomotion

Setting up inputs for seamless locomotion

Changing the pawn's parent class

Fixing the collision component

Handling movement input

Fixing movement speed

Letting the player look around without constantly steering

Implementing snap-turning

Setting up inputs for snap turning

Executing the snap turn

Going further

Snap turn using analog input

Summary

Interacting with the Virtual World - Part I

Starting a new project from existing work

Migrating Blueprints to a new project

Copying input bindings

Setting up new project to use the migrated game mode

Additional project settings for VR

Testing our migrated game mode and pawn

Adding scenery

Adding a NavMesh

Testing the map

Creating hands

Migrating hand meshes and animations from the VR Template project

Adding hand meshes to our motion controllers

Creating a new Blueprint Actor class

Adding motion controller and mesh components

Adding a Hand variable

Using a Construction Script to handle updates to the Hand variable

Adding BP_VRHand child actor components to your pawn

Fixing issues with Hand meshes

Replacing references to our old motion controller components in blueprints

Creating a function to get our hand mesh

Animating our hands

A quick word about access specifiers

Calling our grab functions from the pawn

Creating new input action mappings

Adding handlers for new action mappings

Implementing grab animations in the Hand blueprints

Creating an Animation Blueprint for the hand

Creating a blend space for our hand animations

Wiring the blend space into the animation blueprint

Connecting the animation blueprint to our hand blueprint

Creating a new enumerator for our grip

Smoothing out our grip animation

Summary

Interacting with the Virtual World - Part II

Creating an object we can pick up

Creating a Blueprint Interface for pickup objects

Implementing the Pickup and Drop functions

Setting up VRHand to pick up objects

Creating a function to find the nearest pickup object

Calling Find Nearest Pickup Object on the Tick event

Picking up an actor

Releasing an actor

Test grabbing and releasing

Fixing cube collision

Letting players know when they can pick something up

Adding haptic feedback

Creating a Haptic Feedback Effect Curve

Playing the haptic effect on command

Going further

Summary

Creating User Interfaces in VR

Getting started

Creating a new Unreal project from an existing project

We’re not alone – adding an AI character

Migrating the third-person character blueprint

Cleaning up the third-person character blueprint

Examining the animation blueprint

Creating a companion character subclass

Adding a follow behavior to our companion character

Examining the AI controller

Improving the companion's follow behavior

Adding a UI indicator to the companion pawn

Creating a UI widget using UMG

Adding a UI widget to an actor

Orienting the indicator widget to face the player

Implementing the Align UI function

Calling Align UI from the Tick event

Adding a new AI state to the companion pawn

Implementing a simple AI state

Indicating AI states using the UI indicator

Using events to update, rather than polling

Being careful of circular references

Ensuring that UI is updated when our state is changed

Adding an interactive UI

Adjusting the button colors

Adding event handlers to our buttons

Attaching the UI element to the player pawn

Using widget interaction components

Sending input through widget interaction components

Making a better pointer for our interaction component

Creating an interaction beam material

Creating an impact effect

Summary

Building the World and Optimizing for VR

Setting up the project and collecting assets

Migrating blueprints into the new project

Verifying the migrated content

Using the VR editor

Entering and exiting VR Mode

Navigating in VR Mode

Moving through the world

Teleporting through the world

Rotating the world

Scaling the world

Practicing movement

Modifying the world in VR Mode

Moving, rotating, and scaling objects

Using both controllers to rotate and scale objects

Practicing moving objects

Composing a new scene in VR Mode

Navigating the radial menu

Gizmo

Snapping

Windows

Edit

Tools

Modes

Actions and System

Making changes to our scene

Optimizing scenes for VR

Testing your current performance

Stat FPS

Determining your frame time budget

Warnings about performance profiling

Stat unit

Profiling the GPU

Stat scenerendering

Draw calls

Stat RHI

Stat memory

Optimization view modes

CPU profiling

Turning things on and off

Addressing frame rate problems

Cleaning up Blueprint Tick events

Managing skeletal animations

Merging actors

Using mesh LODs

Static mesh instancing

Nativizing Blueprints

Summary

Displaying Media in VR

Setting up the project

Playing movies in Unreal Engine

Understanding containers and codecs

Finding a video file to test with

Adding a video file to an Unreal project

Creating a File Media Source asset

Creating a Media Player

Using Media Textures

Testing your Media Player

Adding video to an object in the world

Using a media playback material

Adding sound to our media playback

Playing media

Going deeper with the playback material

Adding additional controls to our video appearance

Displaying stereo video

Displaying half of the video

Displaying a different half of the video to each eye

Displaying over/under stereo video

Displaying 360 degree spherical media in VR

Finding 360 degree video

Creating a spherical movie screen

Playing stereoscopic 360 degree video

Controlling your Media Player

Creating a Media Manager

Adding a Pause and Resume function

Assigning events to a media player

Summary

Creating a Multiplayer Experience in VR

Testing multiplayer sessions

Testing multiplayer from the editor

Understanding the client-server model

The server

Listen servers, dedicated dervers, and clients

Listen servers

Dedicated servers

Clients

Testing multiplayer VR

Setting up our own test project

Adding an environment

Creating a network Game Mode

Objects on the network

Server-only objects

Server and client objects

Server and owning client objects

Owning client only objects

Creating our network game mode

Creating a network client HUD

Creating a widget for our HUD

Adding a widget to our HUD

Network replication

Creating a replicated actor

Spawning an actor on the server only

Replicating the actor to the client

Replicating a variable

Notifying clients that a value has changed using RepNotify

Creating network-aware pawns for multiplayer

Adding a first-person pawn

Setting collision response presets

Setting up a third-person character mesh

Adjusting the third-person weapon

Replicating player actions

Using remote procedure calls to talk to the server

Using multicast RPCs to communicate to clients

Client RPCs

Reliable RPCs

Going further

Summary

Taking VR Further - Extending Unreal Engine

Creating a project to house our plugin

Installing the VRExpansion plugin

Installing using precompiled binaries

Compiling your own plugin binaries

Verifying the plugins in your project

Understanding plugins

Where plugins live

Installing plugins from the Marketplace

What's inside a plugin?

About licenses

Inside a plugin directory

Finishing our brief tour

Exploring the VRExpansion example project

Finishing our project setup

Using VRExpansion classes

Adding navigation

Adding a game mode

Updating the PlayerStart class

Adding a VR character

Setting up input

Setting up your VR character using example assets

Making effective use of example assets

Migrating the example pawn

Making sense of complicated blueprints

Begin by checking the parent class

Looking at the components to see what they're made of

Look for known events and see what happens when they run

Using inputs as a way to find a starting point in your blueprint

Setting breakpoints and tracing execution

Viewing the execution trace

Managing breakpoints with the Debug window

Using the call stack

Finding variable references

Using more of the VRExpansion plugin

Summary

Where to Go from Here

Final word

Useful Mind Hacks

Rubber-duck debugging

Just the facts

Describing your solutions in positive terms

Plan how you're going to maintain and debug your code when you write it

Favor simple solutions

Look it up before you make it up

Research and Further Reading

Unreal Engine resources

VR resources

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部