Working with Camera / 3ds Max
This page contains the information on how to setup 3ds Max's cameras to be used with Verge3D.
- Setting Up in 3ds Max
- Camera Settings
- Fit to Camera Edge
- Camera Control with Puzzles
Setting Up in 3ds Max
Simply add one of the supported cameras to you scene:
Each camera in 3ds Max is assigned with the following Verge3D settings:
- Viewport Fit
How the viewport will react to changing its dimensions (or device orientation).
- Fit vertical field of view. This mode is good for tall scenes. By fixing vertical field of view you will be ensured that your object will fit into the camera in both landscape (desktops/laptops) and portrait (phones) modes
- Fit horizontal field of view. Contrary to Horizontal, this mode is good for wide scenes.
- Allow Panning
- Enable/disable camera panning.
- Rot. Speed
- Camera rotation speed factor.
- Mov. Speed
- Camera movement speed factor.
- Targeted Camera Limits
- Settings for targeted (aka orbit) cameras, see below.
- Settings for first-person cameras, see below.
- Disable Controls
Targeted Camera Settings
Use the following settings to control parameters of the Target and targeted Physical cameras.
- Persp Min Dist, Persp Max Dist
- Distance limits for perspective camera.
- Ortho Min Zoom, Ortho Max Zoom
- Zoom limits for orthographic camera.
- Min Vertical Angle, Max Vertical Angle
- Vertical (up-down) angle limits.
- Min Horizon Angle, Max Horizon Angle
- Horizontal (left-right) angle limits.
First-Person Camera Settings
- Enable first-person camera controls mode.
- Collision Material
Collision material which will be used to control the zone the camera can move within. Basically, the zone above this material is allowed, all other places including empty is forbidden. If you don't specify this value, the camera will operate in free-flight mode.
If you don't want the collision object to be visible to the user, just hide it in 3ds Max (use the switcher with the eye icon on it).
- Gaze Level
- First-person camera "gaze" (or "head"/"eyes") level.
- Story Height
- Maximum height of the story. Specify if you need multiple floors in your scene, such as two-level cottage or large shopping mall.
- Enable PointerLock
- Enable the pointer lock feature to capture the mouse pointer upon app start. The user should click somewhere on the screen to lock up the cursor and move in 3D space without the need to click/drag with the mouse buttons.
For usage example, check out the following demo from the Asset Store: Firstperson Camera.
Fit to Camera Edge
Fit to Camera Edge is a technique to draw screen-space UI elements based on 3ds Max models. This approach to UI design is more “native” to the 3D artist than using HTML/CSS, and does not require external tools. But there is more in it: since the UI elements are genuine 3D objects, you can apply shaders, lighting, animation, morphing – you name it – making them truly interactive and seamlessly integrated into the scene.
When you parent some object to the camera, the following settings appear on the Verge3D Adv. Rendering Params panel:
- Horizontal canvas edge to fit object to. None — no horizontal fit, Left — fit to left edge, Right — fit to right edge, Stretch — scale object horizontally to fit on the screen.
- Vertical canvas edge to fit object to. None — no vertical fit, Top — fit to top edge, Bottom — fit to bottom edge, Stretch — scale object vertically to fit on the screen.
- Canvas fit shape. Box — use object's bounding box, Sphere — use object's bounding sphere to fit the object on the screen, Point — ignore object boundings and use its center to fit the object on the screen.
- Fit Offset
- Additional offset used to fit object on the screen. Effectively, this value extends object bounding (box or sphere) by the specified absolute value.
Camera Control with Puzzles
You can use camera puzzles to control your camera in real time.
Feel free to ask on the forums!