GithubHelp home page GithubHelp logo

opamp77 / blockingvr Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 4.0 12.49 MB

A basic VR level editing Interface for UE4.

Home Page: https://forums.unrealengine.com/showthread.php?95093-WIP-Editing-while-In-VR

C# 2.00% C++ 97.01% C 0.99%

blockingvr's Introduction

BlockingVR

A UE4 engine plugin that provide a blueprint interface to enable level editing while using VR Preview.
The plugin is HMD agnostic supporting any HMD that uses VR preview.
The plugin support basic level editing functionality which includes:

  • Addition and deletion of basic actor types.
  • Adjusting the transform of actors.
  • Copy and pasting actors.
  • Setting the material of StaticMeshActors.
  • Setting the basic properties of lights.

The plugin also comes with an example interface that utilizes an Xbox controller
called BVRExamplePawn.

Installation & setup

If you are not compiling UE4's engine from source you should download one of the latest precompilied windows binaries:

The contents of the plugin should be copied to your UE4 installation location.
so that the BlockingVR folder resides in the engines plugin folder.
i.e C:\UE4\Engine\Plugins\BlockingVR
Once copied over the plugin will need enabling and the engine restarting
by opening the plugin's window in UE4 and location the plugin under the "VR" subcategory.

Using BlockingVR

Important!

BlockingVR currently does'nt support level streaming or world composition.
To use BlockingVR under these circumstances the sub-level umap file you wish to work on
should be opened directly in the editor.

The BlockingVR Collection


With the plugin enabled every project with have a collection created called "BlockingVRCollection". This collection will be created at each editor startup if the collection does not already exist. Any actor, staticmesh, particle or material assets added to this collection will show up in the blockingVRExamplePawn menu's for later use when editing. To understand how collections work please see the UE4 documentation on collections.

Enable BVRExamplePawn


The BVRExamplePawn is an example interface that uses a standard Xbox controller for user input.
To enable the BVRExamplePawn simply switch your gamemode under world settings to "BVRExampleGameMode".
And then start VR preview. To disable simply switch your gamemode back.

BVRExamplePawn controls

Standard movement

  • With no menu's current showing standard movement is controlled using the XBox controllers left and right sticks.

Traversing menu's

  • The controllers left and right D-Pad are used for changing the context sesitive menu's.
  • The controllers up and down D-Pad are used for changing the menu's selection.

Changing Values

  • Left and right on the controllers Left Stick will change the current selections value.
  • When using the color picker the Left Stick will move the cursor within the color wheel.
  • When using the color picker the Right Stick up and down will alter the V value of HSV.

Setting snap size

  • With No menu's showing(or with the location context menu visible) the X button will cycle through location snap values for the movement of actors.
  • With the scale context menu showing this will cycle through scale snap values.
  • With the rotation context menu this will cycle though rotation snap values.

Delete actor

  • With no menu's showing the Y button will delete the currently highlighted actor.

Copy paste actor

  • With no menu's showing the Left Bumper will copy the currently highlighted actor.
  • With no menu's showing the Right Bumper will Paste the copied actor at the cursors current location.

Select Actor

  • With no menu's showing the A button will attempt to select the currently highlighted actor and bring up any relevent context menu's.

Deselect Actor/Exit menu's

  • The B button will Deselect the currently selected actor and/or exit current context menu's.

Spawn Actor

  • the A button will attempt to spawn an actor of current type selected from context menu at the current cursor location.

Hide/Show all handles

  • The Start button will toggle the visibility of all actor icons.

Hide/Show all debug meshes

  • The Back button will toggle the visibility of all light debug meshes.

Hide/Show dynamic lighting

  • Right Stick Click will toggle dynamic lighting on and off.

Pickup/Drop Actor

  • The Right Trigger will attempt to pickup/drop the currently highlighted actor.

ContextMenu's

####Location Menu

  • Available when selecting any selectable actor.

####Rotation Menu

  • Available when selecting any selectable actor.

####Scale Menu

  • Available when selecting any selectable non-light actor.

####Color and Intensity Menu

  • Available when any light is selected.

####Point Light Menu

  • Available when a point light is selected.

####Spot Light Menu

  • Available when a spot light is selected.

####Directional Light Menu

  • Available when a directional light is selected.

####Primatives Menu

  • Available when no actor is selected.
  • Spawn the highlighted primative at current cursor location with A Button

####Lights Menu

  • Available when no actor is selected.
  • Spawn the highlighted light at current cursor location with A Button
  • All new lights default to stationary mobility.

####Actors Menu

  • Available when no actor is selected.
  • Only visible if at least one actor has been added to the "BlockingVRCollection" collection.
  • Spawn the highlighted actor at current cursor location with A Button
  • if the actor has no collision you will not be able to delete/manipulate after.

####Static Meshes Menu

  • Available when no actor is selected.
  • Only visible if at least one static mesh has been added to the "BlockingVRCollection" collection.
  • Spawn the highlighted static mesh at current cursor location with A Button
  • if the mesh has no collision you will not be able to delete/manipulate after.

####Particles Menu

  • Available when no actor is selected.
  • Only visible if at least one particle system has been added to the "BlockingVRCollection" collection.
  • Spawn the highlighted particle system at current cursor location with A Button

####Materials Menu

  • Available when no actor is selected.
  • Only visible if at least one material has been added to the "BlockingVRCollection" collection.
  • Attempt to apply the highlighted material to the currently highlighted StaticMeshActor with A Button

Creating your own interface

BlockingVR is essentially a collection of blueprint node's which can be used with whatever form of user input you wish to use.

In the BVRExamplePawn A "BlockingVRManager" is spawned at beginplay and all API calls are done though this manager; All changes are deferred in the editor until ApplyDeferredChanges() is called.

Below is a list of blueprint nodes most of which where used in BVRExamplePawn (Which can be found in "BlockingVR Content/Example").

####User Interface:

#####CreateActorThumbnailTexture

  • Attempts to create a thumbnail for the given actor class.
  • Returns NULL if failed.

#####CreateMeshThumbnailTexture

  • Attempts to create a thumbnail for the given static mesh.
  • Returns NULL if failed.

#####CreateParticleThumbnailTexture

  • Attempts to create a thumbnail for the given particle system.
  • Returns NULL if failed.

#####CreateMaterialThumbnailTexture

  • Attempts to create a thumbnail for the given material.
  • Returns NULL if failed.

#####Collection Node's

  • Populates a TArray with a list of asset's of type currently in the "BlockingVRCollection".

####Creation, Deletion, Modification:

#####ApplyDeferredChanges

  • Should be called to apply the currently made changes to the editor world.

#####AddPIEActor

  • Adds an Actor with the specific transform.
  • Note: Actor's should have some form of collision to be modifiable.
  • Note: You should use AddPIELight(), AddPIEParticle() and AddPIEStaticMesh() for there respective types.

#####AddPIELight

  • Adds an Light at the specific location.
  • All new lights default to stationary mobility.

#####AddPIEParticle

  • Adds a particle with the specific transform.

#####AddPIEStaticMesh

  • Adds a static mesh with the specific transform.
  • Note: Meshes should have some form of collision to be modifiable.

#####DeletePIEActor

  • Use for deleting an actor regardless of type.

#####PastePIEActor

  • Creates a copy of the actor at the specific location using the original actors scale and rotation.
  • If the actor is a light then basic light properties will also be copied.
  • If the actor is a static mesh actor then the mesh along with materials will also be copied.

#####SetTransformPIEActor

  • Set new transform for the actor.

#####SetLocationPIEActor

  • Set new location for the actor.
  • With the option to snap the vector uniformly to the given snap size.

#####SetRotationPIEActor

  • Set new rotation for the actor.
  • With the option to snap the rotator uniformly to the given snap size.

#####SetScalePIEActor

  • Set new scale for the actor.
  • With the option to snap the vector uniformly to the given snap size.

#####PIESetMaterial

  • Attempts to set the material of a StaticMeshActor.

####Lighting:

#####GetPIEPointLightRadius

  • Gets the current radius of a point light (required as this is not normally availible via blueprint).

#####GetPIESpotLightRadius

  • Gets the current radius of a spot light (required as this is not normally availible via blueprint).

#####SetPIELightColor

  • Set's the linear color of a light.

#####SetPIELightIntensity

  • Set's the intensity of a light.

#####SetPIELightStaticShadows

  • Enable or disable static shadows for a light.

#####SetPIELightDynamicShadows

  • Enable or disable dynamic shadows for a light.
  • Just as with the standard editor you may not immediately see any change until a light rebuild has occurred depending on the lights mobility.

#####SetPIELightSquareFalloff

  • Enable or disable square falloff for a light.

#####SetPIELightTranslucentLighting

  • Enable or disable translucent lighting for a light.

#####SetPIEPointLightRadius

  • Sets the radius for a point light.

#####SetPIESpotLightRadius

  • Sets the radius for a spot light.

#####SetPIESpotLightOuterCone

  • Sets the outer cone angle for a spot light.

#####SetPIESpotLightInnerCone

  • Sets the inner cone angle for a spot light.

blockingvr's People

Contributors

opamp77 avatar

Stargazers

Rob Eastham avatar Jan Kaniewski avatar

Watchers

Jan Kaniewski avatar James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.