Professional Documents
Culture Documents
tutorial manual
2 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
All Rights Reserved. No part of this book may be reproduced or transmitted in any form
or by any means, electronic or mechanical, including photocopying, recording, or by any
information storage and retrieval system, without the written permission from Act-3D
B.V.
This manual is designed to provide information about Quest3D. Every effort has been
made to make this book as complete and as accurate as possible, but no warranty or fitness
is implied. The information is provided on an ‘as is’ basis. Act-3D B.V. shall have neither
liability nor responsibility to any person or entity with respect to any loss or damage
arising from the information in this manual.
All brand names and product names in this book are trademarks or service marks of their
respective owners.
Quest3D™ and the Quest3D™ logo are trademarks or registered trademarks of Act-3D
B.V.
Act-3D™ and the Act-3D™ logo are trademarks or registered trademarks of Act-3D B.V.
Cover images by Remko Jacobs. Text and images by Derk de Geus, Remko Jacobs, Ferry
Marcellis, Dylan Nagel, Edward Niewold and Jeroen Visser. Special thanks to Ben Borrie,
Loic de Montaignac, Dave Polcino, Morten Schönau Fog, Pjotr van Schothorst and Erwin
Wolf.
Character and car models are copyright of VSTEP. Assorted images in this manual are
also copyright of VSTEP.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 3
Contents
Part I: Getting started 5
1.1 Introduction.....................................................................................................7
1.2 How to use this manual .................................................................................8
1.3 Quest3D installation .....................................................................................10
1.4 Demonstation scenes ....................................................................................13
1.5 Quest3D User Interface ................................................................................14
1.6 Channels.........................................................................................................31
1.7 Program flow.................................................................................................49
1.8 Templates.......................................................................................................54
1.9 3D scenes........................................................................................................56
1.10 Publication .....................................................................................................61
1.11 Summary........................................................................................................68
Part II: The virtual studio 69
2.1 3D Objects ......................................................................................................70
2.2 Animation ......................................................................................................78
2.3 Object import.................................................................................................87
2.4 Surface properties .........................................................................................91
2.5 Lighting and shadows................................................................................106
2.6 Cameras........................................................................................................114
2.7 Graphic user interface ................................................................................120
2.8 Sound and music.........................................................................................125
2.9 Landscapes...................................................................................................130
2.10 Particle systems ...........................................................................................138
2.11 Character animation ...................................................................................143
Part III: Programming 153
3.1 Logic .............................................................................................................154
3.2 Math..............................................................................................................164
3.3 For Loop .......................................................................................................175
3.4 Arrays ...........................................................................................................185
3.5 Multiple channel groups ............................................................................196
3.6 Mathematical operators .............................................................................205
3.7 Pathfinding ..................................................................................................217
3.8 Finite state machine ....................................................................................224
4 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Appendices 281
A1 Importing from Max and Maya ................................................................282
A2 User interface actions list ...........................................................................286
A3 Keyboard shortcuts.....................................................................................288
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 5
1.1 Introduction
In recent years, 3D computer graphics have taken the world by storm. Hollywood
movies show off fully animated monsters and entire alien planets. Video games
offer fantastic characters to play and vast interactive worlds to explore.
Commercial and scientific presentations are often made in 3D. Even entire
training programs can take place in a virtual reality.
Working with Quest3D means developing in real-time: you are working directly
on the end result. No time will be lost on compiling code or rendering images.
This book is your guide to Quest3D. It offers both theory and practical examples
in the form of step by step tutorials. After reading this manual, you should be
well on your way to creating almost any interactive 3D scene imaginable.
Parts
This book is divided into four parts.
Chapters
Chapter start with an introduction to a new subject. Next is a discussion of the
various related Quest3D channels and functionality. Finally, a step by step
tutorial is presented to give users a hands-on experience with the subject matter.
Tutorials
After Quest3D is installed, the completed scenes of every tutorial in this manual
can be found on the harddisk of your computer. By default, they are located in
the following directory:
Format
The following formats have been used throughout this manual.
• Channels and templates (building blocks) that are added from the Templates
List to the program are printed in italics, with capitals for every word.
Example: Add a Value channel to your program.
• The locations of channels and templates within the Templates List are
printed as folders seperated by a backslash.
Example: Logic \ Channel Caller
Reference Manual
As a complementary source of help to this book, the Reference Manual contains
descriptions of each of the various channels in Quest3D. It can be accessed by
pressing the ‘F1’ key while running the program.
10 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
The Quest3D program and tutorials must be installed on your computer before
you can work with them. The following steps describe the installation process.
Quest3D installation
• Turn on your computer and wait for Windows to be ready.
• Insert the Quest3D cd-rom into the cd-rom drive of your computer.
• After a few moments, a window comes up asking if you want to install
Quest3D.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 11
DirectX installation
• From the Quest3D cd-rom installation menu, choose the ‘Install DirectX 9.0’
option.
• Choose your operating system and language.
• Confirm the installation by pressing ‘Yes’.
• If you understand and accept the license agreement, press ‘Yes’.
• DirectX will now be installed on your computer.
12 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Starting Quest3D
• Press the Windows Start Button.
• The Quest3D splash screen comes up. Click on it to proceed to the program.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 13
Before you start your training, please have a look at a number of finished scenes
that come with the software package. They display a large number of Quest3D
features.
While examining the demonstrations, try to determine which elements are used,
and which of those you want to have in your project.
This manual helps you to create scenes like these demonstrations, and more.
14 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Quest3D offers a large set of powerful features. The program is divided into a
number of ‘Sections’ to keep everything as organised as possible. The three most
important parts of Quest3D are listed below.
Note that it is possible to change the basic interface. Therefore, from user to user
Quest3D might look different. In this manual we will assume the standard
interface is used. For more information, please check the ‘Customization’
chapter in the Reference Manual.
This chapter only discusses the Channels Section. The Animation and Object
Sections are discussed in Part II: ‘The virtual studio’ of this manual.
File menu
The File menu provides options for loading and saving projects. In addition, it
offers options for importing 3D objects from other programs, and publishing
Quest3D projects. The latter will be discussed in later chapters.
The ‘New Project’ option will clear all previously loaded channel groups and
start a new workspace. During some of the coming tutorials you might want to
clear the project using this option. It is similar to quitting and restarting Quest3D.
‘Open Project’ allows you to load a single Channel Group or project file with a
different interface for Quest3D.
Saving a single Channel Group to a new file is done with ‘Save Group As’. To
overwrite your current file, ‘Save Group’ is used. Using the ‘Save All’ option
makes sure the entire project is stored.
Note that for new users ‘Save All’ is the safest method to save a project.
16 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Section navigation
The different sections of Quest3D can be reached in a number of ways. Common
methods are using the Application menu or the Section selection buttons on
the Toolbar.
This is the same (type of) window as in the Animation Section. The Animation 3D
View window shows a ‘real-time’ preview of a project. Changes and additions to
a program made in the Channel Graph will be immediately displayed in the
Animation 3D View window.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 17
Tab windows
Quest3D has many windows that use Tab controls to switch between them. The
most important of these in the Channels Section are the ‘Template list’, the
‘Channel list’ and the ‘Search window’.
Log Bar
The Log Bar is located at the bottom of the Quest3D program screen.
This bar notifies users of general information and specific issues. The history of
all notifications since the program was started can be viewed by pressing the
‘Log’ button.
18 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Channel Graph
The Channel Graph is the window where the channel structures are build.
Quest3D programs are made with building blocks. These building blocks are
called ‘channels’. Below is a picture of a channel in Quest3D.
Channel Group
The image below shows an example of a small group of channels. A structure of
channels is called a Channel Group.
The image above also displays an example of user comments (the text ‘Hello
world example’). In addition, certain building blocks have been hidden inside
folders.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 19
New channels can be added to your program by dragging a name from the
Templates List onto the Channel Graph. ‘Dragging’ means pressing and holding
down the left mouse button, moving the mouse cursor to a new position, and
releasing the left mouse button.
20 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
After the mouse button is released, the channel is added onto the Channel Graph.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 21
Templates
A Template is a predefined channel or group of channels. Using templates can
greatly speed up your workflow. Templates can be added just like single
channels.
In the example below, a Vector template is added onto the Channel Graph. A
Vector template consists of four channels.
22 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Move the mouse cursor to a specific Move the mouse to move the on-screen
position cursor to a specific position on the
screen
Click Press the left mouse button and release
Double-click Press the left mouse button, quickly
release and quickly press again, and
release
Drag the mouse Press and hold down the left mouse
button, do not release, and move the
mouse around
Drag from a to b Press and hold down the left mouse
button, do not release, and move the
on-screen cursor to a specific position
on the screen
Select an item Press the left mouse button while the
on-screen cursor is over an item and
release
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 23
Tutorial
The folowing tutorial is an introduction to the Quest3D user interface. It also
takes a closer look at channels (building blocks). The goal of this tutorial is to
familiarise yourself with the basics of the Quest3D user interface.
Starting Quest3D:
• Press the Windows Start Button.
• From the Start Menu that comes up, choose the following options:
Step by step:
• Examine the screen. By default, Quest3D opens with one of the Channel
Sections. The Channels Section is where the actual program is created, using
building blocks called ‘channels’.
• From the Applications Menu, choose ‘Sections > Animation’ to switch to the
Animation Section.
• Switch to one of the other Sections by choosing it from the Application
Menu.
• Switch to one of the other Sections by pressing the appropriate button on the
Toolbar.
• Go to the Object Section.
24 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Place the mouse cursor over the Channel Graph. Zoom in and out by
scrolling the mouse scroll wheel up and down.
If your mouse has only two buttons: hold down the ‘Alt’ key on your
keyboard, press and hold down the right mouse button, and move the mouse
up and down to zoom in and out.
Zoom in on the Channel Graph to get a closer view of the channels in a project.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 25
• Place the mouse cursor over the Channel Graph. Press and hold down the
middle mouse button and move the mouse to move the view of the Channel
Graph.
If your mouse has only two buttons: use ‘Alt + Left Mouse’ to move the
view.
• Look at the Templates List on the left hand side of the screen. It contains all
sorts of channels and combinations of channels with a wide range of
functionality.
• Click on the ‘+’ sign next to the word ‘Logic’. Note the structure expands to
reveal a number of items.
• Move the mouse cursor over the word ‘Channel Caller’.
(A Channel Caller channel is used to create the logic path of your project. For
example a Channel Caller named ‘Project Start’ might call another channel
named ‘Render Scene’ and another named ‘Do User Logic’).
26 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Click and hold the left mouse button, and move the mouse cursor to the
center of the screen, below the ‘Project Start’ channel.
• Release the left mouse button. You have just dragged a channel onto the
Channel Graph.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 27
• Click on the ‘Project Start’ channel to select it. Note the red selection outline.
• When at a new position, release the left mouse button. Note the channel is
moved.
• To select multiple channels at once, create a selection box around them.
Starting at the top left corner in the Channel Graph, press and hold the left
mouse button. Drag the mouse to below and to the right of the channels you
want to select. Release the mouse button.
In the image above, the left mouse button is pressed at position ‘1’. The
mouse is then moved to position ‘2’, creating the selection box and selecting
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 29
all channels inside this box. Selected channels can be recognised by a red
outline.
• To move multiple channels at once, first make a multi-selection. Next, move
the mouse over any of the selected channels. Press and hold down the left
mouse button and move the mouse.
After releasing the mouse at a new position all selected channels are moved,
relative to the new position and relative to each other.
• Select the ‘Channel Caller’ channel and press the spacebar on your keyboard.
The channel is stored in a Folder.
30 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Folders are named after the channel the mouse cursor is over when creating the
Folder.
• Select the Folder and press the spacebar again to ungroup the Folder.
• Select the ‘Channel Caller’ channel and press the ‘Delete’ key on your
keyboard to delete it.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 31
1.6 Channels
Quest3D programs are made with building blocks. These building blocks are
called channels. Each channel has a specific function.
In Quest3D, channels are rectangular blocks. The channel in the image below is
called a Value channel. It can store a number.
The small black squares above and beneath a channel are called link squares.
Channels can be connected to each other by lines between top and bottom link
squares.
In the image above, the upper channel is called the Parent. The lower channel is
called the Child. Children are often used as input or output data for Parents.
32 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Channel Groups
A structure of connected channels is called a Channel Group. A Quest3D project
consists of one or more Channel Groups. For example, one group might display a
room on screen while another group might show a character. The two Channel
Groups may be combined to display a character in a room.
Channel information
Information on a channel can be viewed by moving the mouse over it. After a few
moments, a pop-up window appears.
The channel in the image above is named ‘My Value’. In addition to a name,
every channel has a Basetype and a Type. A Value channel is of Basetype Value
but also of Type Value.
The Clear Screen channel accepts three childen of type Value: one for the each of
the RGB color components.
The first link square of the ‘Clear Screen’ channel in the image below is called ‘R’.
It represents the red component of the channel’s color.
The information window also shows that this first link square only accepts
channels of Basetype Value. Therefore, the channel called ‘My Value’ is accepted
as a child. In the image below, the ‘My Value’ channel has a value of 0. The
34 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
second and third link squares of the ‘Clear Screen’ channel are empty, and
therefore also 0. The color of the ‘Clear Screen’ channel is (0, 0, 0), which is black.
Note that the grid is only visible in the Quest3D editor itself, not in stand-alone
programs. The grid is a Quest3D Helper item.
The image below shows the result of the ‘My Value’ channel with a value of 0.5.
The background is colored dark red.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 35
User input
The image below displays the information for a channel called ‘My Spacebar
Value’.
This channel is again of Basetype Value. However, its Type is User Input. A User
Input channel can convert many different types of user activity like keyboard,
mouse and joystick input to a value.
Since the ‘My Spacebar Value’ channel is of Basetype Value, it is also accepted as
child by the Clear Screen channel.
In the images above and below, the ‘Clear Screen’ channel changes color from
black to red based on user input. When the spacebar is pressed, the background
color changes to bright red.
36 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Multi-link squares
The image below shows four different channels: two Channel Callers, a Value and a
Clear Screen channel.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 37
Different channels can have different numbers and Types of link squares. For
example, the Clear Screen channel accepts three children and the Value channel
accepts one child.
A ‘+’ symbol inside a yellow link square indicates multiple children can be linked
to a channel. Once a child is linked, the ‘+’ symbol will move to the right, creating
a new spot for another child.
Linking
Moving the mouse over the top link square of the ‘Channnel caller’ channel
makes the link orange.
In the image below, a linking action is started from the ‘Channel Caller’ channel
to another channel by pressing and holding down the left mouse button.
38 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
During a linking action, all link squares change color to either red or green.
Connections can be made to green link squares, but not to red ones.
In the image above, a link is started from a channel of Type Channel Caller (it also
has the name ‘Channel Caller’). The ‘Project start’ channel (of Type Channel Caller
as well) accepts this link as can be seen by the green link square.
Channels of Types Clear Screen and Value only accept Values. Therefore, their link
squares are red.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 39
Releasing the left mouse button on a link square will create the link, if the link is
valid.
Instead of moving the link on the target link square you can also release it over
the channel itself. Quest3D will attempt to link the channel to one of the open
and valid link squares of the target channel.
Quick linking:
1. Select the child.
2. Hold down the ‘L’ key on the keyboard.
3. Click on the parent.
Deleting links
Moving the mouse over the arrow of the link between the channels and pressing
the ‘left mouse’ button you can select the link. You are now able to delete the link
by pressing the ‘Delete’ key on your keyboard.
40 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
If a link is deleted from a channel that creates new ‘link squares’ an ‘empty’ link
square is left behind. This link square has the blue color. Channels will ignore
these empty spaces. If you link a new child to a channel with a blue ‘link square’
the ‘empty’ position will be filled first.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 41
In its properties window you can enter a new value. Note that the Quest3D
program does not pause when opening a dialog. You can change values while
your program is running and instantly see the result.
Context Menu
Right clicking on a channel will bring up its Context Menu.
42 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Shortcuts
Channel shortcuts work in the same manner as Windows shortcuts to programs
or folders. In Quest3D only shortcuts to channels can be made, not to folders.
Shortcuts are references to the original channel. Their only purpose is to keep
Channel Groups more readable.
Use folders and shortcuts to keep your project clean and tidy.
44 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Tutorial
The following exercise deals with channel properties. After completing it, you
should be able to find and understand Types and Basetypes, of both channels and
link squares.
Step by step:
• Start Quest3D. By default, Quest3D opens with the Channels Section.
• Drag the following channel from the Template List onto the Channel Graph.
• Move the mouse cursor over the ‘Value’ channel and wait for the pop-up
window with information to appear.
• Move the mouse cursor over the small black square on top of the ‘Value’
channel. Note the black square turns orange.
• Click and hold down the left mouse button, and move the mouse cursor over
the center of the ‘Clear Screen’ channel. Do not release the mouse button yet.
Note a black line is drawn from the top of the ‘Value’ channel to the current
position of the mouse cursor.
• Release the left mouse button. Note a black line is drawn from the top of the
‘Value’ channel to the bottom of the ‘Clear Screen’ channel. The two channels
are now connected.
46 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Move the mouse over the ‘Clear Screen’ channel and right click to bring up
its Context Menu. Select the ‘Set as start channel’ option.
The image on the right shows the large arrow symbol on top of the ‘Clear
Screen’ channel. It indicates the channel is the start channel.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 47
• Type in a new value from 0 to 1.0 in the edit box. Note that changing the
value in the dialog window affects the background color in the Animation
3D View window.
• Press the ‘OK’ button to accept and close the dialog window.
• From the Applications Menu, choose the ‘File’ option and then the ‘Save
Group As…’ option.
• Find an appropriate location to store your project files, for example the
following directory:
An example of what your program should look like is available in the Quest3D
program folder. Its directory and name is listed below. As noted in Chapter 1.2,
‘How to use this book’, ‘..\’ is an abbreviation of the following folder:
• To load a Quest3D project, from the Applications Menu, choose the ‘File’
option and then the ‘Open Project...’ option.
• Locate the directory given below under ‘Finished scene’. The complete path
is:
Finished scene:
• ..\Tutorials\1.6 –Channels\Channels – Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 49
The ‘Set as start channel’ option in a channel’s Context Menu can be used to
define the beginning of a Quest3D program.
In the image below, the ‘Channel Caller’ channel is the Start Channel and has two
children linked to it.
Channel Callers are the foundation for the workflow of your project.
50 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Project activity
A Quest3D project is only actively executed when the Animation 3D View
window is open.
In the image above, the Start Channel is actively executed, as can be seen by the
blue lines around the channel.
The image below shows a small Quest3D scene. On the left hand side, the channel
structure is visible. On the right hand side is a preview of the scene in the
Animation 3D View window.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 51
Frames
Quest3D works in real-time. This means it constantly executes a project
completely and updates the preview. One complete cycle through the channel
structure is called a frame. Calculating all end result is referred to as rendering.
The framerate defines how many times per second a program is executed.
Framerates depend on the complexity of a project and the computer hardware
used to render a scene.
Program flow
Calling a channel in Quest3D means carrying out all of its functionality once,
based on any input it may receive from its children. The exact results of calling a
channel depends on its Type.
A Channel Caller calls its children in a left to right order. In the image below, the
‘Caller 1’ channel is called first, displaying a box object on screen. Next, the
‘Caller 2’ channel is called, rendering a fire object.
52 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
When the structure is completely executed, the program begins anew with the
Start Channel.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 53
Tutorial
The following exercise illustrates the flow of a Quest3D program.
Step by step:
• Start Quest3D.
• Open the scene ‘Program flow.cgr’. It can be found in the location specified
above. The file contains a simple scene with a box and a fire object.
• Make sure the Animation 3D View window is active by pressing the
appropriate tab in the lower left corner of the screen.
• Examine the scene in the Animation 3D View window. Note the box and the
fire object are both rendered.
• Right click on the ‘Caller 1’ channel and from its Context Menu, select the
‘Set as start channel’ option.
• Examine the scene in the Animation 3D View window. Note only the fire
object is visible.
• Right click on the ‘Caller 2’ channel and from its Context Menu, select the
‘Set as start channel’ option.
• Examine the scene in the Animation 3D View window. Note only the box
object is visible.
Finished scene:
• ..\Tutorials\1.7 – Program flow\Program flow – Complete.cgr
54 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
1.8 Templates
Below is a quick list of the categories of templates that come with Quest3D. It is
intended to give you an impression of the scope of the entire set. The rest of this
manual discusses many of these templates and their functionality in greater
detail.
1.9 3D scenes
All Quest3D programs share the same basic principles. This chapter is an
introduction to creating a project in Quest3D.
Quest3D scenes
3D objects play an important part in most Quest3D programs. 3D objects can be
imported from your favorite 3D modeling package. It is also possible to use one
of the 3D objects that comes with Quest3D.
Just like a movieset, a Quest3D scene needs a camera and one or more lights.
The Start 3D Scene, Render, Camera, 3D Object and Light channels are combined in
the following channel structure.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 57
Tutorial
In this tutorial you will create a simple Quest3D program. The result will be a
scene with a 3D object, a camera and a light.
In this introductory chapter, you will make use of templates. Templates are
predefined channels or groups of channels designed to speed up your workflow.
The templates used in this tutorial are listed below under ‘Needed templates’.
The first goal of this tutorial is to familiarise yourself with the basic structure of
Quest3D programs. The second goal is to gain more experience with adding
channels to a program and connecting them to each other.
Needed templates:
• Scene \ Start 3D Scene
• Scene \ Rendering \ Render
• Scene \ Cameras \ Object Inspection Camera
• Objects \ Primitive Object
• Scene \ Lights \ Point Light
Step by step:
• Start Quest3D.
• Create a new scene by choosing ‘File > New Project...’ from the Application
menu. Name it ‘First project scene’.
• In the Template List, find the Start 3D Scene template. Its location is given
above, in the ‘Needed templates’ list:
Click the ‘+’ sign in front of the word ‘3D Items’ in the Templates List. The
‘3D Items’ subfolder is expanded. One of the templates listed is the Start 3D
Scene channel. Drag a Start 3D Scene channel onto the Channel Graph.
58 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Right click on the ‘Start 3D Scene’ channel and from the menu, choose ‘Set as
start channel’.
• Find the Render channel in the Templates List. It’s location is given in the
‘Needed Templates’ list above.
• Drag a Render channel onto the Channel Graph, just below the ‘Start 3D
Scene’ channel.
• Link the top link square of the ‘Render’ channel to the child link square of the
‘Start 3D Scene’ channel.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 59
• Drag a Point Light template onto the Channel Graph. Connect the ‘Scene
Light’ channel to the last child link of the ‘Render’ channel. Note how the car
is affected by this lightsource.
60 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Your current channel structure should look similar to the one in the image
below.
• From the Applications menu, choose ‘File > Save Group As...’.
• Locate the following folder:
Finished scene:
• ..\Tutorials\1.9 –3D scenes\3D scenes – Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 61
1.10 Publication
At a certain point, a Quest3D project may be finished and ready for distribution.
Whether it is a modest free screensaver or an extensive commercial training
application, the Quest3D program must be exported out of the editor and saved
into a format the target audience can run.
Professional
Enterprise
Can publish to type Lite VR
.q3d player file Yes Yes
Web application Yes Yes
Screensaver Yes Yes
WinAmp plug-in Yes Yes
Stand-alone self-running .exe No Yes
Installer file No Yes
Published projects using the Lite Edition will display an extra Quest3D splash
screen on start-up.
License fees
Regardless of the Quest3D license you work with, no additional fees will ever be
charged by the developers, Act-3D. After expenses for the Quest3D software
package itself, there are no extra costs.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 63
Tutorial
The following tutorial is aimed at familiarising you with the various types of
publication. In order, the ‘.q3d’ project file, the stand-alone ‘.exe’ program, the
installer and the web application are discussed.
Step by step:
• Open the scene ‘Publication.cgr’. It contains a compact production
visualisation scene.
• From the Applications Menu, select ‘File > Publish...’. The ‘Project
Publishing’ window appears.
• Locate the file ‘Product_Visualisation.q3d’ in and double click it. The scene
will load and be run using the Quest3D Project Viewer.
• Test the scene by holding down the right mouse button and dragging the
mouse to orbit around the 3D object.
• When ready, press the ‘Escape’ key to exit the application.
Note that both the Quest3D Project Viewer and DirectX 9.0 or higher must be
installed on a computer in order to run ‘.q3d’ files.
Note that the Quest3D Project Viewer is not needed to run stand-alone ‘.exe’ files
created with Quest3D. However, DirectX 9.0 or higher must still be installed.
Note that the Quest3D Browser Plug-in and DirectX 9.0 or higher must be
installed on a computer in order to run Quest3D web page applications. If the
Browser Plug-in is not yet installed, the webpage will automatically try to
download and install it. The user may cancel this operation.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 67
Also note that the actual application is a ‘.q3d’ file. Both the ‘.htm’ and the ‘.q3d’
file must be uploaded to an ftp server before others can view the web page
application on the internet.
Finished scenes:
• ..\Tutorials\1.10 – Publication\Product Visualisation.q3d
• ..\Tutorials\1.10 – Publication\Product Visualisation.exe
• ..\Tutorials\1.10 – Publication\Product Visualisation.scr
• ..\Tutorials\1.10 – Publication\index.htm
68 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
1.11 Summary
This first part of the manual was an introduction to the basic concepts of
Quest3D. Below some of the key points of this section are listed.
• The first step in creating convincing 3D scenes, and keeping your project
managable, is being able to describe what you actually want to build.
Quest3D helps you to visualise your ideas.
• Quest3D programs are made with building blocks. These building blocks are
called ‘channels’. Each channel has a specific function.
• The small black squares above and beneath a channel are called ‘link
squares’. Channels can be connected to each other by lines between top and
bottom link squares.
• The large area with the light blue background is called the ‘Channel Graph’.
The Channel Graph shows the channels used in a Quest3D program.
• All Quest3D programs share the same basic principles. 3D objects play an
important part in most Quest3D programs. Just like a movieset, a Quest3D
scene needs a camera and one or more lights.
• User input can be registered through for example keyboard, mouse, joystick,
drawing tablet and pen, and virtual reality gear.
• Publishing a Quest3D project means taking it out of the editor and creating a
seperate, stand-alone program.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 69
2.1 3D Objects
Simple models such as a box are made up of only a few vertices (or corners),
while complex objects such as cars, buildings and characters can consist of many
thousands of such points.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 71
‘Surfaces’ are built out of ‘polygons’. A polygon can have any number of
vertices, though in real-time graphics, they usually appear in the form of ‘tri’s’
and ‘quads’ (3 and 4 vertices, respectively). Quest3D polygons consist of up to 3
vertices. The image below shows a cube object divided into three-sided polygons.
Textures
Individual polygons can be assigned a color, but often, another means to add
detail is chosen. A ‘texture’ is an image that can be wrapped around a 3D shape.
An example is given below.
72 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
In real-time graphics, textures are most often used to define color and
transparency. In the image below, the texture is wrapped around a sphere object
and defines its color.
Applying the alpha texture above to the sphere object results in the image on the
right.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 73
Objects in Quest3D
3D objects in Quest3D are split into two large parts: motion and surface.
Linked to the ‘Motion’ channel are three Vectors. They describe the object’s
position, rotation and size, respectively.
The Vectors themselves each consist of three Values. For animation purposes, these
Values can be replaced with Envelope channels. Animation will be discussed in
Chapter 2.2.
The actual shape of a 3D object in Quest3D is described in the second half of the
structure. Linked to the Surface channel are, in order, the 3D ObjectData, the
Material and the Texture channels.
The 3D ObjectData channel contains the vertices and polygons of an object. It also
contains information on how to wrap a texture around the shape.
The Diffuse vector contains an object’s color, and consists of three components:
red, green and blue, or ‘RGB’.
The Emissive vector describes the amount of self-lighting the model has. Without
lights in your scene, an object with an Emissive vector of (0, 0, 0) is black.
The Specular vector defines the color and intensity of the highlight, while the
Power value controls the size of the highlight.
The Alpha Diffuse value defines the transparency of an object.
The Texture Blend Factor value defines how much of a texture is blended with the
Diffuse color.
The Texture channel represents the actual texture image applied to a surface. It
contains a diffuse (color) image, and may contain an alpha image.
Tutorial
Step by step:
• Open the scene, ‘3D objects.cgr’.
• Go to the Object Section by pressing the button on the toolbar.
• The 3D model is displayed in the Animation 3D View window.
• Click on the name ‘Car’ in the Object List in the lower right corner of the
screen to select it.
• Click on the name ‘Body’ in the Surface List in the lower half of the screen to
select it.
• Look at the ‘Material’ tab on the left side of the screen. It shows a number of
sliders.
• Drag the ‘Diffuse’ sliders to different positions. Note how the color of the
object changes.
• Hold the ‘shift’ key and drag one of the sliders. Note all three sliders are
affected.
Finished scene:
• ..\Tutorials\2.1 – 3D objects\3D objects – Complete.cgr
78 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
2.2 Animation
One of the most powerful features of Quest3D is that you can animate virtually
every aspect of your scene. For instance, 3D objects can be moved, rotated and
scaled over time. In addition, all of their surface properties can be animated, such
as their color and transparency values. 3D character models can be brought to life
by animating virtual skeletons inside of them. Music and sound can be triggered
on certain location- or time-based events. Menu windows can be moved or faded
in and out of the screen.
Envelopes
In Quest3D, animation often means changing values over time. The regular Value
channel can only store one value. To store animation data, the Envelope channel is
used.
The interface of the Envelope channel looks like a mathematical graph. It works in
a similar way as well. The horizontal axis represents the input (often time), which
can be fed to the Envelope by connecting a (Timer) Value to its child link. The
vertical axis represents the output. Through (X, Y) pairs and interpolation, any
input can be converted to an output value.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 79
Timers
The Timer Value and Timer Command channels allow for easy animation control.
Examples of Timer Commands are ‘Play’, ‘Stop’, ‘Rewind’ and ‘Play & Loop’. In
the image below, a Timer Value channel is linked as input to an Envelope channel.
The Timer can be played using the Timer Command channel shown in the same
image.
A Timer can be named in the properties window of its channel. You can create as
many seperate Timers as needed in a scene.
80 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Timer Value channels are automatically adjusted for computer speed. In Quest3D,
25 frames equal exactly 1 second.
The Animation Section of Quest3D is where all objects are positioned and
animated.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 81
The Time Slider Bar allows you to insert keyframes and playback animations.
1 Start frame
2 Current frame
3 End frame
4 Timer List
5 Previous keyframe
6 Record
7 Play (and loop)
8 Next keyframe
9 Delete keyframe button
10 Insert keyframe button
11 Envelope controls
Tutorial
Needed templates:
• Animation \ Timer Value (x2)
• Animation \ Timer Commands \ Play & Loop
• Animation \ Timer Commands \ Stop
Step by step:
• Open the scene ‘Animation.cgr’. It contains a simple scene and two spheres.
• Drag a Timer Value channel onto the Channel Graph. Connect it to the ‘Red
Sphere Timer Value’ channel.
• Go to the Animation Section by pressing the button.
• Click on the Play button . Note that the red sphere is now moving. The
animation is looped. Press the Stop button . Note that the animation halts
at the current frame.
• Double click on this Timer Value channel to open its properties window.
From the drop-down list, select ‘New..’. In the pop-up window, enter the
name ‘Blue Sphere’ and press OK.
• Move the blue sphere by changing one or more of the coordinate values in
the Transform Type-in fields. They are located in the lower-left corner of the
screen, under the ‘Move’ button.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 85
• Make sure the Gizmo is on by pressing the button on the toolbar in the
lower left corner of the screen.
• Move the blue sphere by dragging one of the axes of the Gizmo.
• Move the Time Slider to frame ‘0’, and press the ‘Insert keyframe’ button. In
the pop-up window, type in ‘250’, and confirm by clicking ‘OK’. The current
motion (position, rotation, scale) of the object at frame ‘0’ is copied to frame
‘250’. The animation now loops properly.
• Press ‘Play’ to examine the new, longer animation you just created. When
ready, press ‘Stop’.
• Make adjustments if needed.
Finished scene:
• ..\Tutorials\2.2 – Animation\Animation – Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 87
.X files
Before you can use your own models in Quest3D, you will need to convert them
to the Microsoft DirectX ‘.X’ file format. ‘.X’ files contain all wireframe, surface,
texture assignment and animation data of an object, and can directly be imported
into Quest3D.
The ‘.X’ file exporter plug-ins for a number of modelling packages are shipped
with Quest3D. To install the appropriate one, from the Windows Start Menu,
select
Programs > Act-3D > Quest 3D 3.0 > Extras > Exporters >
Make sure you install the utility to the correct plug-ins subdirectory of the
modelling package.
Tutorial
In the following tutorial, a simple object created in one of the modeling packages
mentioned above is exported to the ‘.X’ format. It is then imported into Quest3D.
Preparation:
• In your favorite modeling package, create a simple object such as a cube.
Refer to the program’s help file for details.
• From the Applications Menu, select ‘File > Export’.
• Choose a location on your harddisk to save the ‘.X’ file to.
• Type in a name and press ‘Save’.
• The standard settings are good for now.
Select ‘Go!’.
Needed templates:
• Scene \ Simple Scene
Step by step:
• In Quest3D, from the Applications Menu select ‘File > Import’.
• Locate the ‘.X’ file you just created, or the ‘Car.X’ file from the directory
specified above. Press ‘Open’ to accept.
• The next properties window suggests a channel pool name. Change it to
‘Car’ and press ‘OK’ to accept.
• The standard settings in the next properties window are perfect for now.
• Note that the 3D model from the ‘.X’ file is now imported into Quest3D. It is
stored in the standard 3D Object channel structure.
90 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Drag the Simple Scene template onto your Channel Graph, above the object
channels.
• Select and delete the ‘Primitive Object’ channel and all its children.
• Right click on the ‘Start 3D Scene’ channel, and select ‘Set as start channel’.
• Make sure the Animation 3D View displays the scene using the Project
Camera .
• Link the 3D object you just imported to the ‘Render’ channel. It should now
appear in the Animation 3D View window.
Finished scene:
• ..\Tutorials\2.3 – Object import\Object import – Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 91
Textures
A ‘texture’ is an image that can be wrapped around a 3D shape. In real-time
graphics, for performance reasons, their dimensions in pixels (width and height)
must be a power of 2. In Quest3D, they must also be greater than 8. Dimensions
of 32x32, 128x256 and 256x256 pixels are all valid sizes.
Larger dimensions mean larger file sizes, and an increase in memory use. Even
though today’s graphics hardware can have 64, 128 or even 256 MB of texture
memory, inefficient use of textures may cause problems. While a ‘.jpg’ image with
dimensions of 2048x2048 pixels might take up as little as 40 kb of harddisk space,
it takes up over 8 MB of texture memory.
Compression
In addition, textures in Quest3D may be compressed. The image quality might
slightly decrease, but compressed textures may use up to four times as little
memory as uncompressed versions. Creating a 3D scene is constantly balancing
between quality and performance.
Mipmaps
Larger textures on distant surfaces might produce artifacts.
Using mipmaps on the square in the image above results in the following picture.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 93
Note that the smaller versions take up texture memory as well. Also, when
loading a Quest3D scene, mipmaps must be generated at start up. This might take
some time, depending on the number of textures in the project, their dimensions,
and the number of mipmaps specified per texture.
The ‘.dds’ plug-in for Photoshop is shipped with Quest3D. To install it, from the
Windows Start Menu, select
Programs > Act-3D > Quest 3D 3.0 > Extras > Exporters > Photoshop > DDS file
Make sure you install the utility to the ‘Plug-Ins’ subdirectory in the Photoshop
folder on your harddisk.
UV Mapping
Textures are wrapped around a 3D object according to so called ‘UV coordinate
sets’. UV coordinates specify where each pixel of a texture is drawn onto a
surface.
Quest3D can handle simple ‘UV mapping’ methods such as planar and cubic,
shown in the image below. These simple UV mappings can be moved and scaled.
94 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
UV coordinates range from 0 to 1.0. (0, 0) is the top left corner of an image, while
(1.0, 1.0) is the bottom right corner.
Transparency
Surface transparency may be handled in a number of ways. In the Object Section,
on the ‘Surface’ tab, the ‘Transparency’ dropdown list provides a number of
options.
The top row in the image below shows the following transparency methods, in
order: ‘No Transparency’, ‘Multiply’ and ‘Add’. The bottom row shows, in order,
‘Add Smooth’, ‘Alpha Value’ and ‘Alpha Texture’.
96 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
‘Multiply’ can be used for dark windows or shadows for example. ‘Add’
produces a glow effect. ‘Add Smooth’ is a subtle version. ‘Alpha Value’ makes a
surface transparent from 0% to 100%. ‘Alpha Texture’ is used to precisely specify
transparency.
Texture stages
More than one texture may be applied on a surface. The maximum number of
‘texture stages’ that can be used per surface depends on the graphics hardware.
Most graphics cards support two stages, and newer graphics cards support three
or four. Chapter 10, ‘Landscapes’, discusses an advanced blending method based
on multiple render passes.
The top row in the image below shows three source textures: stage 1, stage 2 and
an alpha map. The bottom row shows the following blending methods, in order:
‘Multiply’, ‘Add’, ‘Alpha Value’ (50%) and ‘Alpha Texture’.
The ‘Multiply’ setting typically results in darker colors. ‘Add’ produces lighter
colors. ‘Alpha Value’ blends two stages from 0 to 1 (0% to 100%). ‘Alpha Texture’
is used to precisely specify a blend.
UV sets
A surface may have more than one set of UV coordinates. The maximum number
of UV sets depends on the graphics hardware. Most cards support up to two sets.
Blending texture stages with seperate UV coordinates may be done to mask
repetition. In addition, effects such as light mapping need their own sets.
The image below shows two texture stages, each with their own uv mapping. The
blending result is shown on the right.
98 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Object sorting
When rendering a scene, Quest3D automatically sorts all surfaces to display them
in the correct order. Sometimes, especially with transparent objects, glitches cause
a surface to be sorted incorrectly. In this case, (part of) the surface is rendered
behind or through another while it should be in front.
The surfaces from the image above are now rendered in the correct order, as
shown in the following picture.
Alpha artifacts
Alpha textures used to define transparency may sometimes produce unwanted
results.
100 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Pixels that should be transparent may be ‘knocked out’ with the ‘Reject Alpha
Pixels’ setting. It can be changed in the Object Section, on the ‘Surface’ tab, in the
‘Advanced..’ mode. The ‘Ref’ value defines the threshold for knocking out
unwanted pixels.
The image below shows the texture surface with proper alpha transparency.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 101
Tutorial
This tutorial deals with textures, transparency, blending methods and surface
sorting. At the end of this chapter you should be able to work with textures in
Quest3D.
Needed textures:
• ..\Resources\Textures\Architecture\Buildings_128.jpg
• ..\Resources\Textures\Landscapes\Grass.jpg
• ..\Resources\Textures\Reflection\Reflection_1.jpg
Step by step:
• Open the scene ‘Surface properties.cgr’. It contains a road through the
countryside, a few buildings in the background, a number of trees and a
parked car.
• Go to the Object Section.
• Click on the ‘Animation 3D View’ tab to select it.
• Make sure the Animation 3D View displays the scene using the Project
Camera .
• From the current point of view, examine the buildings in the background.
Note they are fairly small compared to the rest of the screen.
• Click on the ‘Buildings’ object in the list to select it.
• On the ‘Textures’ tab on the right side of the screen, locate the highlighted
texture called ‘Buildings_1024.jpg’. Double click on the texture to open its
properties window.
• In the texture properties window, note its dimensions as well as its memory
use.
• Press the ‘Load’ button and locate the ‘..\Resources\Textures\Buildings\’
folder. Select the file ‘Buildings_128.jpg’, and press ‘Open’ to accept. The new
image is displayed in the preview window. Note the new dimensions and
memory use. Press ‘OK’ to close the Texture window.
• Reexamine the buildings in the background. Note their textures are still
sharp enough. Decreasing texture size for performance reasons in this case
did not result in a decrease in quality.
102 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Examine the grass landscape from this perspective. Note the visual artifacts
further away from the camera.
• On the ‘Textures’ tab on the right side of the screen, locate the highlighted
texture called ‘Grass.jpg’ and double click it. In the properties window, note
the MipMap Count value is currently ‘1’. Change it to ‘0’ to let Quest3D
automatically decide how many mipmap levels are needed. Press ‘OK’ to
close the Texture window.
• Reexamine the grass landscape. Note the visual artifacts further away from
the camera are much smoother now.
• Press the icon to display the scene using the Editor Camera.
• In the Objects List in the lower right corner of the screen, click on the ‘Car’
object to select it.
• In the Surfaces List in the lower part of the screen, click on the ‘Chassis’
surface to select it.
• On the ‘Texture Stages’ tab on the right side of the screen, click on the ‘Stage
2’ tab.
• On the ‘Textures’ tab on the right side of the screen, press the ‘Load’ button
to load a new texture. Locate the ‘..\Resources\Textures\Reflection\’ folder.
Select the file ‘Reflection.jpg”, and press ‘Open’ to accept. Press ‘OK’ to close
the Texture window.
• Click on the new texture to apply it to the ‘Chassis’ surface of the ‘Sports Car’
object. Note the texture is stretched across the car.
• On the ‘Texture’ tab on the left side of the screen, from the ‘Mapping’
dropdown list, select ‘Reflection map (CamReflvec)’. Note the UV mapping
is affected.
• Orbit the Editor Camera around the car. Note the UV mapping is affected.
• On the ‘Surface’ tab, from the ‘Texture Blending’ dropdown list select ‘Alpha
Value’.
• On the ‘Material’ tab, drag the ‘Texture factor’ slider to ‘0.92’. Note the
reflection stage is blended onto the diffuse texture stage below.
• Orbit the camera around the car. Examine the reflection effect. If needed,
adjust the ‘Texture Factor’ slider to change the amount of blending.
• Click on the ‘Windows’ surface in the list to select it.
• On the ‘Surface’ tab, from the ‘Transparency’ drop down list select
‘Multiply’. Note how the car windows become transparent and darker.
• From the ‘Transparency’ drop down list select ‘Add’. Note how the car
windows become transparent and lighter, almost glowing.
• From the ‘Transparency’ drop down list select ‘Alpha Value’. Note the car
windows become fully transparent.
104 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• On the ‘Material’ tab, drag the ‘Alpha’ slider to ‘0.5’. Note the car windows
become 50% transparent.
• Examine the trees in the scene. Note the square surfaces around their leaves
should be transparent.
• Click on the ‘Trees’ object in the list to select it.
• Click on the ‘Leaves’ surface in the list to select it.
• On the ‘Surface’ tab, from the ‘Transparency’ dropdown list select ‘Alpha
Texture’. Note the squares around the leaves become more transparent. Note
there is still an unwanted outline around the leaves.
• On the ‘Surface’ tab, click on the ‘Advanced..’ button.
• Select ‘Reject Alpha Pixels’ and type in ‘150’ as ‘Ref’ value. Note the outline
around the leaves disappears.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 105
Finished scene:
• ..\Tutorials\2.4 – Surface properties\Surface properties – Complete.cgr
106 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Proper lighting is essential for a convincing virtual scene. Lighting and shadows
give the user visual cues about an environment. Without contrast between light
and dark, it is much harder to establish depth in a scene.
Regular external lighting involves a source that emits light onto 3D objects in a
scene. In Quest3D, lights are actual channels, and have a number of child links.
Their properties can also be accessed in the Animation Section, on the ‘Light’ tab.
Light types
A light in Quest3D may be of one of three types: point, spot and directional,
shown in the image below.
A point light radiates light into every direction. A spotlight is defined by an inner
and outer cone angle, resulting in a simulated fall-off effect. A directional light is
simply a rotation vector along which the source emits light. All rays of a
directional light are parallel to each other.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 107
A Quest3D light can be colored through its ‘Diffuse’ vector. The ‘Ambient’ vector
serves as a global ‘Emissive’ vector to all objects affected by the light source.
1) Object Diffuse (1, 1, 1), Light Diffuse (1, 1, 1), Light Ambient (0, 0, 0)
2) Object Diffuse (1, 1, 1), Light Diffuse (1, 1, 1), Light Ambient (0.4, 0.4, 0.4)
3) Object Diffuse (1, 1, 1), Light Diffuse (1, 0.8, 0.6), Light Ambient (0, 0.2, 0.4)
108 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Shadows
Shadows for dynamic objects, such as cars or walking characters, can be
simulated using texture squares.
Such shadow planes are rendered fast, and produce convincing results.
Real-time shadows
Quest3D also supports real-time shadows. The Stencil Shadow channel can be seen
as a Render specialised in calculating shadows. The Stencil Shadow channel
requires a light source position vector to work. 3D Objects may be linked to the
StencilShadow by means of a SoftwareStencilShadowObject.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 109
Light mapping
Real-time shadows require a lot of processing power. Moreover, real-time
shadows are harsh and do not account for ambient lighting (radiosity). To
increase framerate and create smooth lighting and shadows, the light mapping
method can be used.
110 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Light mapping is the process of calculating lighting and shadows once, and
storing the information into a texture. The resulting ‘light maps’ are then applied
on an object on a second texture stage, and blended with the diffuse texture.
In the Object Section, on the ‘Texture Lighting’ tab, a number of settings define
the quality of a Quest3D light map. Renders and lights can be selected, as well as
texture width and height. It is possible to calculate lighting, shadows or both.
Finally, the Anti Aliasing setting controls the smoothness of the lightmap.
Tutorial
Needed templates:
• Scene \ Lights \ Point Light
Step by step:
• Open the scene ‘Lighting and shadows.cgr’. It contains an unlit scene
including a city block and an animated character.
• Drag a Point Light template onto the Channel Graph and connect it to the
‘Animated Character Render’ channel. Note the character is affected by the
light source.
• Make a shortcut of the ‘Point Light’ channel and connect it to the ‘City
Render’ channel. Note the environment is affected by the light source.
• Add a Vector channel and connect it to the ‘Ambient’ child link of the ‘Sun
Light’ channel. Change its values to (0.4, 0.4, 0.4). Note both the character and
the environment appear brighter, as if affected by ambient day light.
• Drag a Render Stencil Shadow channel onto the Channel Graph and connect it
to the ‘Project’ channel.
• Make a shortcut of the position vector of the ‘Sun Light’ channel and connect
it to the ‘Light vector’ child link of the ‘Shadow Renderer’ channel.
• Add a Software Stencil Shadow Object channel and connect it to the ‘Stencil
Shadow Base Object’ child link of the ‘Render Stencil Shadow’ channel.
• Make a shortcut of the ‘Animated Character’ channel and connect it to the
‘Software Stencil Shadow Object’ channel. Note the character object now
casts a shadow onto the environment.
• Go to the Animation Section.
• Move the ‘Animated Character’ object around. Note the shadow is cast from
the position of the sun.
• On the 'Material' tab, set the 'Tex Factor' to '0.75'. Note the light map layer
blends with the texture layer below.
• On the ‘Lighting’ tab, adjust the ‘Width’ and ‘Height to 1024, and set the
‘Anti Aliasing’ to ‘4x’.
• Create the final high resolution light map with these new settings by pressing
the ‘Calculate Lighting’ button. Note that calculation time increases.
• Wait for the light map to be finished, and examine the result.
• Create light maps for the remaining surfaces of the 'Street' object.
Finished scene:
• ..\Tutorials\2.5 – Lighting and shadows\Lighting and shadows –
Complete.cgr
114 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
2.6 Cameras
A camera defines the point of view from which a scene is presented. Choosing the
right camera for a project is important, as it influences the way users experience a
scene in a very direct way. This chapter discusses a number of available camera
templates and general properties.
Animation Camera
An Animation Camera may be used to guide a user through a scene. The animation
camera is similar to a real-life freehand cinematic camera. It may also be the
preferred camera for non-interactive scenes such as visualisations, documentaries
or screensavers.
There might be less immersion using a 3rd person camera. However, the avatar
can be seen as an agent through which the user may interact with the virtual
world. Some users find a 1st person perspective too confronting, and prefer the
‘safety’ of the 3rd person point of view. In some cases, the 3rd person view
provides more overview of the avatar’s environment and position.
Zoom factor
The zoom factor is a quick way to zoom a camera in or out. The default value of
‘1.0’ results in a normal view. A higher Zoom Factor brings the scene closer, a
lower value sets it further away.
Clipping planes
The ‘clipping planes’ of a camera are virtual boundaries between which a scene is
rendered. Polygon surfaces outside of these boundaries are not calculated.
By attaching a Field of View Matrix template to a Camera, it is possible to manually
define the clipping planes. This template allows the field of view angle to be
changed (in degrees). Values of 50 to 90 degrees are standard.
If the clipping planes are positioned, so that there is a smaller amount of
geometry rendered, the performance of the project will increase.
116 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Fog
Fog can be used to blend various elements in a virtual environment together. It
can add to the mood of a scene and suggest depth. A bonus of using fog is that
the far clipping plane of the camera may be decreased to just behind the ‘Fog
End’ value. If used right, this will result in a smooth transition between the scene
and the “nothing” beyond the far clipping plane.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 117
Tutorial
Needed templates:
• Scene \ Cameras \ Object Inspection Camera
Step by step:
• Open the scene ‘Cameras 1.cgr’. This scene contains a car connected to a
render.
• Drag the Object Inspection Camera template onto the Channel Graph. Link the
‘Object Inspection Camera’ to the ‘Render’ channel.
• Go to the Animation Section.
• Make sure the Animation 3D View window displays the scene using the
Project Camera.
• Switch to Run Mode.
• Click and hold the right mouse button and drag the mouse around to orbit
around the car.
• When ready, switch to Edit Mode.
Finished scene:
• ..\Tutorials\2.6 – Cameras\Cameras 1 – Complete.cgr
If you wish, you can save the current channelgroup to your project directory. The
following steps deal with a new scene.
118 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Needed templates:
• Scene \ Camera \ Walkthrough Camera
• Objects \ Collision \ Collision Object
Step by step:
• Open the scene ‘Cameras 2.cgr’. Go to the Channels Section. This scene
contains a city block consisting of a number of buildings, connected to a
render without a camera. Three parts of the city, the ‘Car’,
‘Building_Collision_Objects’ and ‘Street’, are going to be used as collision
objects.
• Switch to Edit Mode.
• Drag in a Collision Object, and connect the ‘Street’ channel to it. Leave the
‘Street’ channel connected to the render.
• Double-click on the Collision Object, and click on ‘Create Tree’. The object will
be calculated.
• Drag a Walkthrough Camera template onto the Channel Graph. Do not
connect it to the ‘Render’ channel yet.
• Link the Collision Object to the last child link of the Fast Collision Response
channel of the Walkthrough Template.
• Create Collision Objects for the Buildings and the Car. Disconnect the
‘Building_Collision_Object’ channel from the ‘Render’, but leave the ‘Car’
channel connected.
• Connect the ‘Walkthrough Camera’ channel to the ‘Render’ channel. Note the
Animation 3D View window is updated and displays the scene from a
different perspective.
• Link the ‘Camera Logic’ channel to the ‘Start3DScene’. If you press Space, the
camera will reset to it’s original position.
• To set the camera’s height, double click on the folder ‘In: Collision Spheroid
Radius’ (this is the second child of the ‘FastCollisionResponse’). This folder
contains a vector. To set the height of the camera, change the Y value into
another value, like 1.9.
• Go to the Animation Section.
• Switch to Run Mode.
• Test the scene by walking through the city using the arrow keys and mouse.
• Press the space bar to reset the camera.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 119
Finished scene:
• ..\Tutorials\2.6 – Camera’s\Camera’s 2 – Complete.cgr
120 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
User input affects an application. The medium through which a user can
communicate with the software is called the interface. Keyboard and mouse are
part of the interface of most applications. The part of the interface on the
computer screen is the Graphic User Interface, or GUI for short.
A Graphic User Interface often appears as a 2D layer on top of the regular scene.
A mouse cursor, various buttons, sliders and input boxes may all part of a GUI.
Head-up Display
Non-interactive elements of the 2D overlay are part of the Head-up Display, or
HUD for short. Examples of HUD elements are score counters, company logo’s,
top down maps of the user’s virtual environment and spinning 3D
representations of the current physical condition of the user’s avatar in a
computer game.
The terms ‘Graphic User Interface’ and Head-up Display’ are sometimes used
synonymously. In the picture above, the Quest3D logo and debug information are
part of the HUD and the RGB values and Rotation option are part of the GUI.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 121
GUI in Quest3D
In Quest3D, the 2D layer on top of the rest of the scene is rendered in a special
way. It is in fact a second 3D scene, rendered through its own camera with a
specific type of projection. GUI textures are made sharp by turning off the anti-
aliasing filter.
Z buffer
Each frame, the entire 3D scene is rendered, followed by the GUI and HUD layer.
In between the Z Buffer is cleared, to prevent the 3D scene from interfering with
the overlay.
Mouse input
Mouse interaction with GUI elements can be monitored using the Mouse Over and
User Input channels.
2D images
Pixel-perfect 2D images can be rendered onto the screen using the Copy image
channel. No matter the screen resolution, the picture is always displayed in the
same absolute amount of pixels. This method produces crystal clear images.
Text
The Text Out channel can be used to quickly write 2D text onto the screen. Debug
information such as framerate and viewport resolution can easily be displayed
using this method.
Templates
A number of ready to use GUI elements can be found in the Templates list.
122 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Tutorial
Graphic user interfaces consist of button and sliders that allow a user to influence
an application. The following tutorial deals with a number of such elements.
Step by step:
• Open the scene ‘Graphic user interface.cgr’. It contains a car object and an
Object Inspection Camera. Note a Quest3D logo image is overlayed on top of
the scene displayed in the Animation 3D View window.
• Create a shortcut of the ‘Checkbox’ channel and connect it to the ‘Mouse
Over Checkbox’ channel.
• Create a shortcut of the ‘Checkbox State’ channel and connect it to
the’Rotation?’ channel, which is part of the Motion of the ‘Car’ object. Note
the ‘Car’ object is located in the ‘3D Scene’ folder.
• Go to the Animation Section.
• On the ‘Camera’ tab, select the ‘GUI Camera’.
• In ‘Move Mode’, lock the Z position.
• On the ‘Object’ tab, select the ‘Quest3D Logo’ object and move it to the lower
right corner of the screen.
• Switch to Run Mode.
• Hold down the right mouse button and drag the mouse to rotate around the
car object.
• Click on the check box to test it. Note the car starts rotating.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 123
Finished scene:
• ..\Tutorials\2.7 – Graphic user interface\Graphic user interface –
Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 125
From simple menu click sounds to full ambient music, audio can really add to a
scene. It helps to set the mood, just as sharp graphics and lively animation can.
The use of spoken voice samples can help users to better understand an
application. Turn off the sound while watching television or playing a computer
game, and you’ll instantly miss the richness of audio.
.Wav format
The Sound File channel is used to store ‘.wav’ samples within Quest3D. Its
properties window contains a number of options including icons to load, play,
stop and pause a sample. As the name suggests, the ‘Repeat’ option allows for
continuous playback.
Speed ranges from 0% to 200%, and volume ranges from 0% to 100%. Both can be
dynamically changed through their respective child links. Panning controls how
the sound is divided between the left and right speaker: 0% means only the left
one is used, 100% means the right one. 50% (default value) plays the sound at
equal levels through both speakers.
126 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Sound Command
The Sound Command channel allows you to control all aspects of a sample, such as
playback and volume. It also allows for loading ‘.wav’ files from harddisk. The
drop-down list presents all the various options. A Sound Command must be called
once to be executed, and affects all its children of the Sound File channel type.
3D positioning
Besides simply playing a sound, it is also possible to place it in 3D space. 3D
Positioned sound requires a Listener channel. It is usually connected to the
location of the virtual camera, and automatically adjusts volume, panning and
frequency by calculating a sound’s relative position and distance. Only Mono
sound samples can be positioned in 3D space. The ‘3D Positioning’ options of the
Sound File channel define the quality of the simulation. Higher quality requires
more cpu power.
‘Silent at 1/* of full volume’ is a cut-off value that was implemented for
performance reasons only. The ‘Half volume every * units’ setting can be seen as
the half life value of a sound. Changing this value allows you to simulate sources
of different sizes. A bee sound for example might have a half life value of 0.01
units, while the volume of a plane halves every 10 units.
The ‘Doppler Factor’ describes the change in pitch when a sound moves away or
towards the listener. The default value of 1.0 produces an effect similar to real
world situations.
The ‘Rolloff Factor’ affects the half life values of all the sounds in a scene. The
default value of 1.0 produces a real world simulation, 0.0 disables roll off
completely, and 2.0 exaggerates the effect.
The ‘Distance Factor’ allows you to compensate for different measuring
systems. If one unit in Quest3D represents one foot in your models, you can enter
0.3048 as the distance factor.
.MP3 format
The ‘.mp3’ format is also supported in Quest3D. The MP3 File channel is used to
store sound samples of this type. Through its properties window it is possbile to
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 127
load a file from disk. The ‘Save File in Channelgroup’ option allows you to store
the sample data inside of the channel itself. This will of course increase the file
size of the channelgroup. The MP3File’s only child may also contain a file name in
the form of a Text channel.
The MP3 Control channel can be used to control playback and volume. It can also
be used to retrieve information on total length and current playing position, and
to skip to a specific position in the sample.
Tutorial
Needed sounds:
• ..\Resources\Sounds\Bird.wav
Needed templates:
• Logic \ Channel Caller
• Logic \ Trigger (x2)
• Input \ UserInput (x2)
• Sound \ Sound File
• Sound \ Sound Command (x2)
• Sound \ Listener
Step by step:
• Open the scene ‘Sound and music.cgr’. It contains a simple 3D scene and a
walkthrough camera.
• Add a Sound Command channel and double click it to open its properties
window. Choose the ‘Play’ command from the dropdown list and press ‘OK’
to accept. Connect the ‘Sound Command’ channel to the ‘Play Sound’
channel.
• Drag a Sound File channel onto the Channel Graph and connect it to the
Sound Command. Double click it to open its properties window. Press the
Load icon , and locate the file ‘Car engine.wav’. Press ‘Open’ to accept.
• Make sure the Animation 3D View window is open.
• Switch to Run Mode.
• Test the scene so far by pressing the ‘Space’ key. Note the Sound Command is
triggered once, and the sound is played.
• Switch to Edit Mode.
• Add another Sound Command channel and connect it to the ‘Stop Sound’
channel. Set this Sound Command to ‘Stop’. Link the Sound Command to the
‘Stop Sound’ channel.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 129
• Connect the original ‘Sound File’ channel to this second Sound Command
channel.
• Double click on the Sound File channel. From the 3D Positioning dropdown
list, select ‘Normal’. Tick the box ‘Repeat’ to play the sound continuously.
• Make a shortcut of the ‘Motion’ channel of the ‘Car’ channel, and connect this
shortcut to the first child link of the Sound File channel. The sound is now
connected to the location of the 3D object.
• Drag a Listener onto the Channel Graph and connect it to the ‘Audio’ channel.
• Make a shortcut of the Motion of the ‘Walkthrough Camera’ channel. Connect
this shortcut to the Listener.
• Make sure the Animation 3D View window displays the scene using the
Project Camera.
• Switch to Run Mode.
• Press ‘P’ to play the sound sample.
• Use the arrow keys to move towards and away from the 3D object. Note how
the volume is affected.
• Use the mouse to rotate your view. Note how the sound pans left and right
based on the relative position of the 3D object to the camera.
Finished scene:
• ..\Tutorials\2.8 – Sound and music\Sound and music – Complete.cgr
130 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
2.9 Landscapes
Virtual outdoor environments can be very rewarding to create and to visit. They
can also become fairly complex rather easily, risking low framerates. This chapter
discusses methods to create landscape scenery and keep them running properly
by offering practical tips for optimisation.
Virtual landscapes are often created as large grid-like surfaces. The height (Y-
value) of the various vertices defines hills and mountains.
Height maps
Most commercial 3D modeling packages such as 3D Studio Max and Maya allow
you to create landscapes either directly or indirectly. A so called greyscale ‘height
map’ can define the Y-value of the vertices that make up the surface: black is the
lowest point, white is the top.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 131
Please refer to the help document of your favorite 3D modeling package for more
information. Keywords: ‘height map’, ‘displace’.
Textures
One or more textures are then applied to the surface. The various ‘texture stages’
may be blended into each another by alpha images.
Multiple passes
Chapter 2.4, ‘Surface properties’, discussed basic Quest3D blending methods. To
accomplish the effect above, and make it compatible with older graphics cards, it
is recommended to use multiple passes. This includes rendering a surface more
than once, and blending these instances by means of transparency.
Sky domes
The sky in a virtual outdoor scene is often represented as a dome.
132 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Lighting
Sunlight may be simulated by using a strong directional light. In addition,
emissive values of all 3D objects in the scene may be increased, suggesting
radiosity (indirect lighting). Light maps and real-time shadows can further
improve an outdoor scene. See Chapter 2.5 for more information on lighting and
shadows.
Fog
Fog can add to a mood and suggest depth. A bonus of using fog is that the far
clipping plane of the camera may be decreased, resulting in higher frame rates.
See Chapter 2.6 on camera’s for further information.
Nature Painting
Many outdoor scenes display an abundance of trees and plants. Quest3D features
an advanced system called ‘Nature Painting’. It allows you to easily add
hundreds of trees and plants to a scene. The Nature Painting system is optimised
for performance and uses the graphics hardware of your computer to render
scenes quickly and efficiently.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 133
The Nature Generator channel is placed between the Surface and 3D ObjectData
channels of an object. It contains the position, rotation and scale of all its
instances, as well as extra information applying to all instances. A collision object
to paint on must be linked to the Nature Generator.
The ‘Nature / Pathfinding’ Section provides easy access to all its functionality.
134 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
The ‘Face camera’ option can produce satisfying results, but uses a fair bit of
processing power. It is recommended to only use it on simple Nature Paint
objects, such as a plane displaying a grass texture.
Templates
Quest3D comes with a number of predefined landscape, tree and plant models.
They can be used directly from the Templates menu.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 135
Tutorial
Needed templates:
• Objects \ Object Data \ Nature Generator
Step by step:
• Open the scene ‘Landscapes.cgr’. It contains a landscape, a grass object ready
for nature painting and a tree model. It also contains a 3D skydome and a
walkthrough camera.
• Go to the Object Section.
• Click on the ‘Landscape’ object from the list to select it.
• Click on the ‘Dirt Layer’ surface from the list to select it.
• Go to the ‘Texture Stages’ tab on the right side of the screen.
• Make sure ‘Stage 1’ is selected.
• Go to the ‘Textures’ tab on the right side of the screen. Note the currently
used texture is highlighted. Double click on this texture to bring up its
properties window.
• Press the ‘Load’ button and locate the ‘..\Resources\Textures\Landscapes\’
folder. It contains a number of terrain type textures. Choose a dirt variant,
and press ‘Open’ to accept. Note the new image is displayed in the preview
window. Press ‘OK’ to close the Texture window.
• Click on the ‘Grass Layer’ surface from the list to select it.
• Select ‘Stage 1’ on the ‘Texture Stages’ tab.
On the ‘Textures’ tab, double click on the highlighted texture to bring up its
properties window.
• Press the ‘Load’ button and from the directory, choose a grass variant. Press
‘Open’ to accept. Note the new image is displayed in the preview window.
Press ‘OK’ to close the Texture window.
• Select ‘Stage 2’ on the ‘Texture Stages’ tab.
On the ‘Textures’ tab, double click on this texture to bring up its properties
window.
• Press the ‘Load Alpha’ button and from the directory choose an ‘Alpha’
texture. Press ‘Open’ to accept. Press ‘OK’ to close the Texture window.
• Go to the ‘Surface’ tab on the left side of the screen.
136 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Select the ‘Alpha Texture’ transparancy option. Note the two texture layers of
the landscape are blended with each other now.
• Select and delete the link between the ‘3D Object Data’ and ‘Tree Leaves’
channels.
• Add a Nature Generator channel and connect it to the ‘Tree Leaves’ channel.
Rename it ‘Tree Leaves Nature Generator’.
• Connect the ‘3D Object Data’ channel to the ‘Tree Leaves Nature Generator’
channel.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 137
• Make a shortcut of the ‘Collision Object’ channel linked to the ‘Grass Nature
Generator’ channel and connect it to the ‘Collsion Object’ child link of the
‘Tree Leaves Nature Generator’ channel. The ‘Tree’ object is now ready for
painting.
• Go to the Nature / Pathfinding tab.
• Click on the ‘Tree Leaves Nature Generator’ object to select it.
• Press and hold the control key and click on the ‘Tree Trunk Nature
Generator’ object to add it to the selection.
• Click on the ‘Paint Mode’ button.
• In the ‘Paint sizing options’ menu, set the ‘randX’, ‘randY’ and ‘randZ’ values
to 0.5. Place a few trees. Note how they vary in size.
• Select the ‘Area’ option, set the ‘Size’ to 250 and the ‘Density’ to 15%. Place a
few more trees with a single click.
• Press the ‘Paint Mode’ button again to exit.
• Go to the Animation Section.
• Make sure the Animation 3D View displays the scene using the Project
Camera.
• Switch to Run Mode.
• Test the scene by walking through the landscape using the arrow keys and
mouse.
Finished scene:
• ..\Tutorials\2.9 – Landscapes\Landscapes – Complete.cgr
138 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Many special effects in movies and games, such as fire, smoke, explosions and all
kinds of magical effects, have one thing in common: they are all created using so
called ‘particle systems’.
Motion
For every particle in the system, the position, rotation and size is stored. In
addition, other attributes such as speed, color and transparency may be used.
Forces such as gravity may be applied to all particles in the system.
Emitters
Particles are released from an emitter. In Quest3D, this is in the form of an 3D
Object Data channel. The particle system cycles through all of the vertices in the
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 139
object and constantly emits a particle from one of these positions. By randomly
placing a number of vertices in 3D space, it appears as if the particles are released
randomly as well. This produces convincing results for special effects such as fire
and smoke.
Surface properties
The looks of a particle system are defined by the diffuse and alpha textures used
on the square objects. See Chapter 2.4 for more information of Surface properties
and blending methods.
Types
Quest3D comes with two particle systems. The Particle Object channel is the
compact variant, and can be used for simple effects such as fire.
The advanced particle system consists of a number of channels and can be used to
for example simulate smoke that stays within a collision object.
The advanced particle system allows for greater control of attributes such as
speed, rotation, size and color. Envelopes describing the desired functions may be
connected to the Particle Emitter channel. The ‘Advanced Function Base’ Value is
used as index for each of these Envelopes.
Reference Manual
The various channels of the advanced particle system are described in greater
detail in the Quest3D Reference Manual.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 141
Tutorial
Needed templates:
• Objects \ Particles \ Simple \ Small Fire
• Objects \ Particles \ Advanced \ Smoke
• Objects \ Particles \ Helpers \ Particle Flow Grid
• Objects \ Collision \ Collision Object
• Variables \ Value \ Value
• Variables \ Vector \ Vector with Envelopes
Step by step:
• Open the scene ‘Particle systems.cgr’. It contains a dome object environment
and an invisible, smaller collision object.
• Drag a Small Fire template onto the Channel Graph and connect it to the
‘Render Scene’ channel. Note the fire effect is instantly visible in the
Animation 3D View window.
• Add a Smoke template and connect it to the ‘Render Scene’ channel. Note the
smoke effect is instantly visible in the Animation 3D View window. Also
note the smoke particles move freely through the surfaces of the
environment.
• Change the Y-value of the position vector to ‘1.0’.
• Drag a Particle Flow Grid channel onto the Channel Graph and connect it to
the ‘Particle Emitter’ channel of the ‘Smoke’ object.
• Add a Collision Object channel and connect it to the ‘Particle Flow Grid’
channel.
• Connect the ‘Interior Collision Object’ channel to the Collision Object channel.
• Double click on the ‘Particle Flow Grid’ channel to open its properties
window. Fill in ‘10’ for the ‘x’, ‘y’ and ‘z’ components of the ‘Resolution’.
Select the ‘Show Grid’ option and press the ‘Generate Grid’ button. Note a
grid is displayed in the Animation 3D View window (when the ‘Dynamic
objects’ option is on’). Press ‘OK’ to accept.
• Double click on the ‘Particle Emitter’ channel to open its properties window.
On the ‘Grid’ tab, select the ‘Particles Are Affected By Grid’ option. Note the
smoke particles in the Animation 3D View are affected by the grid. Press
‘OK’ to accept.
142 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Drag a Value channel onto the Channel Graph and connect it to the
‘Advanced Function Base’ child link of the ‘Particle Emitter’ channel. Rename
the Value to ‘Advanced Function Base’.
• Add a Vector (using envelopes) template and connect it to the ‘Particle Color
Function’ child link of the ‘Particle Emitter’ channel. Rename the Envelopes to
‘Red’, ‘Green’ and ‘Blue’, respectively.
• Create a shortcut of the ‘Advanced Function Base’ channel and connect it to
each of the three Envelopes you just added.
• Double click on the ‘Red’ Envelope to open the properties window. Add a key
at position (0, 0.5) and press ‘OK’ to accept.
• Double click on the ‘Green’ Envelope to open the properties window. Add a
key at position (0, 0.5) and press ‘OK’ to accept.
• Double click on the ‘Green’ Envelope to open the properties window. Add a
key at position (0, 0.5). Also add a key at position (50, 0) and press ‘OK’ to
accept. Note that the particles will turn blue during their individual lifetimes.
Finished scene:
• ..\Tutorials\2.10 – Particle systems\Particle systems – Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 143
Humans and animals don’t simply slide when they move. Instead they use
various parts of their body independently of each other. But rather than a
collection of seperate limbs, these are all moving in relation to one another. When
one of the limbs is moved, the skin stetches along with it.
Virtual skeletons
3D models can be set up to behave in a similar manner. The polygon surface of
the model can be seen as the skin. A virtual skeleton can be used to animate
various parts of this skin seperately. Practically speaking, each of the vertices of a
3D model must be linked to the appropriate bones of a virtual skeleton.
Advanced modeling software packages such as 3D Studio Max ship with pre-
made virtual skeletons. These can be linked directly to your own character, or
adjusted and expanded if needed. Please refer to the manual of your favorite
modeling program to learn more about working with virtual skeletons.
Keywords: ‘bone’, ‘animation’, ‘biped’.
144 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
The Skinned Character channel is placed between the Surface and the 3D Object
Data channel. It contains the definition of the virtual skeleton, and information on
how the 3D model is connected to the virtual skeleton.
The Motionset channel contains all bone animation data in the form of keyframes
for position, rotation and scale.
The animation can be played by linking a value to the first child link of the
Motionset (for example, a TimerValue).
Switching Motionsets
Characters in a scene are likely to have more than one animation. At any given
point in time, they may stand still, walk, run or use an object for example. One
approach to alter between animations is to use a Channel Switch. Based on an
index value, one of the Motionsets is selected.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 145
Motionset Blender
The solution above results in harsh transitions. To make animations transition
more smoothly, the Motionset Blender can be used. This channel accepts two
Motionsets and one Value. This value defines how much of the two sets is
displayed. A value of 0 means only the first Motionset is used, while a value of 1
means only the second is used. A value between 0 and 1 effectively blends both
sets through linear interpolation.
The image below shows 100% walk, 50% walk and sit, and 100% sitting
respectively.
146 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
The blend value of a Motionset Blender can be derived from any kind of
information used elsewhere in a Quest3D program. Envelope channels can be used
to convert any value to the required range of 0 to 1. Example blend values include
User Input and object speed.
Value Damping
A compact and inexpensive way to animate the transition from 0 to 1 and vice
versa is by using a Value Damping channel.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 147
Tutorial
The following exercise explains importing character animation into Quest3D. It
also describes motionset blending.
Needed .X files:
• ..\Resources\Characters\Animated character – Idle.X
• ..\Resources\Characters\Animated character – Walk.X
Needed templates:
• Scene \ Start 3D Scene
• Scene \ Render Camera Light
• Timing \ TimerValue
• 3D Items \ Object Data \ Motionset Blender
• Variables \ Value \ Value Damping
• Logic \ User Input \ User Input
Step by step:
• From the File Menu, choose ‘Import’.
• Locate the file ‘..\Resources\Characters\Animated character – Idle.X’ and
press ‘Open’.
• Use ‘Character animation 1’ as Pool name, and press ‘OK’ to confirm.
• In the ‘X Object Importer Options’ window, choose ‘Load as indexed
character’, and press ‘OK’ to accept. The 3D character model is imported into
Quest3D.
148 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Finished scene:
• ..\Tutorials\2.11 – Character animation\Character animation 1 – Complete.cgr
If you wish, you can save the current channel group to your project directory. The
following steps deal with a new scene.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 151
Needed .X files:
• ..\Resources\Characters\Animated character – Idle.X
• ..\Resources\Characters\Animated character – Walk.X
• ..\Resources\Characters\Animated character – Run.X
Needed templates:
• Variables \ Value \ Value Damping
• Variables \ Value \ Envelope (x2)
Step by step:
• Open the file, ‘Character animation 2.cgr’. It contains a simple scene, a
character with multiple animations, and a 3rd person camera.
• Go to the Animation Section.
• Make sure the Animation 3D View displays the scene using the Project
Camera .
• Switch to Run Mode.
• By using the arrow keys and the mouse, move the character through the
scene. Note the camera stays behind the character. Note the character doesn’t
animate properly yet and only displays its idle sequence.
• Switch to Edit Mode.
• Go to the Channels Section.
• Drag a Value Damping template onto the Channel Graph and link it to the
‘Motionset Blender’ channel connecting the ‘Idle’ and ‘Walk’ channels.
• Add an Envelope channel and connect it to the ‘Value Damping’ channel.
• Make a shortcut of the ‘Character Speed’ channel (part of the Collision
Response system) and connect it to the Envelope.
• Double click on the Envelope. Add a point at (0, 0). This point means that
when the character speed (input) is 0, the Motionset Blender will fully use the
‘Idle’ animation.
• Add a point at (0.02,1), meaning that when the character speed is 0.02, the
Motionset Blender will fully use the ‘Walk’ animation. A speed between 0 and
0.02 will result in a blend of 0 to 1 between the ‘Idle’ and ‘Walk’ animations.
• Release the arrow up key. Note how the ‘Character Speed’ channel changes
in value. Note the character animation blends from ‘Walk’ to ‘Idle’.
• Switch to Edit Mode.
• Add another Envelope and link it to the Value Damping channel connected to
the Motionset Blender binding the ‘Walk’ and ‘Run’ channels.
• Make another shortcut of the ‘Character Speed’ channel and connect it to this
new Envelope.
• Double click on the Envelope. Add points at (0.25, 0) and (0.5, 1).
• Go to the Animation Section.
• Switch to Run Mode.
• Test the scene by pressing the arrow up key. Note the character starts
walking.
• Press and hold both the arrow up key and the shift key. Note the speed is
increased and the character starts running.
Finished scene:
• ..\Tutorials\2.11 – Character animation\Character animation 2 – Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 153
3.1 Logic
Examples of logic:
• An object that is or is not displayed on screen.
• A door that opens by pressing a key.
• A music sample triggered on a timed event.
• A current application screen based on a menu selection.
Channel Caller
As their name implies, Channel Callers simply call the channels linked to them.
They are used to add structure to a project. Channel Callers can be seen as
dividers, or even ‘chapters’ in a Quest3D program.
If
Just like the Channel Caller, the If channel calls its children. The If channel only
calls its children, however, if a certain condition is met. This condition can be
linked to the first child link square of the Ifchannel, and must be a value. Only if
the value is not ‘0’ (the condition is ‘true’), the channel connected to the Ifchannel
is called.
If Else
The IfElse channel is similar to the Ifchannel. If the attached condition is not met
(i.e. the value equals ‘0’), the channel connected to the third child link is called. If
the condition is met the channel connected to the second child link is called.
Triggers
Trigger channels work in a way similar to Ifchannels. Triggers also call their
children based on a condition.
156 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
First, when a condition is met, Triggers only execute their children once. For a
Trigger to activate again, the condition will first have to become false, and then
true again. Example: a trigger is set off by pressing the spacebar. To set it off a
again, the spacebar must first be released, then pressed once more.
The second difference concerns the input for the condition. Besides in the form of
a ‘0’ or ‘1’, it can also be one of the other options listed in the properties window:
User Input
The User Input channel can register activity from a number of sources such as
keyboard and mouse. In Quest3D, user input results in one of three types:
User input can serve as condition value for both If(Else) and Trigger channels.
Any key on the keyboard can be ‘binded’ to a User Input channel through its
properties window. After clicking the ‘Capture a key to use’ button, press the key
of your choice. In a similar way, any mouse or joystick button and movement can
be registered.
Channel Switches
Channel Switches allow you to choose between different channels of almost any
type. A Channel Switch must fist be set to the same base type as its children.
158 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Next, its first child defines which of the linked versions is used: a value of ‘0’
results in the first variant being used, ‘1’ in the second, etc.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 159
Tutorial
Logic in Quest3D defines the flowchart of your project. This tutorial is an exercise
in structuring a program using Channel Callers, and in working with conditions.
Conditions serve as input for Ifand Trigger channels.
After completing this tutorial, you should have a better understanding of logic in
Quest3D.
Needed templates:
• 3D Items \ Start 3D Scene
• Logic \ Channel Caller (x6)
• Logic \ if
• Logic \ Trigger
• Input \ Input: Arrow left
• Input \ Input: Arrow right
• Scene \ Render, Camera, Light
• 3D Items \ Box
Step by step:
• Drag the Start 3D Scene onto the Channel Graph. Right-click it and choose
‘Set as start channel’.
• Add a Channel Caller and connect it to the ‘Start 3D Scene’ channel.
• Rename this Channel Caller to ‘Program’.
• Drag five more Channel Callers onto the Channel Graph. Rename them as
follows: ‘Logic’, ‘User Interface’, ‘3D Scenes’, ‘Scene 1’ and ‘Scene 2’.
• Think about a logical structure and connect these five Channel Callers to your
program.
• When ready, examine the channel structure in the image below to see if your
own solution looks similar.
160 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Currently, ‘Scene 1’ and ‘Scene 2’ are both called. The following steps will add
logic to displaye one or the other, based on keyboard input.
• Disconnect the link between the ‘Scene 1’ and ‘3D Scenes’ channels.
• Add an Ifchannel and connect it to the second child link of the ‘3D Scenes’
channel.
• Connect the ‘Scene 1’ channel to the second child link of the ‘if’ channel. Note
the ‘Scene 1’ channel is not called actively (no blue line is visible).
• Drag a Value onto the Channel Graph and connect it to the first child of the
‘if’ channel. This Value will be the condition for the if.
• Change the value of this Value channel to ‘1’. Note the ‘Scene 1’ channel is
called actively.
• Change the value of the Value channel back to ‘0’. Note the ‘Scene 1’ channel
is no longer called.
• Select the ‘Value’ channel and delete it.
• Add a User Input channel and connect it to the first child link of the ‘if’
channel. The current channel structure should look similar to the one in the
image below.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 161
• Double click on the ‘User Input’ channel to open its properties. Click on the
‘Capture a key to use button’ and press the ‘1’ key to bind it. Press the ‘OK’
buttont to accept.
• Switch to Run Mode by pressing the button.
• Press and hold the ‘1’ key. Note the ‘Scene 1’ channel is called.
• Release the ‘1’ key. Note the ‘Scene 1’ channel is no longer called.
• Switch to Edit Mode.
• Select and delete the ‘if’ channel.
• Select and delete the link between the ‘Scene 2’ and ‘3D Scenes’ channels.
• Drag an IfElse channel onto the Channel Graph and connect it to the ‘3D
Scenes’ channel.
• Connect the ‘User Input’ channel to the first child link of the ‘If Else’ channel.
• Connect the ‘Scene 1’ channel to the second child link of the ‘If Else’ channel.
Note the ‘Scene 1’ channel is not called.
• Connect the ‘Scene 2’ channel to the third child link of the ‘If Else’ channel.
Note the ‘Scene 2’ channel is called. The current channel structure should
look similar to the one in the image below.
162 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Double click on the ‘Channel Switch’ channel to open its properties window.
From the list, select ‘Channel Caller’ and press the ‘Set’ button. Press ‘OK’ to
accept.
• Add a Value channel and connect it to the first child link of the ‘Channel
Switch’ channel. Rename the Value to ‘Current Scene’.
• Drag a Channel Caller onto the Channel Graph and connect it to the second
child link of the ‘Channel Switch’ channel. Rename this Channel Caller to
‘Menu’. Note the ‘Menu’ channel is currently called.
• Connect the ‘Scene 1’ channel to the third child link of the ‘Channel Switch’
channel.
• Connect the ‘Scene 2’ channel to the fourth child link of the ‘Channel Switch’
channel.
• Change the value of the ‘Current Scene’ to ‘1’. Note the ‘Scene 1’ channel is
called.
• Change the value of the ‘Current Scene’ to ‘2’. Note the ‘Scene 2’ channel is
called.
Finished scene:
• ..\Tutorials\3.1 – Logic\Logic – Complete.cgr
164 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
3.2 Math
Values are at the heart of any Quest3D project. They are used to define an object’s
color, position and size for example. Values can also describe scores, program
settings, menu option etc.
Values in a Quest3D project often change. Regular math can be used to calculate
new values.
Set Value
The following statement describes a standard expression in regular math.
To copy one value into one another, the Set Value channel is used.
In most practical cases Set Value channels need to be carried out only once.
Therefore, they are often called by Trigger channels.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 165
Expression Value
Mathematical expressions can be described in Quest3D using the Expression Value
channel. It serves as an advanced calculator. Its properties window contains a box
for the actual formula, and help text describing all the usuable variables and
operators. The Reference Manual explains each of these elements in greater detail.
The actual value of an Expression Value is equal to the result of the expression
inside of the channel. This result is also displayed under ‘Current Value’ in the
properties window.
166 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Brackets ( ) can be used to define priority of one part of the expression over the
other. The two expressions in the image below are not the same and therefor do
not produce the same result.
Values connected to the child links of the Expression Value can be used as part of
the expression within the channel as well. The first child is presented by the letter
‘A’, the second by the letter ‘B’, and so forth.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 167
The Expression Value channel can be named after its expression by choosing the
‘Rename Channel to formula’ option in the properties window.
Expression Values can also serve as condition input for If and Trigger channels. In
the image below, the structure should be read as ‘if A equals B then execute the
following channels’.
168 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Multiple expressions can be linked to oneanother within the same channel using
the logical operators AND ( && ) and OR ( || ).
In the image above, the condition is met if ‘A==1 && B==2’. The expression
should be read as, ‘if A equals one and B equals two’.
Expressions can also contain conditions in the form of If Else statements. In the
image below, the expression ‘A==B ? C : D’ should be read as ‘if A equals B then
the result is C else the result is D’.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 169
In the image on the right, the condition ‘A==B’ is met. The result of the
expression is the value of ‘C’.
Envelopes
Besides playing an important role in animation, Envelopes have other uses as well.
The envelope graph in the image above shows the formula ‘y = x²’.
The graph in the image above limits input values to output values between ‘-1’
and ‘1’.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 171
Tutorial
Math is an important aspect of many Quest3D programs. This tutorial is an
exercise in working with the following channels: Value, Set Value, Expression Value
and Envelope.
Needed templates:
• Variables \ Value \ Set Value
• Variables \ Value \ Expression Value
• Variables \ Value \ Value
•
Step by step:
• Open the scene, ‘Math.cgr’. It contains a simple logic structure.
• Drag a Set Value channel onto the Channel Graph and connect it to the
second child link of the Trigger.
• Add a Value channel and connect it to the first child link of the ‘Set Value’
channel.
• Change the value of this Value channel to ‘1’.
• Drag another Value channel onto the Channel Graph and connect it to the
second child link of the ‘Set Value’ channel. Rename this Value to ‘Current
Value’.
172 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Drag a Value channel onto the Channel Graph and change its value to ‘3’.
Connect it to the ‘Expression Value’ channel.
• Double click on the ‘Expression Value’ channel to open its properties
window.
• In the ‘Expression’ field, enter ‘A’, referring to the Value attached as a child.
Note that the ‘Current Value’ now equals ‘3’. Also, the value of the
‘Expression Value’ channel is ‘3’.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 173
• Select and delete the Value channel connected to the first child link of the ‘Set
Value’ channel.
• Add another Expression Value channel and connect it to the first child link of
the ‘Set Value’ channel.
• Connect the ‘Current Value’ channel to this ‘Expression Value’ channel.
• Double click on the ‘Expression Value’ channel to open its properties
window. In the ‘Expression’ field, type in the following formula: ‘A + 1’.
• Select the ‘Rename Channel to formula’ option and press ‘OK’ to accept.
Finished scene:
• ..\Tutorials\3.2 – Math\Math – Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 175
Many objects in a scene share one or more attributes with one another. During the
design phase of a project, it is recommended to consider which groups of objects
can be distiguished.
For example, consider an application that allows the user to decorate his or her
virtual home. The various types of furniture available might look differently from
one another, but they are all 3D objects. More over, the user might be able to
move, rotate and scale each of these types and place them into the virtual scene.
These attributes are shared by the group ‘furniture’.
For Loop
Just like many other programming languages, Quest3D features a so called ‘For
Loop’ function. A For Loop executes a specific part of a program a number of
times each frame. Only when all ‘iterations’ of a For Loop have been executed will
the program continue to the next part.
176 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
In the image on the previous page, ‘Part 1’ is processed first. Next, ‘Part 2’ is
executed 10 times by the For Loop function. Finally, the program moves on to
‘Part 3’.
A driving simulation might require fifty cars in a scene. Instead of having fifty
seperate car objects, using a For Loop allows you to create a single car object and
render it fifty times, with differences in position, shape, color and even handling.
The ‘Max Iterations’ child of a For Loop channel defines the total number of times
the subprogram is carried out. The ‘Current Iteration’ Value can be used to create
variations in the various instances in the ForLoop. A simple example is varying
the X coordinate per object instance.
Expressions
The relation between the ‘Current Iteration’ and the ‘Max Iterations’ Values can be
used as well. In the image below, the Expression Value ‘(A+1) / B’ results in a
gradient from ‘0.2’ to ‘1.0’.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 179
Rendering scenes
It is good practice to keep the number of channels in a For Loop routine as small
as possible. Instead of calling a Render complete with Camera and Lights multiple
times per frame, it is better to only loop the objects themselves.
180 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
In the image above, the Camera and Light are called once just prior to the For
Loop. The objects are called mulitple times, with variations based on the ‘Current
Iteration’ Value. Finally, the Light is called one more time to switch it off, so it will
not influence other renders.
Tutorial
This tutorial uses a For Loop structure to render a number of cars on screen.
Needed templates:
• Scene \ Start 3D Scene
• Logic \ Channel Caller
• Scene \ Cameras \ Object Inspection Camera
• Scene \ Light \ Point Light
• Logic \ For Loop
• 3D Models \ Car
• Variables \ Value \ Expression Value (x2)
Step by step:
• Start a new project.
• Drag a Start 3D Scene onto the Channel Graph. Right click on this ‘Start 3D
Scene’ channel and choose ‘Set as start channel’.
• Add a Channel Caller and rename it to ‘Scene’. Connect it to the ‘Start 3D
Scene’ channel.
• Drag an Object Inspection Camera template onto the Channel Graph and
connect it to the ‘Scene’ channel.
• Close the Animation 3D View window by pressing the ‘Groups’ tab.
• Add a Point Light template and connect it to the ‘Scene’ channel.
• Drag a ForLoop template onto the Channel Graph and connect it to the ‘Scene’
channel.
• Change the value of the ‘Max Iterations’ channel to ‘5’.
• Add a Car template and connect it to the For Loop channel.
• Make a shortcut of the Point Light channel and connect it to the ‘Scene’
channel. The light will now be switched off after rendering each frame so it
will not affect other renders.
182 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Press the ‘Animation 3D View’ tab to examine the scene so far. Note only one
car is visible.
• Delete the ‘Val X’ channel of the car’s ‘Position’ Vector.
• Drag an Expression Value onto the template and connect it to the first (free)
child link of the ‘Position’ channel.
• Make a shortcut of the ‘Current Iteration’ channel and connect it to the
‘Expression Value’ channel.
• Double click on the ‘Expression Value’ channel and type in the formula, ‘A *
3’. Select the ‘Rename Channel to formula’ option an press ‘OK’ to accept.
• Right click on the ‘A * 3’ channel and choose ‘General Properties’. In the
properties window, select the ‘Continuous’ option. This channel will be
updated multiple times per frame now. Press ‘OK’ to accept.
• Also set the ‘Position’, the ‘Motion’ and the ‘Car’ channels to ‘Continuous’
update. Note that all these channels need to be updated for every instance in
the For Loop. Note after the last is set to ‘Continuous’, five cars are displayed
in the Animation 3D View window.
• From the car’s ‘Car 1’ surface, delete the ‘R’ Value of the ‘Emissive’ Vector.
• Add an Expression Value and rename it to ‘Gradient’. Connect it to the first
(free) child link of the ‘Emissive’ channel. Note the color of the cars changes.
• Make a shortcut of the ‘Current Iteration’ channel and connect it to the
‘Gradient’ channel.
• Make a shortcut of the ‘Max Iterations’ channel and connect it to the second
child link of the ‘Gradient’ channel.
• Set the ‘Gradient’ channel and the ‘Emissive’ and ‘Material’ channels above it
to ‘Continuous’ udate.
• Double click on the ‘Gradient’ channel and type in the formula, ‘(A+1) / B’.
Press ‘OK’ to accept. Note the colors of the cars change, from turquoise to
light grey.
184 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Finished scene:
• ..\Tutorials\3.2 – Advanced logic\Advanced logic – Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 185
3.4 Arrays
Variables can store specific types of information. The most often used types of
variables in Quest3D are value, vector, matrix and text. They can all contain a
single instance of their type. A Value channel for example, can store exactly one
value.
Tables
Arrays in Quest3D are always part of a table. Array Table channels need to be
called at least once in a project to initialise. Calling an Array Table continously has
no negative effect on a Quest3D program – it is still initialised only once.
The properties window of the Array Table channel allows for adding and
configuring columns.
186 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Column names can be changed at any time – they are only used as labels.
Two arrays with the same name are not joined. Avoid duplicate names
at all times to avoid problems.
The ‘Move Up’ and ‘Move Down’ buttons affect the order in which the columns
are listed, in both the properties window of the Array Table and the Array
Manager window (described later in this chapter).
Data types
Array columns can store data of several types. Apart from the variable types
mentioned above (value, vector, matrix and text), it is also possible to create an
array of virtually any channel in Quest3D. These are defined by selecting a type
from the ‘Array Channel’ drop-down list.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 187
The properties window of the several Array channels is used to specify which
table and which column a reference should access. Note that the table column for
an Array Channel can be set only once, because of its Channel Switch-like nature.
Setting Arrays
To store a value in an array, the ‘Set’ operator of the appropriate type is used. By
linking an index value, the desired record inside the array is specified.
Note that the Array Channel has two child link squares. The first is the index
value. The second can be used to connect a channel of the appropriate type to. Its
children will then be passed along to the Array Channel.
188 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Array Manager
The Array Manager in Quest3D shows the content of all arrays in a project, per
table. It can be accessed by pressing the ‘Array Manager’ tab in the Channels and
Animation Sections, or by switching to the Arrays Section.
One square in the Array Manager is called a record or a field. Records of type
value allow for direct input. Records of type text can be edited either directly
(click once on the ‘T’ icon), or through the properties window (double click on th
‘T’ icon).
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 189
Clicking on other fields will open a properties window of the appropriate type, if
it is available for that channel type.
The order of the columns can be changed in the properties menu of the
appropriate Array Table channel. Clicking the ‘Update Once’ button will refresh
all displayed columns. Enabling the ‘Auto Update’ option will result in a constant
refresh.
For Loops
A combination of a For Loop and an array channel is very powerful. The ‘Current
Iteration’ Value is used as index for the arrays.
190 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Tutorial
Arrays can contain large amounts of data. This exercise shows how the
information in an array is stored and accessed.
Needed templates:
• Variables \ Arrays \ Array Value
• Variables \ Value \ Value
Step by step:
• Open the scene ‘Arrays 1.cgr’. It contains a single text object.
• Make sure the scene is displayed in the Animation 3D View window using
the Project Camera.
• Drag an Array Table onto the Channel Graph. And connect it to the ‘Main’
channel. Double click on the Array Table channel to open its properties
window.
• Rename the table to ‘Menu’.
• Create a new column by pressing the ‘Add’ button.
• Select the column and rename it to ‘Options’.
• Select the ‘Array Text’ radio button and press the ‘Set’ button to commit.
• Select the ‘Rename channel to table name’ option and press ‘OK’ to accept.
• Add an Array Text channel. Double click it to open its properties window.
• From the ‘Table’ drop-down list, select ‘Menu’.
• From the ‘Column’ drop-down list, select ‘Options’.
• Select the ‘Update channel name’ option and press ‘OK’ to accept. The
channel is now set up as a reference to the correct table and column.
• Press the “Array Manager’ tab.
192 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Note there is a table called ‘Menu’, which includes a column called ‘Options’.
• In the first field (row ‘0’) of the ‘Options’ column, type in ‘Option 1’.
• Press the ‘New’ button to create a new record. Type in ‘Option 2’ in row ‘1’.
• Add two more records, called “Option 3’ and ‘Option 4’.
Finished scene:
• ..\Tutorials\3.4 – Arrays\Arrays 1 – Complete.cgr
If you wish, you can save the current channelgroup to your project directory. The
following steps deal with a new scene.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 193
Needed templates:
• Variables \ Value \ Array Value
• Variables \ Matrix \ Set Matrix
• 3D Items \ Null Object
• Variables \ Matrix \ Array Matrix
Step by step:
• Open the scene ‘Arrays 2.cgr’. It contains a number of primitive objects and a
partially configured table.
• Drag an Array Value onto the Channel Graph. Double click it to open its
properties window.
• From the ‘Table’ drop-down list, select ‘Objects’.
• From the ‘Column’ drop-down list, select ‘Type’.
• Select the ‘Update channel name’ option and press ‘OK’ to accept.
• Connect the ‘Objects: Type’ channel to the first child link of the ‘Object Type
Switch’ channel.
• Make a shortcut of the ‘Current Iteration’ channel and connect it to the
‘Objects: Type’ channel.
• Right click on the ‘Object: Type’ channel and choose ‘General Properties’. In
the properties window, select the ‘Continuous’ update option. Press ‘OK’ to
accept.
• Make sure the Animation 3D View window is open and displays the scene
using the Project Camera.
• Press the ‘Array Manager’ tab. Note the two columns in the ‘Objects’ table,
‘Motion’ and ‘Type’.
• Enter ‘1’ in the first field (Row 0) in the ‘Object Type’ column. Note one of the
primitive objects in the Animation 3D View window changes shape.
• Enter ‘2’ in the second field (Row 1) in the ‘Type’ column. Note one of the
objects changes shape.
• Fill in values for the other two records as you see fit. (Note: ‘0’ = Box, ‘1’ =
Sphere, ‘2’ = Cylinder, ‘3’ = Cone).
• Press the ‘Channel Graph’ tab.
• Drag an Array Matrix onto the Channel Graph and connect it to the Set Matrix
channel. Double click it to open its properties window.
• From the ‘Table’ drop-down list, select ‘Objects’.
• From the ‘Column’ drop-down list, select ‘Motion’.
• Select the ‘Update channel name’ option and press ‘OK’ to accept.
194 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Add a Value and connect it to the ‘Objects: Motion’ Array channel you just
created. Rename the Value to ‘Current Object’.
Finished scene:
• ..\Tutorials\3.4 – Arrays\Arrays 2 – Complete.cgr
196 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Multiple channel groups are linked together by special types of channels: ‘Public
Channels’ and ‘Public Call Channels’.
Public Channels
Public Channels are channels that can be called from external channel groups.
They are colored red in QueSst3D.
Channels of any base type may be converted into Public Callers. The most often
used types are: Channel Caller, Value, Vector, Matrix, 3D Object, Camera and Light.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 197
Where ever possible, use Public Callers of these types for ease of use and memory
management purposes.
Channels can also be converted into Public Callers manually by selecting ‘Public
Channel Functions > Make Channel Public’ from the context menu. Alternatively,
the ‘P’ key may be pressed.
The context menu also provides an option to manually create Public Call
Channels: ‘Public Channel Functions > Convert to Public Call Channel’.
198 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Functions
Functions are subprograms that may be called using parameters. A type of Public
Caller, they are also colored red in Quest3D.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 199
Parameters are data used as input for functions. They are colored green in
Quest3D.
Public Channels with Parameter children result in Public Call Channels with
child links of the appropriate type.
Functions may be called as often as needed. Each instance may be supplied with
different parameters, thereby creating variation.
Channel Switches
Functions of type Channel Switch must include an extra Value channel before a
Parameter for the ‘Selector’ child linked can be connected. This is a result of the
nature of the Channel Switch.
200 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
For Loops
Functions may also be called inside a For Loop structure. Arrays may be linked as
parameters to create even more powerful routines.
Tutorial
Needed templates:
• Variables \ Value \ Value
Step by step:
• Open the scene ‘Multiple channel groups.cgr’. It contains a simple project
structure.
• From the Applications Menu, choose ‘File > Import...’. Locate the file ‘3D
scene render.cgr’ in the directory specified above and press ‘Open’ to accept.
As pool name, use ‘3D scene render’. The file contains a simple scene
including Render, Camera and Light channels.
• Click on the ‘Groups’ tab.
• From the ‘Groups’ tab, drag the pool name ‘Multiple channel groups’ onto
the upper Channel Graph.
• From the ‘Groups’ tab, drag the pool name ‘3D scene render’ onto the lower
Channel Graph.
• Connect the ‘3D Scene Render’ channel in the lower Channel Graph to the
‘3D Scene’ channel in the upper Channel Graph. Note the ‘3D Scene Render’
channel in the lower Channel Graph turns red, and the channels below are
actively called (light blue outline). Note in the upper Channel Graph a blue
channel is created, connected to the ‘3D Scene’ channel.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 203
• Import the file ‘Car.cgr’ from the directory specified above. As pool name,
use ‘Car’. The file contains a car model.
• From the ‘Groups’ tab, drag the pool name ‘3D scene render’ onto the upper
Channel Graph.
• From the ‘Groups’ tab, drag the pool name ‘Car’ onto the lower Channel
Graph.
• Connect the ‘Car’ channel in the lower Channel Graph to the ‘Render’
channel in the upper Channel Graph.
• Click on the ‘’Animation 3D View’ tab. Note a car model is displayed in the
preview window.
• Right click on the ‘Current Car Texture’ channel in the lower Channel Graph
and select ‘Public Channel Functions > Convert to Parameter Channel’ from
the context menu. Note the channel turns green. Also note the blue Public
Call Channel ‘Car: Car -> Car’ in the upper Channel Graph now has a child
link of type Value.
• Drag a Value onto the upper Channel Graph and rename it to ‘Current Car
Texture’. Connect it to the blue ‘Car: Car -> Car’ channel.
• Change the value of the ‘Current Car Texture’ channel to ‘1’. Note the texture
of the car model in the Animation 3D View is affected.
204 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Finished scene:
• ..\Tutorials\3.5 – Multiple channel groups\Multiple channel groups –
Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 205
Operators
The so called Operator channels in Quest3D allow you to affect each of these
elements dynamically in real-time.
As a general rule, the base Operator channels in Quest3D are ordered by the
channel type of the result. For example, if the result of an operation should be a
Value, the operator will be found in the Value Operator base channel.
Most of the functions of the Value Operator base channel are used to access
information from other (types of) channels. An example of an often used Value
Operator is ‘Get distance (vector, vector)’.
206 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
The Vector Operator base channel may also be used to retrieve information from
other (types of) channels. An example is ‘Get Translation (position) from Matrix’.
Vector Operators are also used to transform vectors. Transformation may include
basic addition, subtraction, multiplication and division of two vectors. Certain
Vector Operators can be used to set the length of a vector, or multiply a vector by a
value or matrix.
Matrix Operators may be used to turn vectors into matrices, such as ‘Create
Translation Matrix’. Matrix Operators can also retrieve information, such as ‘Get
Current Camera Matrix’. ‘Matrix Interpolate’ can be used to blend between two
Matrices.
A special type of Operator is ‘Damping’, which exists for Values, Vectors and
Matrices alike. It dampens a variable over time, effectively blending from the
current state to the new. The effect is logarithmic, and its speed may be adjusted
by changing its second child link Value. This damping speed ranges from ‘0’ to
‘1.0’.
Parenting
Normally, the motions of all 3D objects in a scene are relative to the world space
origin (0, 0, 0). However, it is also possible to link certain objects to others. An
object connected to a second object is called a child. The object to which the first is
linked is called a parent.
In the image above, the light cube’s position and rotation are relative to the world
origin. In the image below, the light cube is ‘parented’ to the dark cube. The light
cube’s position and rotation are relative to the dark cube.
208 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Look At
The fourth child link of a Motion channel is called ‘Look At Matrix’. An object can
be pointed in the direction of another object by connecting the Motion channel of
the target to the ‘Look At Matrix’. Moving the first object along its local Z-axis
will move it towards or away from the ‘Look At’ object.
Collision Response
The Fast Collision Response channel is a system to simulate collision between
objects. It checks a spheroid at its current position against any number of Collision
Objects, and results in a new position.
Chapter 4.2 describes a more advanced form of collision handling called ‘ODE’
(Open Dynamics Engine).
210 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Tutorial
The following exercise adds a rotation wheel to a moving car, demonstrating the
concept of parent and child. The Look At function of a matrix is showed using a
camera object.
Needed templates:
• Variables \ Value \ Expression Value (x2)
• Scene \ Render Camera Light
Step by step:
• Open the scene ‘Mathematical operators 1.cgr’. It contains an animated car, a
loose wheel and a camera model. Note that the loose wheel is positioned at
(0, 0, 0).
• Make a shortcut of the ‘Car Motion’ channel. Connect it to the ‘Parent Matrix’
child link of the ‘Front Left Wheel Motion’. Note the wheel object is no longer
positioned at (0, 0, 0). It is at the same position as the car model.
• Go to the Animation Section.
• Click on the Editor Camera button to view the scene using the Quest3D
editor camera.
• Click on the ‘Front Left Wheel’ object in the list to select it.
• Adjust the position of the ‘Front Left Wheel’ by moving it with the Gizmo.
Alternatively, type in the following X,Y,Z-coordinates: (-0.78, 0.32, 1.13).
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 211
• Make a shortcut of the ‘Car Motion’. Connect it to the ‘Look At Matrix’ child
link of the ‘Camera Object Motion’. Note the 3D camera model is now
directed towards the car.
• Go to the Animation Section.
• From the Timer Selection drop-down list, select the ‘Car Animation’ timer.
• Press the Play button . Note the car starts driving around the track. Note
the camera model continues to look at the car.
• Press the Project Camera button . The scene is now displayed from the
Follow Camera point of view.
212 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Finished scene:
• ..\Tutorials\3.6 – Mathematical operators\Mathematical operators 1 –
Complete.cgr
If you wish, you can save the current channelgroup to your project directory. The
following steps deal with a new scene.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 213
Needed templates:
• Variables \ Value \ Expression Value (x3)
• Logic \ User Input \ User Input (x4)
• Variables \ Value \ Value (x2)
• Variables \ Vector \ Vector Operator (x2)
• Variables \ Matrix \ Matrix Operator
• Variables \ Vector \ Vector (using values)
Step by step:
• Open the scene ‘Mathematical operators 2.cgr’. It contains a cityblock scene
and a stretched spherical collision object.
• Select and delete the ‘Z’ Value of the ‘Movement Vector’ channel.
• Add an Expession Value and connect it to the (now empty) third child link of
the ‘Movement Vector’ channel.
• Drag two User Input channels onto the Channel Graph and connect them
both to the Expression Value. Bind the arrow up and an arrow down keys to
them, respectively. Rename them to ‘Arrow Up’ and ‘Arrow Down’,
respectively.
• Add a Value channel and connect it to the Expression Value. Rename the Value
to ‘Movement Speed’. Double click on the channel and change its value to ‘1’.
• Double click on the Expression Value and type in the following formula:
(A – B) * C * (TC / 25)
A is the ‘Arrow Up’ channel, B the ‘Arrow Down’ and C is the ‘Movement
Speed’ channel. TC is the Tick Count, and the factor ‘25’ accounts for 25
frames per second.
214 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Make a shortcut of the ‘Motion’ and connect it to the ‘Get Rotation’ channel.
• Connect the ‘Adjust Heading’ channel to the ‘Motion’ channel.
• Select and delete the ‘Y’ Value of the ‘Gravity Vector’ channel.
• Add an Expression Value and connect it to the (now empty) second child link
of the ‘Gravity Vector’ channel. Double click it and type in the following
formula:
-0.4 * TC
• Retest the gravity by changing the ‘Y’ Value of the ‘Position Vector’ channel
to 2 again. Note the camera drops to the ground once more.
• Test the scene by moving around in the environment. Note the camera view
moves in the direction in which it points, and is kept on the ground by
gravity.
Finished scene:
• ..\Tutorials\3.6 – Mathematical operators\Mathematical operators 2 –
Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 217
3.7 Pathfinding
3D Graph
The nodes of a 3D Graph must be painted onto a collision object. This collision
object can be connected to the 3D Graph channel’s first child link. The second
child link of the 3D Graph also expects a Collision Object channel. This object is
used to determine line of sight during path calculation.
These two collision objects can be the same. In any case, it is recommended to
keep them as ‘low poly’ as possible. Often, this means creating a simplified
version of a 3D model for collision purposes.
Motion Planning
The Motion Planning channel has four child links.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 219
The first child link requires the current position of an object with pathfinding. The
second represents the destination position. The third is the ‘Next node range’. If
an object comes within this distance of any given node, it will look at the next
node on the calculated route. The fourth is the 3D Graph containing all node and
path structure information.
The position of a node can be requested using a Get Motion Planning Info Vector
channel. It requires the Motion Planning channel as its first child link. The second
child link is a Value that defines which node on the 3D Graph is returned.
An object with pathfinding can be moved towards its goal. See Chapter 3.6 for
more information on moving objects using vectors.
Nodes and paths can be placed and erased in the Nature / Pathfinding Section in
Quest3D.
220 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Tutorial
The following exercise will make an animated character find its way between
several waypoints in a city scene.
Needed templates
• Pathfinding \ 3D Graph
• Collision \ Collision Object
• Pathfinding \ Motion Planning
• Pathfinding \ Motion Planning Info Vector
• Variables \ Value \ Value
• Variables \ Matrix \ Matrix Operator
• Variables \ Value \ Array Value
• Pathfinding \ Triggers \ Vector Proximity Trigger
• Variables \ Value \ Set Value
Step by step:
• Open the file, ‘Pathfinding.cgr’. It contains a smal city block scene, a
character with multiple animations and collision setup and a camera that
follows the character.
• Add a 3D Graph channel and connect it to the ‘Pathfinding’ channel.
• Drag a Collision Object onto the Channel Graph and connect it to the first
child link of the ‘3D Graph’ channel.
• Make a shortcut of the ‘Street’ channel and connect it to the ‘Collision Object’
channel. The 3D Graph is now ready to paint nodes on.
• Go to the Nature / Pathfinding Section and click on the ‘Pathfinding Graph’
tab.
• Click on the ‘3D Graph’ to select it.
• Press the ‘Paint’ button to enter node painting mode.
• Move the mouse cursor over the Animation 3D View. Note the red circular
marker. This is the node painting cursor.
• In the cityblock environment, find the building with the red bricks, and place
a node in front of one of the doors by left-clicking on the sidewalk. A line is
drawn from the node to the current position of the painting cursor. Place
another node a few meters away, but still on the side walk. The line still
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 221
connects the two nodes, and a new line is drawn to the current painting
cursor position. Right click to stop painting.
• Place a few more nodes in the city scene. Keep the 3D Graph as clean as
possible. An example of a proper Graph can be seen in the image below.
• When ready, press the ‘Idle’ button to exit node painting mode. Note the
Graph disappears.
• Tick the ‘Keep showing graph’ box to make the Graph visible at all times.
• Make a shortcut of the ‘AI Character Speed’ channel and connect it to the
second child link of the ‘Set Value’ channel.
• Go to the Animation Section.
• Switch to Run Mode.
• Test the scene so far by pressing the ‘1’ through ‘5’ keys. Note the character
walks towards the corresponding nodes and stops upon arrival.
• The completed version of this tutorial contains extra logic to restrict the
character’s movement. When ready, open the file and examine its structure.
Finished scene:
• ..\Tutorials\3.7 – Pathfinding\Pathfinding – Complete.cgr
224 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
The Finite State Machine channel has a number of child links. Values connected to
the first child link are checked to trigger state changes. Children of the second
child link represent the actual states. Only the current state is called. Finally,
children of the third child link can be triggered once on specific state changes
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 225
The various states of an FSM are represented by blue circular items. The current
state is highlighted. On the right side of the screen, the properties of the selected
state item are shown.
The ‘Channel to call on state’ drop-down list contains the names of all the
channels connected to the ‘State Call Channels’ child links of the FSM.
The ‘Value channel to trigger transition’ drop-down list contains the names of all
the channels connected to the ‘State Change Value’ child links of the FSM.
The ‘Channel to trigger on state change’ drop-down list contains the names of all
the channels connected to the ‘State trigger channels’ child links of the FSM.
Hierarchy
In the image below, the current state is ‘Main Menu’. Only the ‘3D Scene’ and the
‘Options Menu 1’ states can be reached. In addition, the ‘Options Menu 2’ state is
only reachable from the ‘Options Menu 1’ state. However, from the ‘Options
Menu 2’ state it is possible to reach both the ‘Options Menu 1’ and the ‘Main
Menu’ state.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 227
Examples
Other examples in which the Finite State Machine can be used include stages in a
virtual training simulation, advanced character animation setup and behavior of
A.I. characters.
228 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Tutorial
The following tutorial shows the workings of the Finite State Machine. It is used
to navigate a menu structure.
Needed channels:
• Logic \ Finite State Machine
Step by step:
• Open the file, ‘Finite State Machine.cgr’. It contains a main menu screen and
an option menu screen. It also contains two very simple 3D scenes, namely
one with a red sphere and one with a blue box.
• Drag a Finite State Machine channel onto the Channel Graph and connect it to
the ‘Program’ channel. Note its current value, or ‘state’, is ‘0’.
• Connect the ‘Main Menu’ channel to the ‘State Call Channels’ child link of
the ‘Finite State Machine’ channel. Note the ‘Main Menu’ channel is not
called, as no state logic has been defined yet. Also note a new ‘State Call
Channel’ child link is added to the Finite State Machine, allowing for extra
children of that type.
• Connect the ‘Options Menu’ channel to the second (empty) ‘State Call
Channel’ child link of the FSM. Note it is not called yet.
• Connect a shortcut of the ‘Main Menu – Options Menu Button Pressed’
channel to the ‘State Change Values’ child link of the ‘Finite State Machine’
channel. Note a new ‘State Change Values’ child link is added to the FSM,
allowing for extra children of that type.
• Connect a shortcut of the ‘Options Menu – Main Menu Button Pressed’
channel to the second (empty) ‘State Change Values’ child link of the Finite
State Machine.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 229
• Double click on the ‘Finite State Machine’ channel to open its properties
window. Note the area similar to a Channel Graph on the left and the options
on the right.
• Press the ‘New Item’ button and click once in the middle of the FSM graph.
Note a cicular item is created.
• Click on the item to select it. Note its properties are displayed on the right
side of the window. Change its ‘Item name’ to ‘Main Menu’.
From the ‘Channel to call on state’ drop-down list, select ‘Main Menu’. Note
the ‘Main Menu’ channel is now called, and the main menu screen is
displayed in the Animation 3D View window.
Note the options in this list correspond to the channels connected to the
‘State Call Channels’ child links of the FSM.
• Create a new item above the ‘Main Menu’ item and select it. Change its ‘Item
name’ to ‘Options Menu’. From the ‘Channel to call on state’ drop-down list,
select ‘Options Menu’.
• Connect the two items by dragging a link from the black dot in the middle of
the ‘Main Menu’ item to the black dot in the middle of the ‘Options Menu’
item. Note the direction of the arrow.
• Click on the link to select it. Note its properties are displayed on the right
side of the window.
From the ‘Value channel to trigger transition’ drop-down list, choose ‘Main
Menu – Options Button Pressed’. Note the Value of the same name in the
Channel Graph is now called.
230 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Note the options in this list correspond to the channels connected to the
‘State Change Values’ child links of the FSM.
• Drag a link from the ‘Options Menu’ item back to the ‘Main Menu’ item.
Select the link and from the ‘Value channel to trigger transition’ drop-down
list, choose ‘Options Menu – Main Menu Button Pressed’.
Note the ‘Options Menu – Main Menu Button Pressed’ Value is highlighted,
and the ‘Main Menu – Options Button Pressed’ Value is not.
• Connect the ‘Scene Selection Menu’ channel to the third (empty) ‘State Call
Channels’ child link of the FSM channel.
• Connect the ‘Main Menu –Start Button Pressed’ channel to the third (empty)
‘State Change Value’ child link of the FSM channel.
• Connect the ‘Scene Selection Menu – Main Menu Button Pressed’ channel to
the fourth (empty) ‘State Change Value’ child link of the FSM channel.
• Open the FSM properties window.
• Add a new item, ‘Scene Selection Menu’. Set it to call the ‘Scene Selection
Menu’ channel.
• Connect the ‘Main Menu’ item to the ‘Scene Selection Menu’ item and set it
to the correct value change.
• Connect the ‘Scene Selection Menu’ item back to the ‘Main Menu’ item and
set it to the correct value change.
• Close the FSM properties window.
• Go to the Animation Section.
• Switch to Run Mode.
• Test the scene by clicking on the functional buttons created so far.
• When ready, switch to Edit Mode.
• Create Finite State Machine logic for the two 3D scenes. All the needed
channels are already present on the Channel Graph, they only need to be
linked correctly.
232 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Finished scene:
• ..\Tutorials\3.8 – Finite State Machine\Finite State Machine – Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 233
Not only will this structure help anticipate which elements will be needed, it also
makes it easier to schedule development. Specific team members and clear
deadlines may be assigned to subtasks of the entire project.
Artists may work on importing objects into Quest3D and polishing appearance.
Sound designers may develop or test music and sound routines. Several
specialised programmers may work on their respective subprograms without
hindering each other.
At any point in time during the development process, any of the subprograms
may be updated with a new version provided by the team members working on
them.
Future projects can greatly benefit from a company standard project structure. In
all likelihood, a number of subprograms may be reused. 3D assets may easily be
replaced with new content. Elements such as user interfaces may be kept
consistent in both style and use.
236 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Tutorial
The following tutorial is meant to assist in project management. These steps are
not foolproof, as each project has its own unique issues. However, generally
speaking, reading through the points below should be a good exercise.
Step by step:
• Take a piece of paper and write down the name of your project.
• In one sentence, try to capture the essence of your project. Will it be a
training program? A product visualisation? An architectural walkthrough? A
game? Something else?
• Make a rough sketch of the 3D scenes as you envision them.
• Make a clear sketch of (or write down notes about) the graphic user interface.
• Compile a list of all the needed elements. First concentrate on the basic
subprograms such as environment, camera system and user interface. Next,
make a more detailed list per part, including specific functionality,
animations, textures etc.
• Create a ‘back bone’ structure in Quest3D: based on the various subprograms
create channel groups and link them together. Use clear and consistent
names.
• Write down any extra elements you thought of while creating the back bone
structure in Quest3D.
• Make a first estimate of how much time it will take to create all the various
elements.
• Write down the names of all team members working on the project.
• Group the subprograms and 3D assets based on who will be working on
what. Add the numbers and write down the total amount of time needed per
team member.
• Think about dependencies between subprograms. Some parts may not be
worked on yet before others are finished. Shuffle the lists where needed to
come up with a sensible schedule.
• If possible, plan a user test. Invite someone unrelated to the project and have
him or her try the application. Make notes of any issues, as well as of aspects
that went especially well. Make (subtle) changes to the designs if needed.
• When the application is almost done, show it to the client and write down
any last minute changes wanted.
• Spend another one or two days polishing the application.
• Release version 1.0.
• After the project is completed, discuss development with the entire team.
• Anticipate feedback from the client and prepare for support.
• Make a list of what went right and what went wrong during development.
• Make a list of all the various 3D assets and subprograms that could be reused
in future projects.
• If there is time in between two projects, have team members optimise their
code and 3D models for future projects. Subprograms can be turned into
Quest3D templates.
• If time permits, have team members brush up their skills by reading theory
on new channels and functionality and creating tests.
• Prepare for the next project.
238 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
ODE
Quest3D supports the ‘Open Dynamics Engine’ (ODE). Physics simulations in
Quest3D are fairly easy to setup, and often produce great and convincing results.
Channels
The ODE Body channel is the heart of any project using dynamics. It replaces the
regular Motion channel structure of an object.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 239
The first child link of the ODE Body channel is the start motion in rest, before the
physics simulation is turned on. A value of ‘0’ or ‘1’ attached to the second child
link disables and enables the simulation, respectively. Real-time dynamics must
be turned on and off per object. A Toggle/FlipFlop template may be used for easy
switching.
ODE Shapes
ODE objects can be assigned one of four simulation shapes: Box, Sphere, Plane
and Polygon Object. Of these, only Box and Sphere are truly dynamic. Plane and
Polygon Object may only be used as static collision objects, such as environments.
Polygon shapes
An ODE shape of type Polygon Object needs to have a collision object linked to
its third child link.
240 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
ODE Properties
The properties window of the ODE Body channel lists a number of attributes.
The properties for all ODE Body channels can also be accessed in the Animation
Section, on the ‘Dynamics’ tab. ODE attributes may only be edited when the
simulation is off.
A full description of the various properties can be found in the Reference Manual
(press F1 in Quest3D to access it). The three ODE object templates that come with
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 241
Quest3D represent two often used sets of properties: Stable ODE Body, Slippery
ODE Body and ODE Landscape.
ODE Joints
A powerful feature of the Open Dynamics Engine is its joints functionality. ODE
Joint channels can be used to connect several ODE shapes. Only Box and Sphere
shapes may be part of a joint, Plane and Polygon Object shapes may not.
• Hinge
This joint can be used to simulate a hinging door.
• Slider
This joint can be used to simulate a piston or a sliding door.
242 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
• Hinge2
This joint can be used to simulate the suspension of car wheels, including
springs. Axis 1 is used for steering, Axis 2 is used for movement.
ODE Commands
The ODE Command channel can be used to change a number of simulation
settings, including precision, speed, gravity and friction. The ODE Command
channel may also be used to dynamically apply forces to bodies. These forces may
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 243
be absolute in world space (wind for example), or relative to the body (rocket
thrusters for example).
ODE Information
The ODE Info Value can be used to retrieve information such as forces, velocities
and joint rotation angles.
244 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Tutorial
The goal of this exercise is to gain experience using the physics simulation in
Quest3D. In the first scene, an ODE walkthrough camera system is created. The
second tutorial results in a controllable car.
Needed templates:
• Physics \ ODE Body
• Objects \ Collision \ Collision Object
• Logic \ Triggers \ Toggle Value
• Objects \ Null Object
• Physics \ ODE Command
Step by step:
• Open the file, ‘Physics simulation 1.cgr’. It contains an environment, a
number of boxes, a sphere and a camera.
• Detach the ‘Sphere Motion’ channel from the ‘Sphere’ channel.
• Drag an ODE Body channel onto the Channel Graph and connect it to the first
child link of the ‘Sphere’ channel. Rename the ODE Body to ‘ODE Sphere’.
• Double click on the ‘ODE Sphere’ channel to open its properties window.
From the ‘Shape’ drop-down list, select the ‘Sphere’ option. Press ‘OK’ to
accept.
• In the ODESphere properties window, set the ‘Roughness’ to 50, the
‘Angular Velocity Damping’ to 0.1 and the ‘Sphere Radius’ to 0.5.
Press ‘OK’ to accept.
• Double click on the ‘ODE Environment’ channel to open its properties
window. From the ‘Shape’ drop-down list, select the ‘Polygon Object’ option.
Press ‘OK’ to accept.
• Drag a Collision Object channel onto the Channel Graph and connect it to the
‘Collision Object’ child link of the ‘ODE Environment’ channel.
• Create a shortcut of the ‘Environment’ channel and connect it to the Collision
Object.
• Double click on the ‘Collision Object’ channel to open its properties window.
Press the ‘Create Tree’ button to initialise the channel, and press ‘OK’ to
accept.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 245
• Connect the 'Toggle/FlipFlop' to the ‘Enable Body’ child link of the ODE
Sphere’ channel.
• Create a shortcut of the ‘Toggle/FlipFlop’ channel and connect it to the
‘Enable Body’ child link of the ‘ODE Environment’ channel.
• Connect the ‘Sphere Motion’ to the ‘Start Motion’ child link of the ‘ODE
Sphere’ channel.
• Drag a Null Object onto the Channel Graph and rename it to ‘ODE Sphere
Placer’.
• Select and delete the ‘Motion’ folder connected to the ‘ODE Sphere Placer’
channel.
• Connect the ‘Sphere Motion’ channel to the ‘ODE Sphere Placer’ channel.
Finished scene:
• ..\Tutorials\ 4.2 – Physics simulation\Physics simulation 1 – Complete.cgr
If you wish, you can save the current channelgroup to your project directory. The
following steps deal with a new scene.
248 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Needed templates:
• Physics \ ODE Joint
Step by step:
• Open the file, ‘Physics simulation 2.cgr’. It contains an environment, a car
and four seperate wheels. Each of these objects has already been setup as an
ODE body.
• Drag an ODE Joint channel onto the Channel Graph and connect it to the
‘ODE Joints’ channel. Rename the ODE Joint to ‘ODE Joint Front Left’.
Double click on it to open its properties window. Select ‘Hinge2’ as Joint
type. Select the ‘Enable motor’ option, and press ‘OK’ to accept.
• Create a shortcut of the ‘ODE Car’ channel and connect it to the ‘ODE Body
1’ child link of the ‘ODE Joint Front Left’ channel.
• Create a shortcut of the ‘ODE Wheel Front Left’ channel and connect it to the
‘ODE Body 2’ child link of the ‘ODE Joint Front Left’ channel.
• Connect the ‘ODE Car Movement’ channel to the ‘Velocity’ child link of the
‘ODE Joint Front Left’ channel.
• Connect the ‘ODE Car Steering’ channel to the ‘Velocity2/Rotation (Hinge2)’
child link of the ‘ODE Joint Front Left’ channel.
• Create a shortcut of the ‘Car Motion’ channel and connect it to the ‘Parent
Matrix’ child link of the ‘ODE Joint Front Left’ channel. The current channel
structure should look similar to the one in the image below.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 249
Finished scene:
• ..\Tutorials\ 4.2 – Physics simulation\Physics simulation 2 – Complete.cgr
250 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Quest3D offers two types of database connectivity. The first is native MySQL, the
second is ODBC 3.0. These two connection types cover a large portion of the
exisiting database technologies.
Note that Database connectivity is only available in the Quest3D Enterprise and
VR Editions.
Queries
After a MySQL driver connection has been established, the DB Query channel is
used to retrieve and store data. In its properties window, the DB Source must be
set and the query must be given a name. The actual query itself may be entered in
the dialog, or connected as a Text channel to the first child link of the DB Query
channel.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 251
Query parameters
The second child link of the DB Query channel, ‘Input’, may be used to add
parameters to the query. The first ‘Input’ child is referred to as ‘$$1$$’, the second
as ‘$$2$$’, and so forth.
Using a For Loop structure, it is possible to retrieve a set of data and for example
store it as seperate rows in an Array channel of the appropriate type.
ODBC
ODBC in Quest3D work in a way similar to MySQL connections, except for the
fact a connection is made with a driver instead of directly with a database. The
ODBC driver may be set to connect to dBase, MS Excel and MQIS files, as well as
MS Access databases.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 253
Tutorial
The following steps form an exercise in accessing a remote MySQL database
using Quest3D channels. The second example adds array functionality.
Note: for this tutorial you will need access to a local or remote MySQL server.
The following steps depend on a database named ‘quest3d’, containing a table
called ‘player’, with columns for ‘id’, ‘name’ and ‘type’. For best results, the
table should contain three or more records.
Needed templates:
• Enterprise \ Database \ DB Driver MySQL
• Variables \ Text \ Text (x3)
• Enterprise \ Database \ DB Source
• Enterprise \ Database \ DB Info Value
• Enterprise \ Database \ DB Query
• Enterprise \ Database \ DB Text
• Variables \ Value \ Value
Step by step:
• Open the file, ‘Database connectivity 1.cgr’. It contains a simple logic
structure.
• Drag a DB Driver MySQL channel onto the Channel Graph.
• Add a Text channel and connect it to the ‘Host’ child link of the ‘DB Driver
MySQL’ channel. Rename this Text channel to ‘Host’. Double click on the
channel and change the text to ‘127.0.0.1’. This is the ‘localhost’ IP address. If
you have access to a remote database, use its IP instead. Press ‘OK’ to accept
and close the properties window.
• Drag another Text channel onto the Channel Graph and connect it to the
‘Database’ child link of the ‘DB DriverMySQL’ channel. Rename this Text
channel to ‘Database’. Double click on the channel and change the text to
‘example’. This is the name of the database on the remote Quest3D
webserver. Press ‘OK’ to accept and close the properties window.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 255
• Add another Text channel and connect it to the ‘Username’ child link of the
DB DriverMySQL’ channel. Rename this Text channel to ‘User name’. Double
click on the channel and change the text to ‘root’. Press ‘OK’ to accept and
close the properties window.
• If the server needs a password, add another Text channel and connect it to
the ‘Password’ child link. Change the text to the password.
• Drag a DB Source channel onto the Channel Graph. Double click on the
channel to bring up its properties window. As ‘Name in Quest3D’, use
‘MySQL’ and select the ‘Rename channel’ option. Press ‘OK’ to accept.
• Connect the ‘DB DriverMySQL’ channel to the ‘DB Source’ channel.
• Add a DB Info Value and connect it to the ‘Database’ Channel Caller. Double
click on the DB Info Value channel to open its properties window. From the
first drop-down list, select the ‘Database Connected’ option. From the second
drop-down list, select ‘MySQL’. Note this is the name of the connection
specified in the DB Source channel. Press ‘OK’ to accept.
• Connect the ‘MySQL’ channel to the ‘One Time’ channel.
• Double click on the ‘One Time’ channel to bring up its window. Press the
‘Reset’ button to call the channel’s children. After a few moments, the value
of the DB Info Value channel should change to ‘1’. Close the properties
window of the ‘One Time’ channel.
• Drag a DB Query channel onto the Channel Graph and connect it to the
‘Retrieve Data’ channel. Double click the ‘DB Query’ channel to open its
properties window.
From the first drop-down list, select ‘MySQL’.
As the ‘Name of this query’, use ‘Get Player Info’.
As ‘Actual query’, use
• Change the value of the ‘Index’ channel to ‘1’ to request the second record in
the ‘name’ column. Note the name on screen changes with it.
Finished scene:
• ..\Tutorials\4.3 – Database connectivity\Datase connectivity 1 – Complete.cgr
If you wish, you can save the current channelgroup to your project directory. The
following steps deal with a new scene.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 257
Needed templates:
• Variables \ Text \ Array Text (x2)
Step by step:
• Open the file, ‘Database connectivity 2.cgr’. It contains database connectivity
logic similar to the example above.
• Drag an Array Text channel onto the Channel Graph and connect it to the
second child link of the ‘Set Name Text’ channel. Double click on the ‘Array
Text’ channel to open its properties window. From the ‘Table’ drop-down
list, select ‘Player’. From the ‘Column’ drop-down list, select ‘Name’. Select
the ‘Update channel name’ option and press ‘OK’ to accept.
• Right click on the ‘Player: Name’ channel and from the menu, select ‘General
Properties’. Set the ‘Update’ to ‘Continuous’ and press ‘OK’ to accept.
• Create a shortcut of the ‘Current Row’ channel and connect it as index value
to the ‘Player: name’ channel.
• Switch to Run Mode.
• Press the ‘F2’ key to import the database data into Quest3D.
• Switch to Edit Mode.
• Press the ‘Array Manager’ tab and select the ‘Player’ table. Note the column,
‘Name’ is filled with names from the correct column in the external database.
• Press the ‘Channel Graph’ tab.
• Add another Array Text channel and connect it to the first (empty) ‘Input’
child link of the ‘Set Player Name’ channel. Set the array to be a reference of
the ‘Name’ column in the ‘Player’ table and rename it accordingly.
• Right click on this new ‘Player: Name’ channel and from the menu, select
‘General Properties’. Set the ‘Update’ to ‘Continous’ and press ‘OK’ to accept.
• Create a shortcut of the ‘Current Row’ channel of this For Loop, and connect
it as index value to the ‘Player: Name’ channel you just created.
• Double click on the ‘Set Player Name’ channel. Fill in the following query:
This will replace all records in the ‘name’ column of the ‘player’ table in the
remote database. The ‘id’ column is used as primary index. Note that ‘$$1$$’
refers to the second child link of the ‘Set Player Name’ channel. ‘$$2$$’ refers
to the third child link. Press ‘OK’ to accept.
258 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
This will add a new record to the ‘player’ table in the remote database. Note
that ‘$$1$$’ refers to the second child link of the ‘Insert Data’ channel. Press
‘OK’ to accept.
• Switch to Run Mode.
• Press the ‘F4’ key to insert a new record to the remote database.
• Press the ‘F2’ key to reimport the data from the remote database into
Quest3D. Note both left and right columns on the screen in the Animation 3D
View window are updated.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 259
Finished scene:
• ..\Tutorials\4.3 – Database connectivity\Datase connectivity 2 – Complete.cgr
260 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
4.4 Networking
Certain applications might be designed for more than one user. Examples include
virtual chat rooms, team-based training simulations and online multiplayer
games. Each of the users has to run an instance of the application. Each of the
instances needs to continuously communicate its current state. Networking
functionality is used for communication between computers.
In most cases, one of the computers in a network is usually made the ‘server’. The
other computers are called ‘clients’.
A server handles all data transfer. It receives updates from all clients, and sends
data to each of these clients as well. A server only sends when a client actually
requests data.
Quest3D network applications are set up as regular, ‘single user’ projects. Clients
run most of the application locally. Only data influenced by other users are
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 261
requested from the server over the network. Examples include user positions,
avatar appearances and text in chat windows.
Note that a client PC doesn’t need to have Quest3D installed. Clients can run
published versions in the form of stand-alone ‘.exe’ files or ‘.q3d’ Viewer files.
Usually, the server computer itself is a client as well. If this is not the case, the
computer is called a ‘dedicated server’.
The transfer speed is limited by both server and client. Quest3D supports
network applications for up to 32 users. Larger numbers of users are technically
possible, but might result in decreased performance.
Logging in
A client must ‘log in’ at a server. The server is selected from a list of all running
network applications on a local area network (‘LAN’), or on a specified internet
address (IP number). Generating or updating such a list of available network
programs is called ‘enumerating’.
Each network application has a unique ID to ensure clients log in at the correct
program.
Initialisation
After the log-in procedure, the client program is initialised. This may include
setting a start position, changing appearance and setting a role or character type.
In addition, the ‘control’ over such attributes must be assigned to the newly
logged-in client. User control over scene elements may be shared by changing
assignments dynamically.
Data transfer
Network data can be transferred in Quest3D using the Network Value, Network
Matrix, Network Text and Network Buffer channels. The first three types are
inserted between a parent and its child.
262 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Network Values, Network Matrices and Network Texts may be sent and received in
groups. In addition, a transfer guarantee may be set, to make sure data actually
arrives at its destination. This option is slightly slower than regular transfer.
Finally, Network Values and Network Matrices may be set to ‘Continuous’
movement, resulting in smoother animation.
Buffers
Channels of other types may be transferred over the network using the Network
Buffer channel. It must be called independently, and the shared channel must be
linked as its child.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 263
Network actions
The Network Actions channel contains a number of functions such as creating and
removing a server, disconnecting a client and setting user control. It also contains
a number of triggers for events such as server creation, client log-in and
connection refusal.
Network information
The Network Info Value channel contains a number of functions such as connection
status, current user number and total number of connected clients.
The Network Info Text channel holds the session and computer names.
Network triggers
Network Triggers can be used to guarantee an event is triggered on all clients.
Regular triggers can be too imprecise for networking purposes.
264 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Tutorial
Network functionality allows for communication between two or more
computers. Network projects in Quest3D are set up as ‘single user’ programs.
They usually contain code for both server and client.
Needed templates:
• Enterprise \ Network \ Network Actions (x3)
• Logic \ Expression Value
• Enterprise \ Network \ Network Info Value
Step by step:
• Open the file, ‘Networking 1.cgr’. It contains a simple logic structure.
• Drag a Network Actions channel onto the Channel Graph and connect it to the
‘Create Server Trigger’ channel. Double click on the ‘Network Actions’
channel to open its properties window. From the drop-down list in the
properties window, choose ‘Create Server’. Select the ‘Update channel name’
option and press ‘OK’ to accept.
• Add another Network Actions channel and connect it to the ‘Create Server’
channel. Set and rename this Network Actions channel to ‘This PC created a
server’.
• Drag another Network Actions channel onto the Channel Graph and connect it
to the ‘Network Logic’ channel. Set and rename this Network Actions channel
to ‘Connect to own server’.
• Connect the unlinked ‘MessageBox’ channel to the ‘This PC created a server’
channel.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 265
Finished scene:
• ..\Tutorials\4.4 – Networking\Networking 1 – Complete.cgr
If you wish, you can save the current channelgroup to your project directory. The
following steps deal with a new scene.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 267
Needed templates:
• Enterprise \ Arrays \ Array Channel
• Enterprise \ Network \ Network Matrix
Step by step:
• Open the file, ‘..\Tutorials\Networking 2.cgr’. It contains an environment, a
character and a 3rd person walkthrough camer, as well as network logic.
• Go to the Animation Section.
• Switch to Run Mode.
• Press the ‘F2’ key to create a server. Note that after a few moments, the actual
3D scene is displayed. This means a server was created and a client
connection was made.
• Test the scene by walking around.
• When ready, switch to Edit Mode.
The following part of the tutorial requires a second computer which will
function as client. The two computers need to be connected through a local area
network.
• From the File Menu, choose ‘Save As’. Save the current project to your
project directory.
• From the File Menu, choose ‘Publish’. Publish the project as a stand-alone
‘.exe’ file.
• Copy the ‘.exe’ file onto the client computer.
• Run the ‘.exe’ file on the client computer.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 269
• On the host computer, press the ‘F4’ key to log-in as client. Note after a few
moments, the 3D scene is displayed.
• On the client computer, test the scene by moving around using the arrow
keys. On the server computer, note the client character walking around.
• On the server computer, press the ‘1’ through ‘4’ keys to change the
appearance of the server character. Note the changes are reflected in real-
time on the client computer.
Finished scene:
• ..\Tutorials\4.4 – Networking\Networking 2 – Complete.cgr
• ..\Tutorials\4.4 – Networking\Networking 2 – Complete.exe
270 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Quest3D channels are building blocks containing precompiled C++ and DirectX
code. The entire set of channels provides functionality for many aspects of real-
time 3D development.
Despite the open and logical structure of the channels system, certain
functionality can be handled more efficiently or more easily in script language.
Quest3D supports Lua, a free third party scripting environment.
Lua in Quest3D is especially applicable for cases such as loading and unloading
channel groups, complex calculations and iterative structures (‘for loops’).
Lua functions
Lua channels can have one of two functions, or both.
The first is ‘CallChannel’, and is executed when the channel is simply called.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 271
The second is ‘GetValue’, and is executed when the Lua channel is used as a
value. The actual value of the Lua channel itself is equal to the value the script
‘returns’ at the end of the function.
Variables
Just like in other programming and scripting languages, variables used in a Lua
script must be ‘declared’. This statement assigns memory to the variable. The
word ‘local’ means that the variable is only used in one particular place, in this
case the Lua channel. As soon as the script is done, the memory is cleared again.
local variable
local variable = 1
variable = variable + 1
Group functions
Quest3D supports the following standard Lua group functions: ‘base’, ‘string’
and ‘math’. In addition, there is a ‘q’ group containing Quest3D specific
functions.
The first example calculates the cosine of the value between the brackets. The
second example retrieves the Tick Count, from the Quest3D Lua group ‘q’.
Children
Any number of children of any type may be connected to a Lua channel.
272 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Note the difference between using functions of predefined and local structures.
For predefined structures such as ‘channel’, a function is preceded by a ‘.’ (dot).
For local structures such as variables, a function is preceded by a ‘:’ (double colon
punctuation mark).
The actual value of a Value channel connected to a Lua channel may be accessed
using the following commands.
The value or text of a child may be set using the following commands:
variable:SetValue(value)
variable:SetText(text)
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 273
For Loops
Iterative structures, similar to ‘For Loops’ in Quest3D, can be written using the
following statement:
Group loading
Especially useful are the functions to load and unload channel groups. The
statements are:
http://www.lua.org
274 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Tutorial
Lua extends the ‘out of the box’ functionality set of Quest3D channels. The
following exercise aims to familiarise you with the inner workings of the Lua
channel and its two main functions: ‘CallChannel’ and ‘GetValue’.
The second tutorial details a more advanced use of Lua in Quest3D: dynamic
loading.
Needed templates:
• Logic \ Empty Lua Script (x2)
• Logic \ Channel Caller.
• Variables \ Value \ Value (x2)
• Logic \ User Input \ User Input
Step by step:
• Start a new Quest3D project by choosing ‘New Project’ from the File Menu.
• Drag a Lua channel onto the Channel Graph. Note it is automatically set to be
the Start Channel. Double click it to open its properties window. Note the
window already contains script for two functions.
• In the ‘GetValue’ function, declare a new variable by typing in the following
code:
local currentvalue = 1
• Set the value of the Lua channel to the value of the variable by replacing the
follow line:
return -1
with
return currentvalue
• Press the ‘CallValue’ button to execute the ‘GetValue’ function. Note the
actual value of the Lua channel changes to ‘1’.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 275
• Add a Channel Caller channel and rename it to ‘Project Start’. Set it to be the
Start Channel.
• Add a Value channel and connect it to the ‘Project Start’ channel.
• Connect the Lua channel to the Value. The Lua channel is now called as a
value every frame. In other words, the ‘GetValue’ function of the Lua script
is now executed each frame. Or: the value of the ‘currentvalue’ variable is
calculated and ‘returned’ each frame.
• Change the script to the following:
function GetValue()
local currentvalue = 1
currentvalue = currentvalue + 1
return currentvalue
end
Press ‘OK’ to accept. Note the value of the Lua channel is now ‘2’.
• Drag another Value channel onto the Channel Graph and connect it to the Lua
channel. Change its value to ‘3’.
• Access the child by changing the Lua script to the following:
function GetValue()
local child0 = channel.GetChild(0)
local currentvalue = child0:GetValue()
276 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
return currentvalue
end
Press ‘OK’ to accept. Note the value of the Lua channel is now the same as the
value of its child: ‘3’.
• Add another Value channel and connect it to the second child link of the Lua
channel. Change its value to ‘4’.
• Change the script so it returns the sum of the values of the two children.
Multiple solutions are possible. One is given below:
function GetValue()
local child0 = channel.GetChild(0)
local value0 = child0:GetValue()
return sum
end
Press ‘OK’ to accept. Note the value of the Lua channel is now ‘7’, the sum of
the values of its two children.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 277
Also note that for simple calculations, the Expression Value channel is easier to
use.
• Drag another Lua channel onto the Channel Graph and connect it to the
‘Project Start’ channel.
• Add a User Input channel and connect it to the Lua channel.
• Drag a Channel Caller onto the Channel Graph and connect it to the second
child link of the Lua channel.
• Add another Channel Caller and connect it to the first Channel Caller.
• Change the script for the ‘CallChannel’ function so that it only calls the
second child when the value of the first child is equal to ‘1’. It should look
similar to the code below.
function CallChannel()
local child0 = channel.GetChild(0)
local userinput = child0:GetValue()
if userinput == 1 then
child1:CallChannel()
end
end
Press ‘OK’ to accept. Note the first Channel Caller is active. This is because of
the ‘GetChild’ statement in the script.
278 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Also note that for simple conditional channel calling, the Quest3D If channel
is easier to use.
Finished scene:
• ..\Tutorials\4.5 – Lua Scripting\Lua scripting 1 – Complete.cgr
If you wish, you can save the current channelgroup to your project directory. The
following steps deal with a new scene.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 279
Step by step:
• Open the file, ‘Lua Scripting 2.cgr’. It contains a simple logic structure. Note
the blue Public Call Channel. It reports the error, ‘Not Found’. This is correct.
• Double click on the ‘Lua: Load Group’ channel to open its properties. Type in
the following code:
function CallChannel()
end
This script loads the channel group ‘Environment.cgr’ into the pool,
‘Environment’. The zero indicates the instance. Press ‘OK’ to accept.
• Switch to Run Mode.
• Press the spacebar to load the specified group. Note the environment is
displayed in the Animation 3D View.
• Switch to Edit Mode.
• Add a line to load the group ‘Character.cgr’ into the pool ‘Character’.
function CallChannel()
end
• Press the ‘Animation 3D View’ tab. Note the character is displayed in the
window.
• Double click on the blue ‘Character: Character -> Character’ channel to open
its properties window. Select the ‘Disable Autoload’ option and press ‘OK’ to
accept.
• Open the ‘Lua: Unload Group’ channel and type in the following code:
function CallChannel()
q.RemoveChannelGroup (“Character”, 0)
end
This script unloads the pool, “Character”. The zero indicates the instance.
Press ‘OK’ to accept.
• Switch to Run Mode.
• Press the backspace key to unload the specified group. Note the character
disappears from the Animation 3D View window. Also note the blue
‘Character’ channel reports a ‘Not Found’ error.
• Press the spacebar to load the specified groups again. Note the character
reappears, and the blue ‘Character’ channel is valid again.
Finished scene:
• ..\Tutorials\4.5 – Lua Scripting\Lua scripting 2 – Complete.cgr
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 281
Appendices
282 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
3D Studio Max
Preparation tips
• Delete all unnecessary objects (help lines etc.)
• Select all remaining objects
• Convert all objects to ‘Editable Mesh’
• Apply ‘ResetXForm’ to all objects
• Convert all objects to "Editable Mesh" again.
• In some cases you will see that some objects will be messed up with normals
pointing in the wrong direction.
• Flip polygons for those objects that need it (mostly objects that were
mirrored)
• If you have a skinned object, make sure that the stack only has an ‘Edit
Mesh’-modifier and a ‘Physique’/’Skin’-modifier above it.
Modeling tips
• Weld all vertices that need it with a ‘0,001’-distance.
• Make sure all objects have smoothing applied (even if they don't need it, all
objects must have smoothing group(s) assigned). If you do not apply it
manually, but rely on the automatic smoothing that primitives are created
with, you can't be sure that it will be transferred correctly to Quest3D.
• Perform an ‘Attach List’ to reduce many objects sharing the same material to
one (for example steps of a staircase). This will make it easier in Quest3D if
you decide to change the materials.
• Whenever an object is mirrored, you'll most likely need to flip its polygons.
This is only evident when you've applied a ‘ResetXForm’ and an ‘EditMesh’-
modifier (as preparation for .X export).
• Don't create models where 2 planar surfaces overlap each other with little
height distance. This will cause Z-buffer problems in Quest3D (flickering
when the camera is high above the overlapping surfaces).
• Keep in mind that only faces and polygons will be visible in Quest3D. Lines
cannot be exported.
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 283
Material tips
• No 2-sided materials are allowed. If any objects should be seen from both
angles, make a clone of the object with flipped polygons and attach it to the
original.
• Always use the standard 3DSMax-material.
• Materials with ‘Wire’ set to ‘on’ are useless in Quest3D. If you want to create
thin objects (such as rope or wire), you must model them using conventional
geometry.
• Keep in mind that only objects mapped with the UVWmap-modifier or the
UnwrapUVW-modifier are correctly exported to .x. Don't use the mapping
features in the material editor (scale, crop etc.) as they're not exported.
Texture tips
• Keep all the textures that you use in a given 3DSMax scene in the same
folder. When you import an .X file in Quest3D, it will scan the folder looking
for the scene textures, so make sure to export your .X scene to the folder
where your textures are located.
• Don’t use JPG textures with less than 8x8 pixels. This will make DirectX
crash.
• For non-transparent objects, use JPG textures (or DDS textures if your target
platform has graphics cards that support this). Texture sizes must adhere to a
power of 2, meaning that 8, 16, 32, 64, 128, 256, 512 pixels are all valid sizes.
1024 & 2048 pixels are also allowed if the graphics card supports it (most
modern cards do that)
• Keep in mind that the difference between a 512x512 texture and a 1024x1024
texture is 1:4, so the last-mentioned texture takes up 4 times as much
memory of your graphics card than the smaller one. If you use textures that
don't adhere to the power of 2-rule, Quest3D will automatically convert them
by rounding up (i.e. a 768x972 texture will be converted to a 1024x1024)
texture.
• For a transparent object, you can use one TGA (32-bit with alpha-channel
included) or 2 JPGs (where the second holds the alpha channel information)
or 1 PNG file. Keep in mind that TGAs are the better choices because they
can be mipmapped (as opposed to using two JPGs).
• For transparent objects, you can also use a DDS with an alpha channel. If you
pre-generate the MIP maps in Photoshop, your Quest3D project will start up
faster: normally, all textures that have mipmapping enabled will have their
mipmaps generated upon starting up the application. With DDS you can do
this in advance.
284 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Maya
Quest3D ships with .X Exporters for Maya up to version 6. There are several ways
to install an .X exporter for Maya. You can use the way descripibed below or you
can install the Microsoft DirectX 9.0c SDK.
The Microsoft DirectX 9.0c SDK can be downloaded from the following page:
http://msdn.microsoft.com/directx/
We recommend using the exporter from Microsoft, if needed, follow these steps
for the installation and usage of the Maya 5 exporter. The steps also apply for
older versions.
The following instructions are taken from the Readme.txt file, and revised.
• File Options deals with the way the file is constructed. Ascii will do fine.
• Tesselation Options only apply if you use Nurbs or Subdiv patches. It is
recommended not to use these settings, but to convert all objects to polygons
first. The result will be more accurate and predictable because of the control
you have with the regular converting tools.
• Material Options deal with the textures. You can flip the U/V coordinates,
and make the texture path relative or absolute. If you don't have textures,
you can turn the “Export Materials” option off.
• Animation Options let you control the way in which the movement is
exported. If you export the keyframes only, Quest3D will re-calculate the
inbetweens. If you export every frame, the file will be much larger but more
accurate.
• Skinning options apply if you have a skinned character. If you don't use
bones, you can turn the “Export Skinning” option off.
• Click on ‘Export All’. A file dialog appears. Specify the filename and click on
Export. The x file will be created, and you can import it in Quest3D.
286 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Move the mouse cursor to a specific Move the mouse to move the on-screen
position cursor to a specific position on the
screen
Click Press the left mouse button and release
Double-click Press the left mouse button, quickly
release and quickly press again, and
release
Right-click Press the right mouse button and
release
Press and hold the left button Press and hold down the left mouse
button, do not release
Drag the mouse Press and hold down the left mouse
button, do not release, and move the
mouse around
Drag from a to b Press and hold down the left mouse
button, do not release, and move the
on-screen cursor to a specific position
on the screen
Select an item Press the left mouse button while the
on-screen cursor is over an on-screen
item and release
Deselect an item Hold down the control key and press
the left mouse button while the on-
screen cursor is over a selected on-
screen item
Multi-select items Move the on-screen cursor to the top
left corner of the area you want to
select, press and hold down the left
mouse button, move the on-screen
cursor to the bottom right corner of the
area you want to select, and release
Add item to selection With other items currently selected,
hold down the control key, press the
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 287
A3 Keyboard shortcuts
F1 Help
F2 Channels Section
F3 Animation Section
F4 Object Section
F5 Arrays Section
F6 Nature / Pathfinding Section
Control C Copy channels
Control X Cut channels
Control V Paste channels
` Create channel shortcut
Spacebar Create / explode folder
Backspace Level up
Pause Break Toggle Run / Edit Mode
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 289
Glossary
290 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
.dds file format, 93 194, 203, 220, 229, 230, 246, 255,
.MP3 format, 126 258, 259, 279, 280
.Wav format, 125 Animation Section, 14, 16, 23, 80, 81,
.X files, 87, 147, 151 83, 84, 86, 90, 106, 111, 112, 117,
‘Doppler Factor’, 126 118, 122, 123, 137, 148, 150, 151,
2D images, 121 152, 194, 210, 211, 222, 223, 230,
2D layer, 120, 121 231, 240, 245, 246, 249, 288
2-sided materials, 283 Anti Aliasing, 110, 112, 113
3D assets, 235, 236, 237 array, 153, 185
3D Graph, 217, 218, 219, 220, 221, Array Command, 189
222 Array Manager, 186, 188, 191, 193,
3D object, 57, 59, 64, 65, 69, 73, 90, 194, 222, 257, 258
93, 94, 107, 110, 129 Array Table, 185, 186, 187, 189, 191
3D objects, 5, 8, 14, 15, 54, 56, 68, 69, background color, 33, 35, 47, 56
70, 73, 76, 77, 78, 87, 91, 106, 132, Basetype, 32, 33, 35
175, 180, 205, 206, 233 biped, 143
3D positioning, 126 bones, 143
3d Studio Max, 87 Buffers, 262
3D Studio Max, 110, 130, 143, 282 camera, 5, 14, 56, 57, 68, 69, 75, 81,
3rd person, 115, 151, 267 95, 103, 114, 115, 116, 118, 121,
ActiveX, 55, 62 126, 128, 129, 132, 134, 135, 136,
alpha, 72, 74, 97, 100, 131, 139, 283 138, 151, 208, 210, 211, 214, 215,
animation, 3, 8, 55, 69, 73, 78, 79, 82, 216, 220, 234, 236, 244, 246, 282
83, 85, 86, 87, 114, 125, 143, 144, Camera, 54, 56, 57, 59, 81, 102, 103,
147, 150, 151, 152, 169, 200, 227, 114, 115, 117, 118, 119, 122, 129,
233, 234, 238, 262 147, 148, 159, 179, 180, 181, 196,
Animation, 3, 14, 15, 16, 23, 47, 50, 202, 206, 210, 211
53, 55, 59, 69, 73, 75, 76, 78, 80, 81, channel, 3, 8, 9, 15, 18, 20, 21, 24, 25,
83, 84, 86, 90, 101, 106, 111, 112, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
114, 117, 118, 122, 123, 128, 129, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
136, 137, 141, 148, 150, 151, 152, 46, 47, 49, 50, 51, 52, 53, 54, 56, 57,
181, 182, 188, 191, 192, 193, 194, 58, 59, 60, 64, 68, 73, 74, 75, 76, 78,
203, 210, 211, 220, 222, 223, 229, 79, 81, 82, 83, 84, 85, 86, 89, 90,
230, 231, 240, 245, 246, 249, 255, 107, 108, 109, 111, 112, 117, 118,
258, 259, 279, 280, 285, 288 121, 122, 123, 125, 126, 127, 128,
Animation 3D View, 16, 47, 50, 53, 129, 133, 136, 137, 138, 139, 141,
59, 75, 76, 81, 90, 101, 111, 117, 142, 144, 145, 146, 148, 149, 150,
118, 122, 128, 129, 136, 137, 141, 151, 152, 153, 155, 156, 157, 159,
148, 151, 181, 182, 191, 192, 193, 160, 161, 162, 163, 164, 165, 166,
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 291
167, 168, 169, 171, 172, 173, 174, Channels Section, 14, 15, 17, 23, 44,
176, 178, 181, 182, 183, 185, 186, 76, 83, 85, 86, 111, 118, 123, 136,
187, 189, 191, 192, 193, 194, 196, 149, 151, 211, 221, 222, 230, 246,
197, 198, 199, 202, 203, 204, 205, 288
206, 208, 209, 210, 211, 213, 214, character animation, 143
215, 216, 217, 218, 219, 220, 221, Character animation, 150, 151, 152
222, 223, 224, 226, 228, 229, 230, characters, 7, 70, 82, 108, 109, 217,
231, 234, 236, 238, 239, 240, 242, 227, 234
244, 245, 246, 248, 250, 251, 252, Child, 31, 32
254, 255, 256, 257, 258, 262, 263, Clear Screen, 32, 33, 34, 35, 36, 37, 38,
264, 265, 270, 271, 272, 273, 274, 44, 45, 46
275, 276, 277, 278, 279, 280, 283, click, 22, 286
287, 288 client, 237, 260, 261, 263, 264, 267,
start channel, 49 268, 269
Channel Caller, 9, 25, 29, 30, 37, 38, clipping planes, 115
49, 51, 54, 128, 154, 155, 159, 162, Collision Object, 118, 137, 141, 215,
163, 181, 196, 255, 274, 275, 277, 218, 220, 244
278 Collision Response, 118, 151, 209,
Channel Callers, 36, 49, 52, 154, 159 214, 215
channel graph, 68 color, 14, 33, 34, 35, 38, 40, 71, 72, 74,
Channel Graph, 16, 18, 19, 20, 21, 24, 76, 77, 78, 123, 138, 139, 164, 176,
25, 26, 28, 44, 57, 58, 59, 68, 83, 86, 183
90, 111, 112, 117, 118, 128, 129, Compression, 92
141, 142, 148, 149, 151, 159, 160, Context Menu, 41, 43, 46, 49, 53
161, 162, 163, 171, 172, 174, 181, Continuous Update, 176, 177, 182,
191, 192, 193, 202, 203, 211, 213, 183, 193, 257, 262
214, 215, 220, 221, 222, 225, 228, Data storage, 187
229, 230, 231, 244, 245, 248, 254, data transfer, 260
255, 257, 264, 265, 274, 275, 277, database, 7, 55, 233, 250, 252, 254,
279, 287 257, 258, 259
Channel Group, 15, 18, 32, 52 Database, 4, 55, 233, 250, 254, 255,
Channel list, 17 256, 257, 259
Channel Properties, 41, 42, 287 DB Query, 55, 250, 251, 254, 255
Channel Switch, 54, 144, 157, 162, DDS, 283
163, 199 dialog, 41, 47, 250, 285
Channels, 5, 8, 9, 14, 15, 17, 23, 31, Diffuse, 73, 74, 76, 107
38, 40, 43, 44, 48, 68, 76, 83, 85, 86, Dimensions, 91
111, 118, 123, 136, 149, 151, 176, DirectX, 2, 11, 61, 62, 64, 65, 66, 87,
177, 188, 196, 197, 199, 211, 221, 270, 283, 284
222, 225, 228, 229, 230, 231, 238, Distance Factor’, 126
246, 262, 287, 288 double-click, 22, 54, 286
292 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
link square, 31, 32, 33, 37, 38, 39, 40, music, 3, 55, 69, 125, 128, 129, 154,
58, 59, 68, 155, 194, 287 235
link squares, 31, 32, 34, 36, 37, 38, 39, MySQL, 250, 251, 252, 254, 255
40, 44, 68, 187, 194 Nature Painting, 132, 134, 180
Linking, 37, 197, 206 Nature painting versus For Loops,
Lite Edition, 61 180
Log bar, 75, 82 network, 260, 261, 262
logic, 25, 153, 154, 159, 160, 171, 184, Network, 55, 187, 261, 262, 263, 264,
223, 224, 228, 231, 254, 257, 264, 265, 267
267, 279 networking, 260
Logic, 3, 9, 25, 118, 128, 147, 153, Networking, 4, 233, 260, 264, 266,
154, 159, 163, 181, 213, 228, 244, 267, 269
264, 274 object, 70
Look At, 208, 210, 211, 221 Object 3D View, 75
Lua, 4, 233, 270, 271, 272, 273, 274, Object Section, 14, 23, 74, 75, 76, 77,
275, 276, 277, 278, 279, 280 90, 95, 96, 98, 100, 101, 107, 110,
lua (scripting), 270 112, 134, 135, 288
Material, 24, 73, 74, 75, 76, 77, 103, ODBC, 250, 252, 253
104, 107, 113, 183, 283, 285 ODE, 55, 209, 233, 238, 239, 240, 241,
Math, 3, 153, 164, 171, 174 242, 243, 244, 245, 246, 248, 249
Mathematical operators, 3, 153, 205, Operator, 153, 189, 205, 206, 213, 214,
210, 212, 213, 216 215, 220, 221
Matrix, 54, 115, 193, 196, 205, 206, Parameters, 199
208, 210, 211, 213, 214, 220, 221, Parent, 31, 206, 210, 248
246, 248, 261, 267 Parenting, 206
Maya, 2, 4, 87, 110, 130, 282, 284 Particle, 3, 54, 69, 138, 139, 140, 141,
Mipmaps, 92 142
Modeling, 282 Particle Flow Grid, 139, 141
motion, 73 pathfinding, 7, 217, 219
Motion, 73, 81, 122, 129, 138, 182, Pathfinding, 3, 133, 134, 136, 137,
193, 194, 205, 206, 208, 210, 211, 153, 217, 219, 220, 223, 288
215, 217, 218, 219, 220, 221, 222, physics, 7, 233, 238, 239, 244, 245,
238, 244, 245, 248, 267 249
Motion Planning, 219, 221 Physics, 4, 55, 233, 238, 244, 247,
motionset, 144 248, 249
Motionset, 55, 144, 145, 146, 147, 148, polygon, 71
149, 151, 152 Polygon Object, 239, 241, 244
motionset blender, 145 Polytrans, 87
multiplayer, 260 position, 19, 22, 28, 29, 40, 45, 73, 77,
Multiple passes, 131 81, 85
294 Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l
Project Camera, 59, 90, 101, 102, 117, Save, 9, 15, 47, 48, 55, 60, 64, 65, 66,
129, 137, 148, 151, 191, 193, 211, 88, 127
246 screensaver, 61, 64
Project management, 4, 233, 234 scripting, 4, 233, 270, 271, 278, 279,
properties, 3, 5, 14, 41, 44, 47, 69, 75, 280
78, 79, 81, 84, 85, 86, 89, 91, 101, sections, 14
103, 105, 106, 114, 125, 126, 128, server, 67, 254, 255, 260, 261, 263,
131, 134, 135, 139, 141, 142, 148, 264, 265, 267, 269
156, 157, 161, 163, 165, 167, 172, shadow planes, 108
173, 174, 182, 185, 186, 187, 188, shadows, 3, 7, 69, 96, 106, 108, 109,
189, 191, 193, 194, 198, 225, 229, 110, 111, 112, 113, 132
230, 231, 240, 244, 246, 248, 250, Shadows, 108
252, 254, 255, 257, 264, 270, 274, shortcut, 11, 111, 112, 122, 123, 129,
279, 280, 287 137, 142, 151, 152, 181, 182, 183,
Public Call Channel, 197, 198, 200, 193, 194, 210, 211, 215, 220, 221,
203, 279 222, 223, 228, 244, 245, 246, 248,
publishing, 68 257, 287, 288
Queries, 250 shortcuts, 4, 43, 194, 211
real-time, 5, 7, 16, 51, 71, 72, 91, 106, skeleton, 143, 144
108, 109, 132, 153, 175, 205, 238, Sky domes, 131
270 sliders, 69, 76, 77, 120, 122
references, 43, 187 smoothing, 282
Reflection map, 95, 103 smoothing group, 282
Reject Alpha Pixels, 100, 104 sound, 11, 78, 125, 126, 128, 129, 234,
render, 51, 56, 96, 112, 117, 118, 132, 235
176, 181, 202, 203 Sound, 3, 55, 69, 125, 126, 128, 129,
Render, 25, 54, 56, 57, 58, 59, 90, 107, 235
108, 111, 112, 117, 118, 141, 147, Sound Command, 126, 128, 129
148, 159, 179, 202, 203, 210, 279 special effects, 138, 139, 234
resolution, 56, 113, 121, 174 Specular, 73, 74, 77, 90
RGB, 33, 74, 120 Stand-alone, 61, 62
Rolloff Factor’, 126 Stencil Shadow, 108, 112
Run, 65, 75, 81, 86, 90, 117, 118, 122, surface, 71
123, 128, 129, 137, 150, 151, 152, Surface properties, 101, 105
161, 162, 172, 173, 174, 182, 214, surfaces, 54, 75, 92, 98, 99, 104, 113,
215, 222, 223, 230, 231, 245, 246, 115, 130, 141, 282
249, 257, 258, 265, 278, 279, 280, template, 21, 54, 57, 59, 68, 86, 90,
284, 287, 288 111, 115, 117, 118, 141, 142, 148,
Run/Edit, 75, 81, 287 151, 181, 182, 215, 239, 287
templates list, 19
Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l 295