DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are...

52
DOCUMENTATION 03/02/2020 1

Transcript of DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are...

Page 1: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

D O C U M E N TAT I O N

03/02/20201

Page 2: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

T A B L E O F C O N T E N T S

O V E R V I E W

2

I N S T A L L A T I O N

U N I T Y 3 D B A S I C S

G E T T I N G S T A R T E D

D E P L O Y M E N T

V R M E N U

I M P O R T I N G C A D M O D E L S

I M P O R T I N G P O I N T C L O U D S

X D E P H Y S I C S E N G I N E

T E X T U R E L I B R A R Y

M O T I O N C A P T U R E A N D E R G O N O M I C S

I N T E R A C T / S U P P O R T E D F O R M A T S

I N T E R A C T / U N I T Y V E R S I O N S C O M P A T I B I L I T Y

Page 3: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

O V E R V I E W

INTERACT is a powerful platform used for visualizing and interacting with your 3D CAD models in VirtualReality. The solution is based on the well-known game engine Unity3D. It is therefore open, allowing you todevelop your own scripts to customize the solution for your own need.

INTERACT combines 2 core technologies

Use the power of PiXYZ Software to import, tessellate and optimize your native CAD files into Unity. PiXYZ is the leading solution for preparing CAD data and maximizing visualization performance.

XDE Physics is an interactive physics engine, featuring precise collision detection,multibody dynamics and many more features. XDE allows to animate complex scenewith accurate and realistic simulation of dynamic effects, both at rate compatiblewith VR rendering.

3

Page 4: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Examples of simulations built with INTERACT SDK *

Features

• Import native CAD files (Solidworks, CATIA, , 3DXML, IGES, STEP)• Import 3D scans (point clouds)• Scale 1:1 visualization (compatible with HTC Vive, Oculus Rift, Hololens, CAVEs)• Embedded physics engine (multi-body dynamics, collision detection, friction, kinematics)• Natural interaction (directly manipulate your 3D objects with your own hands)• Multi-user and multi-site collaboration• Real time ergonomic assessment

Collaborative simulation of production scenario Point cloud visualization and interaction Ergonomics assessment

4

O V E R V I E W

Page 5: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

I N S T A L L A T I O N

Requirements

• Make sure your computer is VR ready (appropriate graphics card)• Install the latest version of SteamVR

• Install Unity3D: please make sure you use a compatible version of Unity• for INTERACT 18.12 : Unity 2017.3 to 2018.2• for INTERACT 19.06 : Unity 2018.3 to 2019.1• for INTERACT 20.01 : Unity 2019.3.0f6

• If you want to interact in VR using your own hands and have purchased aLeapMotion sensor, install the latest LeapMotion SDK

Installing INTERACT in your Unity project

• INTERACT is distributed as a Unity3D package.

• The installation of INTERACT packages in a new unity project simply consists inimporting the *.unitypackage in the project.

• You can do it by dragging and dropping the unitypackage in the 'Project' tab, orvia the menu :

5

Page 6: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Installing a license

INTERACT license can be activated from 2 methods : Standalone and FloatingIf you want to install a floating server, please contact us at [email protected].

For standalone license, we send you a product key1. Once you receive your key, you can go in License Manager and click “Install License”2. Click on “Standalone”3. Enter your product key and click on “Online”4. Congratulations ! You can now enjoy INTERACT and start building amazing simulations

If your connection does not allow you to check your license. You need to check it Offline.

6

I N S T A L L A T I O N

Page 7: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Validating a license

If your license can’t be checked online, follow these steps for offline activation :• In the INTERACT menu, open the License Manager• Click on Standalone• Enter your product key• Click on Offline then click on Request license (1)• This will generate a license file request, send this file to [email protected]

• Once we validate your license, we will send you the signed file• Follow these steps again• This time click on Install license after the Offline button (2)

1) 2)7

I N S T A L L A T I O N

Page 8: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

U N I T Y 3 D B A S I C S

1

1. SceneWhere the game is constructed

2. HierarchyA list of GameObjects in the scene

3. InspectorSettings and components for currentlyselected asset/object

4. GameThe preview window (first person),active only in play mode

5. ProjectA list of your project's assets, acts as alibrary

6. ConsoleShows messages, warning and errors

2

3

4

5 6

Interface

8

Page 9: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

G E T T I N G S T A R T E D

Creating a simulation

To create a new simulation• Make sure that you start from an empty Unity scene (File / New scene)• Then click on INTERACT > Create New Simulation

9

• You can choose between three preconfiguredenvironment (White Lab, Factory, or City).

Page 10: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

10

G E T T I N G S T A R T E D

Creating a simulation

• Select your setup (Display Device, Hand Tracking, Body Tracking). In this step, you can configure your hardware combination for any VR or ARexperience.

Page 11: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

11

G E T T I N G S T A R T E D

Creating a simulation

Now look at the 'Hierarchy' tab, 3 objects have been created :

• [PhysicsManager] is the object managing the physics simulation (linked with the physicsserver). Its properties should not be modified unless you are an advanced user.

• [Player_1] is the object managing the VR camera and controllers, the Leap Motiondevice and the avatar. You can modify its position in the scene (your initial position inVR when the simulation is launched) by clicking on it and changing its coordinates(position and rotation) in the 'Inspector' tab.

• WhiteLab is the default environment. You can delete it if you want to replace it with anenvironment of your own.

Page 12: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

12

G E T T I N G S T A R T E D

Playing the simulation

INTERACT allows to quickly switch from your working session to the VR simulation. To do so :

• In the Unity toolbar, click on the Play button

• Put on your headset, you should now visualize the environment at scale 1:1.

If you have a LeapMotion device, place your hands in front of you and they should appear.

Troubleshooting

If playing the simulation does not work on your computer

• Make sure your VR device is connected and powered on

• Launch Steam VR application and make sure the HMD is active and tracked

• Check that your hands are correctly detected by launching the LeapMotionVisualiseur (Right click on the LeapMotion Icon in the task bar)

Page 13: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

D E P L O Y M E N T

Building and Deploying your application

If you want to deploy your application, you can build an executable of your simulation.

To do so :• Save your current Unity scene (CTRL+S)• In the INTERACT menu, click on Build Executable• Select the target folder (where the executable will be built)• The executable file of your application has been generated in the target folder (InteractBuild.exe)• If you need to distribute your application, do not forget to send the InteractBuild_Data folder along with the

executable file.

In the next chapters, we will learn how to play around with the various INTERACT features available in VR.

13

Page 14: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

V R M E N U

VR MENU

In the simulation, the VR Menu is accessible from the controller’s grip button or by touching your palm with your index (LeapMotion). The VR Menu

contains useful VR tools. All features are compatible with HMD controllers (buttons) or LeapMotion (gesture detection).

14

Page 15: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

VR MENU

The VR menu is divided into four sections :

Settings

• Calibrate Avatar : measures the user’s height and calibrates the 3D avatar

accordingly

• Statistics- Show FPS stats : shows FPS (frames per seconds) graph in VR

(useful for analytics)

• Timer : Display a timer above your head

15

V R M E N U

Page 16: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Visualization

• Teleporter : teleports the avatar to the targeted destination

• Selector : selects a part with the laser and validate the selection. This opens

a contextual Menu.

• Show all - Show hidden parts : displays all previously hidden parts

• Cross Section : instantiates a cutting plane attached to the controller that

creates a cross section (Xray mode)

ToolBox

• Screenshot : takes pictures in VR (all screenshots are stored in the

‘Screenshots’ folder)

• Notes - Annotations : opens a virtual keyboard and allows typing VR Post-Its

(all notes are stored in the ‘Notes’ folder)

• Measure - 3D measuring tool : measures the distance between two points in

space

• Timer : starts a stopwatch.

VR MENU

16

V R M E N U

Page 17: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Contextual Menu

• Navigate in the Part tree (select up and down)

• Explode part : explodes an assembly for better visualization

• Hide Part

• Manipulate : Grabs the part with the controller or your hands

VR MENU

17

V R M E N U

Page 18: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Teleporter Measuring tool Annotations

VR MENU

18

V R M E N U

Page 19: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Cross Section

Explode Assembly

Manipulate part

VR MENU

19

V R M E N U

Page 20: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Importing CAD models

Importing your CAD files into Unity3D is very easy. Indeed, INTERACT embeds PiXYZ, apowerful CAD optimizer solution to prepare and import native CAD files into Unity3D.

Supported CAD files formats are :

• Solidworks (.sldprt, .sldasm)• Catia V5, V6 (.CatPart, .CatProduct, .3dxml)• Siemens (.jt)• AutoCAD 3D (.dwg)• Rhino3D (. 3dmbak)• SketchUp (.skp)• IGES (.igs)• STEP (.stp)• STL (.stl)• OBJ (.obj)• FBX (.fbx)

Go to "Supported formats"

20

I M P O R T I N G C A D M O D E L S

Page 21: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Importing CAD models

Importing your CAD files into Unity3D is very easy. Indeed, INTERACT embeds PiXYZ, apowerful CAD optimizer solution to prepare and import native CAD files into Unity3D.

To import your 3D CAD models into Unity3D• Click on the INTERACT > Import > CAD model• In the explorer, select your CAD file and click on Import• The PiXYZ CAD Import Settings window appears. From there, you can adjust the default

import settings if needed.

21

I M P O R T I N G C A D M O D E L S

Page 22: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Import parameters

The settings used to import a 3D model will impact the performance of your simulation. There is no set of preferences that will work every time, asevery use-case is different, with varying input data.

The default settings proposed are representative of a simple CAD model import scenario. They are to be used as guidelines for beginners but aremeant to be adjusted to user’s requirements.

• Import :

• Import Metadata :

Import metadata contained in the original model (if any), which is a piece ofinformation that can be carried by any node of a CAD model’s hierarchy, that can carryinformation such as part numbers, ownership, physical properties, part type

• Import Patch Boundaries :

Import patch boundaries as lines. Only works if model is a CAD model (hasBReps).

• Import Lines :

Import lines such as laser marking. Only works if model has lines.

22

I M P O R T I N G C A D M O D E L S

Page 23: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Import parameters

The settings used to import a 3D model will impact the performance of your simulation. There is no set of preferences that will work every time, asevery use-case is different, with varying input data.

The default settings proposed are representative of a simple CAD model import scenario. They are to be used as guidelines for beginners but aremeant to be adjusted to user’s requirements.

• Transforms

Use the Transforms settings to adapt the imported model’s units/transformation to Unity3Dunits/coordinate system (meter as its default unit, left-handed coordinate system with Y as the Up axis).

• Scale : sets the scale of the imported model.

• Left handed : use this setting to mirror a model from a right-handed coordinate system to a left-handed one.

• Z-up : use this setting to rotate the model from Z-up to Y-up.

• Merge Final Level : use this setting to assemble together unconnected CAD surfaces prior to anydata treatment at import (it is a pre-process).

• Sometimes, surfaces contained in a file inherited from CAD software are delivered as multiplesub-surfaces disconnected from one another, where they should be unified as a single surface.

• If they are not connected together prior to mesh creation by PiXYZ, the resulting mesh will bedelivered as multiple sub-meshes, and might show gaps where there is supposed to becontinuity.

23

I M P O R T I N G C A D M O D E L S

Page 24: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Import parameters

The settings used to import a 3D model will impact the performance of your simulation. There is no set of preferences that will work every time, asevery use-case is different, with varying input data.

The default settings proposed are representative of a simple CAD model import scenario. They are to be used as guidelines for beginners but aremeant to be adjusted to user’s requirements.

• Transforms : Hierarchy

Choose one of the proposed mode to optimize the imported model’s hierarchy or (productstructure)

• None : no modification of the hierarchy.

• Clean-up intermediary nodes : Compresses the hierarchy by removing empty nodesor any node containing only on sub-node.

• Clean-up all objects under root: Simplifies the hierarchy by transferring all imported3D objects under the root node of the imported model.

• Merge all objects: All objects contained in the original model will be mergedtogether, as one single object.

• Merge all objects by material: All objects contained in the original model that sharethe same material will be merged together.

24

I M P O R T I N G C A D M O D E L S

Page 25: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Import parameters

The settings used to import a 3D model will impact the performance of your simulation. There is no set of preferences that will work every time, asevery use-case is different, with varying input data.

The default settings proposed are representative of a simple CAD model import scenario. They are to be used as guidelines for beginners but aremeant to be adjusted to user’s requirements.

• Geometry

• Use 16Bit buffers: Use this setting if you wish to create meshes limited to 65kvertices. Meshes will be created with a 16 bit index buffer (32 bit by default).Consider using this setting if you wish to publish the model on a platform withlimited power.

• Re-orient Faces: Use this setting for PiXYZ to perform a unification of alltriangles/faces orientation.

• Caution: Do not use this setting if the imported model is a mesh (tessellatedgeometry) and is already correctly oriented.

• Singularize Symmetries: Some file format may use symmetries to avoid duplicatingmeshes. If the setting is set to false, symmetries with be handled with a single meshand matrices with negative scales, which can be problematic in some cases, such asfor lightmapping with Unity. By checking this setting, such matrices will be kept withpositive scales and symmetries will be splitted in two mirrored meshes.

25

I M P O R T I N G C A D M O D E L S

Page 26: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Import parameters

The settings used to import a 3D model will impact the performance of your simulation. There is no set of preferences that will work every time, asevery use-case is different, with varying input data.

The default settings proposed are representative of a simple CAD model import scenario. They are to be used as guidelines for beginners but aremeant to be adjusted to user’s requirements.

• Geometry

• Create LODs: If checked, LODs will be generated during the import process. LODs aregenerated by decimating meshes if the input model is already meshed, or by usingdifferent tessellation parameters if the input model is represented with BREPs. Formore details, please check LODs Generation and Mesh Quality.

• Once the "Create LODs" checkbox is enabled, the Group box is renamed "LODsMode". From that point, the user can add multiple LODs and define a Mesh Qualitypreset for each added LOD. (Right-click for adding new LOD)

• Mesh Quality: This settings drives the quality of the imported model (when notcreating LODs), by either decimating or tessellating wih various quality presets.Please check Mesh Quality for more information.

• LODs Mode :

• Root Mode : The LOD Group is placed on the root node of the imported model.Use this setting if you wish to control the global visibility of the entire importedmodel at once

• Leaves Mode (default mode): The LOD Group is placed on the parent-node ofeach mesh (or object) existing in the hierarchy. Use this setting if you wish to controlthe visibility of each sub-part of the imported model.

26

I M P O R T I N G C A D M O D E L S

Page 27: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Import parameters

The settings used to import a 3D model will impact the performance of your simulation. There is no set of preferences that will work every time, asevery use-case is different, with varying input data.

The default settings proposed are representative of a simple CAD model import scenario. They are to be used as guidelines for beginners but aremeant to be adjusted to user’s requirements.

• Rendering :

• Create CH. 0UVs : Use this setting to add a new primary UV set (channel #0). Set thesize of the projection box used to create UVs.

• Caution: PiXYZ will override the existing UV set, do not use this setting if you wish topreserve the UVs embedded in the imported model (tessellated model).

• Generate Lightmaps UVs: Use this setting to create automatically optimized UVs onchannel uv1 for your lightmaps.

• Use Materials in Resources: By default, the plugin imports the CAD models andcreates a new Unity Material for each material in the file. Use this setting toautomatically detect (name based) and use existing Materials in any "Resources"folder of the project.

• Override Shader:

• If left unset, the plugin will pick the current Render Pipeline default shader to buildthe Materials from the imported Model. If no Scriptable Render Pipeline is used, thatmeans that the Standard shader will be used. On the other hand, if HDRP is used forinstance, it will use the HDRP default shader.

• If set, then the plugin will always use the given shader to build the Materials from theimported Model.

27

I M P O R T I N G C A D M O D E L S

Page 28: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Importing CAD models

In the import menu that appears, select the file you want to import. You can then set the import parameters (concerning tessellation, coordinatesystem, product tree). This menu is reserved for advanced users. in most cases, it is suggested that you leave the default parameters.

• Level of Details (LOD)

When an object in the scene is a far away from the camera, the amount of detailsthat can be seen on it is greatly reduced. However, the same number of triangleswill be used to render the object, even though the detail will not be noticed. Anoptimization technique called Level Of Detail (LOD) rendering allows you to reducethe number of triangles rendered for an object as its distance from cameraincreases.

LOD will reduce the load on the hardware and improve rendering performance.

In the import window, you can configure each LOD independently.

LOD0 = Very-High preset 100% to 70%

LOD1 = Poor preset 70% to 20%

Culled (Hidden)Under 7%

Select the mesh quality preset for each LOD and adjust thevisibility percentage. The percentage value represents themaximum visible proportion of a part/model when thecamera is moving forward/backward before switching to thefollowing LOD available, until disappearing (cullingpercentage).

Check the Create LODs function to enable LODs.

28

I M P O R T I N G C A D M O D E L S

Page 29: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Import parameters

In the import menu that appears, select the file you want to import. You can then set the import parameters (concerning tessellation, coordinatesystem, product tree). This menu is reserved for advanced users. in most cases, it is suggested that you leave the default parameters.

After setting the parameters, click on 'Import'.The CAD model will be tessellated or decimated andimported as a prefab in the folder '3DModels'.

An instance of the prefab has also been imported in thehierarchy. You can modify the position/orientation ofthe object in the scene by dragging the arrows of themodel or modifying the 'Transform' property in the'Inspector' tab.

29

I M P O R T I N G C A D M O D E L S

Page 30: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Cleaning CAD models

If you encounter performance issues while playing your simulation (low refresh rate), it may be because your 3D models include too many parts. Evensmall parts (ex. screws), in a significant number, can have a huge impact on performance requirement. Cleaning your CAD models is therefore a goodway to get better performance.

• Merge Parts

This function combines several meshes in one single object. (Hold CTRL for selecting multipleobjects)

Merge by color: All objects that share the same color will be merged together.

Merge by name: You can merge objects according to a specific name tag.

Ex: Combining the 4 screws in one object

30

I M P O R T I N G C A D M O D E L S

Page 31: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Cleaning CAD models

If you encounter performance issues while playing your simulation (low refresh rate), it may be because your 3D models include too many parts. Evensmall parts (ex. screws), in a significant number, can have a huge impact on performance requirement. Cleaning your CAD models is therefore a goodway to get better performance.

• Remove Parts

Allows to remove parts with a number of polygons lower or higher than a threshold

Ex: Removing parts with less than 1000 triangles (screws, bolts and bearing)

31

I M P O R T I N G C A D M O D E L S

Page 32: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

I M P O R T I N G P O I N T C L O U D S

Importing Point Clouds

Importing Point Cloud is really easy with INTERACT.Supported Point Cloud files formats are :

• E57 (.e57)• PTS / PTX (.pts, .ptx)• LAS (.las)

NB : Sample point cloud data can be found here : http://www.libe57.org/data.html

Our method encodes the point cloud file to a database (.db) file on the computer (inAssets/3DPointClouds). In Unity, the OctoPCLTreeServer component then streamsdynamically the most relevant points according to the player’s position and thepoint budget.The creation of the database file can take up to several hours.

32

Page 33: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Importing Point Clouds

• Point cloud appearance : 3 different visualization mode are available (points rendered aspoints, splat or cones)

• Point budget : maximum number of points that are to displayed per frame. If youencounter frame rate issues, point budget should be decreased.

• Point budget Mem: number of persistent points loaded in RAM (Point budget Mem shouldbe slightly greater that Point budget).

• Center Origin: if your point cloud is not visible, it is probably that its origin is too far away.This button will recenter it.

Point budget Mem adjusts the cache size that allows preloading points in the vicinity of thefield of view (avoid points poping up in the scene).

Once you have converted your point cloud, you can re-use the database it in anotherproject or scene.For this, you just have to right-click on your hierarchy windows, INTERACT > PointCloud > Import existing database. Then, selected the database you want to use.

NB : For better point cloud visualization performance, it is advised to disable the Dynamic Batching (in Edit > Project settings > Player)

NB : Sample point cloud data can be found here : http://www.libe57.org/data.html33

I M P O R T I N G P O I N T C L O U D S

Page 34: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Editing Point Clouds

INTERACT provides a set of basic tools for manually editing and rendering 3D points clouds.

• Cropping and removing points

Instantiates a sizable box providing cropping and removing features. Select one cloud by dragging itinto the ‘point cloud’ field in the inspector of PointCloudTool.

Crop: will create a new point cloud (subset of the original one) with the points contained inside the box

Remove: will remove the points inside the box from the original point cloud

Original file

REMOVE CROP

NB : Once you are finished with editing point clouds, use the function 'Clean Database' to reorganize and clean the point cloud database file.34

I M P O R T I N G P O I N T C L O U D S

Page 35: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

X D E P H Y S I C S E N G I N E

XDE Physics Engine

XDE Physics is an interactive physics engine, featuring precise collision detection, multibody and beam dynamics. Possible example of use are assemblyverification, object manipulation and so on. XDE is written in C++ and has been optimized to provide maximal efficiency. It runs as a process separate fromUnity3D and overrides the position and velocities of objects in the scene according to their realistic physical behavior.

XDE allows to animate complex scene with multiple rigid bodies interconnected with mechanical joints very efficiently. XDE Physics offers precise collisionhandling as well as very accurate simulation of dynamic effects, both at rate compatible with haptic rendering.

35

Page 36: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

XDE Physics Engine

XDE Physics simulates the dynamics and kinematics of so called rigid bodies.

To ‘physicalize’ a 3D object in Unity3D means creating a ‘RigidBody’ component attached to the object along withmesh colliders.

To do so, select an object and click on Physicalize in the INTERACT menu.

In the pop-up menu, you can configure :

• LOD Level : the Level of Detail used for collision (if the part has been imported with LODs). Selecting LOD0 wouldgive a very fine but resource consuming collision detection (close to the actual mesh) while selecting a higherLOD would make the collision detection less precise but more efficient.

• Joint Type is used to configure the kinematic joint

• Free : the part is free to move in the 6 degrees of freedom

• Fixed : the part is fixed in the world or attached to another part

• Hinge : a pivot type articulation (1 rotation allowed)

• Prismatic : a prismatic type articulation (1 translation allowed)

• Ball : a ball joint type (3 rotations allowed)

• Weldable : hybrid free/fixed joint. The part is free to move and can be welded to another RigidBody

36

X D E P H Y S I C S E N G I N E

Page 37: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

XDE Physics Engine

When you physicalize an object, INTERACT automatically creates 3 components :

• Rigid Body : attached to the parent object, defines the physical properties of the object(mass, inertia, collision)

• Joint : also attached to the parent object, describes the way rigid bodies move withrespect to each other

• Mesh colliders : attached to each mesh contained in the parent object, defines the shapeof an object for the purposes of physical collisions.

Configuring Joints

Joint are the objects that describe the way rigid bodies move with respect from each other.(ex : the wheel of a car is attached to the car frame by a hinge joint, they can only rotatearound a specific axis). A multi-body system is thus composed a several objects connected byjoints forming a kinematic chain.

At anytime, the kinematic chain can be seen from the INTERACT Menu by clicking on ShowKinematic graph.

37

X D E P H Y S I C S E N G I N E

Page 38: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Configuring Joints

XDE provides 4 types of joints :

• Fixed JointA fixed joint constraints all degrees of freedom with respect to the parent object.In the Unity inspector, a fixed joint has only one parameter : the object to which the selected object is attached to. If there is no parent object, the objectis fixed with respect to the world.

NB : the field “Parent Body” of the Free Joint is for advanced users and should not be used. 38

X D E P H Y S I C S E N G I N E

• Free Joint

A free joint moves freely in the six degrees of freedom (can freely rotate and translate). If gravity is enabled, the object will be in free fall.

Page 39: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

39

X D E P H Y S I C S E N G I N E

Configuring Joints

XDE provides 4 types of joints :

•Hinge JointA hinge joint allows only one rotation with respect to a specific axis.

•Parent Body : the preceding body in the kinematic chain•Configuration Transform : the frame in which the axis and center of the joint isexpressed (usually the object itself)•Axis : the axis of the joint (can be a combination of axis)•Initial Position : the position of the joint at the beginning of the simulation•Min/Max limit : to configure joint limits•Damping : add physical damping in the joint

•Friction : add dry friction in the joint

Page 40: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Configuring Joints

XDE provides 4 types of joints :

• Prismatic JointA prismatic joint allows only one translation with respect to a specific axis.

• Parent Body : the preceding body in the kinematic chain• Configuration Transform : the frame in which the axis and center of the joint is expressed

(usually the object itself)• Axis : the axis of the joint (can be a combination of axis)• Initial Position : the position of the joint at the beginning of the simulation• Min/Max limit : to configure joint limits• Damping : add physical damping in the joint• Friction : add dry friction in the joint

40

X D E P H Y S I C S E N G I N E

Page 41: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Configuring Rigid Bodies

If needed, in the inspector, you can configure the properties of the rigid body

• Has weight: defines whether of not the object is affected by gravity

• Mass : the mass of the object in kg

• Overwrite COG : by default, the center of gravity of the object is located at its center.

This can be changed with this property

• Custom Moment of Inertia: to manually define the matrix of inertia

41

X D E P H Y S I C S E N G I N E

Page 42: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Configuring Collisions

One of the key feature of XDE Physics Engine lies in its precise collision detection.

Using and configuring collision detection is really easy, you just have to tell XDE how group of objects behave when collision occurs.

In XDE, the notion of ‘Group of objects’ is called ‘Layers’. (ex : the Layer ‘Robots’ contains all the objects of type Robot in the scene). It is important tocarefully define your layers in order to optimize the collision detection.

To assign a RigidBody to a particular layer, click on Add Layer, then Add. Select the layer you want in the dropdown list.

If you want to define a new layer, click on Edit Layers, then Add Layer. This will open the Contact Layer Manager.

NB : You can also access the Contact Layer Manager from the INTERACT Menu (Show Contact Layers) 42

X D E P H Y S I C S E N G I N E

Page 43: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Configuring Collisions

The Contact Layer Manager allows you to define the possible interactions between Layers. It is presented in the form of a matrix. If you click at theintersection of 2 Layers (Rows and Columns), you can select between three types of interaction :

• None (empty square) : no collision will be monitored between these 2 layers• Collision ( C ) : the collision detection will be activated. If the checkbox at the right of the square is checked, red arrows will be displayed at the

location of collision points (see illustration below)

• Interference ( I ) : the two objects will be allowed to penetrate each other but the interference will be monitored. If the checkbox at the right of thesquare is checked, objects will be colored yellow if inference occurs. (see illustration below)

NB : The size of contact arrows can be configured in the [PhysicsManager] under XdeArrowDisplay

Ex: Collision between a capsule and a cube Ex: Interference between a capsule and a cube

43

X D E P H Y S I C S E N G I N E

Page 44: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Configuring materials

XDE provides various friction models to help you add more physical realism to your simulation.

To configure a friction model between 2 object, you need to assign a material to each object and configure the friction model between the 2 materials.

• In the Material field of the RigidBody, assign an existing material or create a new one with Edit > New Material

• To configure the friction model between 2 materials, click at the intersection of the 2 material in the friction matrix

• Then select a friction model (Signorini, Coulomb, Coulomb Contensou)

44

X D E P H Y S I C S E N G I N E

Page 45: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Configuring materials

• The Signorini law is in fact not a friction law, but a contact law. This law ensures that when two objects are incontact, the minimal distance between the two object is null, and there is a strictly positive contact force.On the opposite, when there is no contact, the contact force must be null and the minimal distance betweenthe two object is strictly positive. With this law, there is no tangent force, hence no friction.

• The Coulomb law states that when a contact occurs, the tangential force norm must be included in a diskwhose radius is mu * n, where n is the contact force normal value, and mu the friction coefficient. When thetangential forces lies inside the disk, there is no slipping, whereas when the tangential force is on the circleedge, the contact is slipping, and this slipping occurs in the opposite direction of the tangential force. This isthe most frequently used law to model friction.

• The Coulomb Contensou law is an extension of the Coulomb law to rotational friction. Indeed, with thecoulomb law, no friction occurs when an object is rotated around a contact points. This means that if yougrab an object with two material points using Coulomb friction, you won’t be able to control the objectorientation around the axis formed by the two contact points. The object will freely rotate around this axis.

45

X D E P H Y S I C S E N G I N E

Page 46: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

TRACKING DEVICES

If you wish to manipulate a 3D object with a device, you can do so from the INTERACT Menu (Add Tracking Devices).

NB : For ART and OptiTrack tracking, the proper software (resp. Dtrack and Motive) needs to run in background to stream the body position

In the pop-up menu, you can configure :

• The device (ART Body, OptiTrack Body, Space Mouse, Vive Tracker)• The 3D object that will be attached to the device

46

X D E P H Y S I C S E N G I N E

Page 47: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

INDUSTRIAL LIBRARY

INTERACT comes up with a collection of prefabricated components commonly used in industry simulations. These components can be imported from theINTERACT Menu.

• Industrial Robots

• Safety components (light curtains, safety lasers)

• Production components (conveyor, operator panels)

47

X D E P H Y S I C S E N G I N E

Page 48: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

T E X T U R E L I B R A R Y

TEXTURE LIBRARY

You can also find a collection of textures and predefined material that can be useful to make your simulations more realistic.

These materials can be found in the project window

In the next chapter, we will learn how to add physics behavior to your 3D objects. 48

Page 49: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

M O T I O N C A P T U R E A N D E R G O N O M I C S

HARDWARE SETUP

Light&Shadows has created a tracking suit based on the Vive trackers. It can be used for various applicationssuch as body tracking or ergonomics assessment.

The suit consists of 5 devices placed on both arms, legs and around the belt.

To use the suit

• Plug in the USB hub with the 5 dongles

• Wear the suit as shown and pay attention to the labels of each device

• The arm trackers should face backward and be placer 5cm below the elbow• The leg trackers should face backward and be placer 5cm below the knee

• Switch on the trackers in that specific order :• Right Arm• Left Arm• Right Leg• Left Leg• Belt

• Switch on both Vive controllers• Make sure SteamVR successfully recognizes the trackers

NB : all tracker LEDs should be green. If not, right click on SteamVR icon, then Device > Pair Controller and press the Vive Tracker buttons until the LED stops blinking.49

Page 50: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Using the suit in INTERACT

Using the suit in INTERACT is quite easy.

• When creating a scene, select LS SUIT in the list of options

• This will create an avatar in T-Pose in the scene

50

M O T I O N C A P T U R E A N D E R G O N O M I C S

Page 51: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

Using the suit in INTERACT

When you first launch the simulation

• Follow the calibration instructions

• Face towards the panel

• Stand in T-Pose

• Press the controller trigger

• Wait for the instructions to disappear

• If the procedure is successful, your avatar should move accordingto your body movements

If you change user while running the application or want torecalibrate the manikin, you can do so via the INTERACT VR Menu :

• Select Settings / Calibrate Avatar

51

M O T I O N C A P T U R E A N D E R G O N O M I C S

Page 52: DOCUMENTATION - light-and-shadows.com · • Screenshot : takes pictures in VR (all screenshots are stored in the ‘Screenshots’folder) • Notes - Annotations : opens a virtual

I N T E R A C T / S U P P O R T E D F O R M A T S

CAD / 3D formats :

.3dm

.3ds

.3dxml

.asm

.CATPart

.CATProduct

.CATShape

.cgr

.csb

.dae

.dwg

.dxf

.fbx

.ifc

.iges

.igs

.jt

.neu

.neu*

.obj

.p_t

.par

.pdf

.plmxml

.prc

.prt

.prt*

.psm

.pwd

.sab

.sat

.skp

.sldasm

.sldprt

.step

.stepz

.stl

.stp

.u3d

.vda

.vrml

.wrl

.wire

.x_b

.x_t

.xas

.xas*

.xmt

.xmt_bin

.xmt_txt

.xpr

.xpr*

Pointcloud formats CAD Design Softwares examples

.e57

.pts

.ptx

.las

.db

CatiaSolidWorksCreoSolidEdgeACIS SATVDA-FSRhinoVRMLCOLLADAParasolidSketchup3dsmaxAutoCAD

Back to "Importing CAD" 52