Unreal Studio Project Template Product Viewer What is the Product Viewer project template? This is a project template which grants the ability to use Unreal as a design review tool, allowing you to see models in VR, AR, or on a PC screen and perform basic viewing interactions. All the necessary logic is pre-built as Blueprints and exposed to our users for learning purposes and customization. Short version 1. Create a new project with the Product Viewer template 2. Add / Import Data in Level a. Make sure the imported data has a parent node object (hierarchy) - Datasmith will create this hierarchy for you 3. Setup a list of objects to interact with 4. Define navigation modes (orbit vs fly) 5. Setup a list of objects to support VR teleportation 6. Play in a New Editor Window read through the entire document for detailed explanations... Detailed instructions Create a new project with the Product Viewer template A. Launch the Unreal Editor (with Datasmith installed) and Choose New Project B. Choose Unreal Studio C. Select the Product Viewer template D. Choose the file location, name your project, and create it Unreal Studio Project Template - Product Viewer 1
Add / Import data in level The project template will work with imported data that is set up in a hierarchy. It is required that at least one parent actor exists in your model. When importing models with Datasmith, this parent actor is already created for you: Setup a list of objects to interact with This is where we connect the logic built in the template with your model. A play time, the ProductViewerTools will traverse the hierarchy and setup everything needed to let you pick objects, zoom, tear off parts (in VR) etc. For this, you need to identify the root actor of your imported data: A. Find the ProductViewerTools actor in the World Outliner. B. In the Details Panel :: Product Viewer rollout locate the Interactive Root item C. Add your model s root actor by picking the drop down menu or using the eyedropper tool. Unreal Studio Project Template - Product Viewer 2
Set the navigation mode The template has built-in navigation modes designed to support two (2) typical use cases: OrbitMode : to easily inspect mechanical models, industrial or commercial products (vehicles, toys, furniture etc.) FlyingMode : to inspect architectural models, landscape, cities etc. The No Collision option will let you fly through obstacles (through walls and buildings). Setup objects to moveable to be able to interact with them in VR See below for details Setup a list of objects to support VR teleportation Similarly to the Interactive Root setup above, the project template needs a list of objects to be used for teleportation in VR. This will essentially define proper collision meshes and logic required to be detected as valid objects to be teleported onto. Typically, you will want to list important objects used for navigation such as floors, terrains, streets, sidewalks etc. Set the default starting position The PlayerStart actor defines the starting position and orientation of your Camera or User when you start the project (play): Unreal Studio Project Template - Product Viewer 3
Vintage Harley-Davidson modeling by Amir Glinik - Industrial & Art www.3d-files.co.il Playback caveats Play in a New Editor Window vs other Play Modes This template is built to handle both Desktop and VR interactions. It is also built to deliver a cooked game that shows a welcome screen with the ability to automatically detect if the PC that is used has proper VR headsets hooked up (or not): This Welcome Screen is useful to add your own company logo and create a more pleasing experience once your project is compiled. However, the ability to handle both Desktop and VR via a welcome screen conflicts with the Play in Selected Viewport and VR Preview playback modes of the Unreal Engine editor so you ll have to handle this manually while you work in the editor : To test your project on the Desktop: Make sure Spawn VR Play Editor option in the VR rollout is OFF. This will force Unreal to use the interaction tools designed for the desktop (mouse + keyboard) during in-editor playback: To test your project in VR: Alternatively, you might want to play in VR Preview while you are working on your project. Enable the Spawn VR Play Editor option in the VR rollout. This will force Unreal to use the VR controls during in-editor playback: Note: Don t forget to t urn this OFF before cooking your game, otherwise the resulting package will not work as you expect it! Unreal Studio Project Template - Product Viewer 4
Additional tips MouseInteractManager The MouseInteractManager Blueprint controls the camera orbit speed and a few other aspects. For instance, you can increase or reduce the Camera Orbit speed by changing the Swipe_Scale default value as follow: Unreal Studio Project Template - Product Viewer 5
Interacting with multiple models You are not limited to use a single root actor for navigation and teleport. You can add more than one root object to the ProductViewerTools object. This will allow you to interact (pick, zoom to etc.) with everything you want without having to rethink how your model hierarchy is structured. This also means that you can exclude some objects from being interacted with (ex: your company logo maybe or something along those lines) (root actors of two models) Unreal Studio Project Template - Product Viewer 6
How does it works at runtime? Welcome screen When cooking a game, you never know if your audience will have a VR headset or not of if they want to use it. We give the user s choice between Desktop or VR at that startup of the project: Desktop / OrbitMode: This is designed to let you quickly set focus on individual parts. When you click on an object, a small blue dot appears, defining the focus point used to center the view and rotate the camera: Left Button Click: set focus point Left Button Drag: orbit around focus point Mouse Wheel: zoom in / out Right Button Drag: pan camera Desktop / FlyingMode: Typical Game Style fly mode where you point where you want to look at and move with the keyboard arrows or WASD keys. Unreal Studio Project Template - Product Viewer 7
VR In VR, the Navigation Mode is irrelevant. We instead use teleportation and a few other features: Teleportation: With the left joystick button, clicking and aiming the joystick will let you teleport yourself: Viewing scale: With the Left Trigger you should see a scale slider appearing. While this is shown, use the right hand trigger to grab the scale widget up or down. This will change how big or small you are. Movable objects: Actors marked as movable will be able to be moved in VR with the right hand controller (right trigger to pick and grab). The right hand grip button will reset all objects to their original position. Unreal Studio Project Template - Product Viewer 8
Xray / See-thru: To see through parts, use the right hand upper button to turn them as a Xray material. The right hand lower button will reset the object state and revert it to its original material: Unreal Studio Project Template - Product Viewer 9