You are here: Tutorials Click-VR Visualizer Walk through with collisions  




















 CLICK-VR VISUALIZER
Getting started
Walk through with collisions
Adding precalculated reflection
Using automatic reflection
Using lightmaps for photorealistic lighting
Improving rendering quality and performance
 TUTORIALS
Click-VR Visualizer
Unwrap King

TUTURIAL: INTERACTIVE WALK THROUGH WITH COLLISIONS

1. Setup a simple scene geometry

1.1 Create a ground plane: Start 3ds Max with a new clean scene. Then start the Click-VR Viewport Player. Create a large ground plane using the create panel from 3ds max.

 

1.2 Create the bounding collision geometry: Create a box (2) surrounding the ground plane(1). We will use this box as borderline of the scene. With wireframe mode your scene should now look something like this:

 

1.3 Create the colliding camera Now create a new camera a bit above the ground. Place it in the height above the ground plane that you want to walk around. It is recommended to enable the "Clip Manually" checker in the "Parameters" roll out of the camera. The near and far clip values affect the rendering accurancy.

 

1.4 Activate the camera Open the Application Editor, which you can reach from the Click-VR maintoolbar at the bottom of the screen. Then select the newly created camera in the Active User Camera list box. This makes this camera the camera beeing used to view the scene from inside of Click-VR. If you press the start button then the Click-VR viewport will be resetted to this camera from now on. Further if you publish your scene this camera is used as starting point.

 

1.5 Create some more collision geometry Finally plave some smaller boxes on the ground plane. We will later use these as obstackles to collide with. Your scene should now look something like the picture above.

2. Configure the interactive camera

2.1 Now we want to make the camera interactive. Make sure the camera is selected and press the entity button (1) of the maintoolbar. You then will see the Click-VR entity modifier in the 3ds Max modifier panel. The entity modifier is used by Click-VR to store its interactive data for scene objects. You can use it to edit and manage different interaction and special effects features of Click-VR.

 

2.2 Assigning entities Make sure the camera is still selected. Now in the modifier panel select Behaviour in the Category listbox. Then select Walk Through Camera in the Class list box and press "Assign" as shown in the picture above. This will assign the Walk Through Camera Entity to your camera object. If you press the Start button, you will see that your camera is now interactive with default settings.

 

2.3 Enabling Collisions Now again select your camera. In the modifier panel you should see a new roll-out named "Behaviour = Walk Through Camera". Locate it and select the Enable Collisions checker button as shown above.

3. Results

This will slightly change the behaviour of your camera when pressing in the Click-VR viewport. Firstly the camera now will collide with all objects that have the Collider Entity assigned. And secondly the camera cannot fly freely around anymore but instead will walk on all objects that have the Collider Entity assigned. If no Collider are below the camera the camera will will stay on the same height as it started.
Now you have to setup up some objects that the camera can collide with: Therefor select the ground plane and add the entity modifier to it by pressing Entity again. Then select Collider and press assign. Do this for all boxes of the scene.

Note that you can also copy/paste the entity modifier or copy/paste instanciated. If you are finished enter the Click-VR viewport again. When walking around you will see that the camera now collides with the all the boxes that have the collider entity assigned.