X3D navigation and viewing

This article or section is a stub. It does not yet contain enough information to be considered a real article. In other words, it is a short or insufficient piece of information and requires additions.

Draft

This article or section is currently under construction

In principle, someone is working on it and there should be a better version in a not so distant future.
If you want to modify this page, please discuss it with the person working on it (see the "history")

X3D tutorials
Tools: none
Level: beginner

X3D tutorials

## Contents

* 1 Introduction
* 2 Navigation information
* 3 View Points
* 4 Billboards
* 5 Credits and Licence/Copyright modification

## Introduction[edit | edit source]

Since navigation in 3D worlds is difficult and since 3D worlds can be used for different purposes, X3D provides some built-in functionalities to specify default navigation types and so-called viewpoints that are named fixed positions where users can jump into.

Both Viewpoint and NavigationInfo are so-called bindable nodes, i.e. only one can be active at a given moment.

In addition, so-called Billboards may be used to create so-called head-up displays (HUDs) or at least information panel that always will be oriented toward the user.

Finally, navigation, can be eased by design, both architectural and by using interactive artifacts.

## Navigation information[edit | edit source]

The NavigationInfo node indicates how a browser might best support user navigation in the scene. Multiple NavigationInfo nodes may exist in scene, but only one can be active (bound) at a given point. E.g. one can bind different navigation methods to viewpoints by using some more advanced X3D features.

According to the ISO/IEC 19775-1:2008 specification, "The NavigationInfo node contains information describing the physical characteristics of the viewer's avatar and viewing model"

The NaviationInfo has a rather long list of attributes of which we only present a few for now.

type
Defines the Navigation type

There are several navigation types:

* "EXAMINE" best for rotating solitary objects
* "FLY" allows zooming in, out and around
* "WALK" also allows exploration, but on the ground
* "LOOKAT" use pointer to select geometry of interest
* "ANY" lets user select any mode
* "NONE" gives user zero control of navigation

In the type field we can define a list of multiple strings from the above combinations. The default is '"EXAMINE" "ANY"' which gives users plenty of flexibility. I.e. the user first will be able to rotate the object and then can select the navigation mode he/she likes.

avatarSize = 'fatness eye_height climb_height'
More formally speaking: (a) collision distance between user and geometry (near culling plane of the view frustrum) (b) viewer height above terrain (c) tallest height viewer can WALK over.
default is "0.25 1.6 0.75"

It can important to fix the avatar size depending on the world the user must navigate. Since the node is bindable as we mentionned, this also can be changed, i.e. it is possible to let a user enter a mouse hole at some point.

transitionType
determines type of path followed when transitioning between viewpoints
It can be one of the following: "ANIMATE": the browser chooses a smoothing algorithm, i.e a curved path; "LINEAR": will move the user in a straight interpolation of position, orientation. "TELEPORT" will immediately reposition to the destination.

speed = N
meters/second
default is 1m/s which can be slow for larger scenes

headlight = true|false
default = true
If you turn this off, then you must define other lights or the world will be black...

Example code fragment for a cat

<NavigationInfo DEF='CatStyle' type='"WALK" "ANY"' transitionType='"ANIMATE"' transitionTime='1.0' speed="3", avatarSize = 0.1 0.1 1/>

## View Points[edit | edit source]

According to Don Brutzman "It is helpful to think of X3D scenes as fixed at different locations in 3D space". Viewpoints are like cameras that are prepositioned in locations (and directions) of interest.

Once they jump to a View Point (or a jumped to by a script), users can move their current camera viewpoint further and change direction they are looking at. This process is called navigation.

Making navigation easy for users is important. Therefore, authors should provide viewpoints of interest within scenes. Viewpoints are always available through a menu in the client. However, geometric objects can act as sign/teleportation posts, i.e. transport a user into another view. By using Anchors one also can move a user to another world or content type.

The default viewpoint position is (0 0 10) i.e. 10 meters away from the object on the Z-axis, looking backwards toward the origin.

The following attributes can/should be defined:

description
provides a human readable description

position
defines the position of the current view (Camera)

centerOfRotation
defines the user's current rotation center if the navigator is in EXAMINE (rotation) mode

fieldOfView
defines the angle of view. The default is 45 degrees = pi/4 radians = 0.785. I.e. this is a narrow view that does not include peripheral vision. I suggest making this a bit larger.

Examples from the KelpForestMain.x3d entry file of the "kelp forrest".

<Viewpoint DEF='DefaultPositionLeft7Degrees' description='7 degree towards left'
orientation='0 1 0 0.1222' fieldOfView='0.7854'/>
<Viewpoint description='Sardine Ride' fieldOfView='1.8'
position='0.0 1.0 -0.5'/>

## Billboards[edit | edit source]

(to be written)

## Credits and Licence/Copyright modification[edit | edit source]

This article is also available under the following copyright: Attribution-Noncommercial-Share Alike 3.0 Unported, i.e. the same as EduTechWiki, but you also must cite the following sources from which most material is drawn:

* X3D for Web Authors slidesets - 14 Chapters. Over 1200 slides are provided in fifteen slidesets to support teaching and learning X3D for Web Authors. Main author: Don Brutzman
* X3D Graphics for Web Authors, X3D Scene Graph Tutorial. Main author: Don Brutzman
* X3D Graphics for Web Authors - Example Scenes

You also should buy the 3D Graphics for Web Authors book, by Don Brutzman and Leonard Daly, published by Morgan Kaufmann Publishers, Copyright 2007 Elsevier