quest3d 3.0 tutorial manual

295
  version 3 tutorial manual

Upload: bocevski

Post on 03-Nov-2015

112 views

Category:

Documents


5 download

DESCRIPTION

Quest3D 3.0 Tutorial Manual

TRANSCRIPT

  • version 3

    tutorial manual

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    2

    Copyright 2005 by Act-3D B.V. 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. Macromedia ,Director and Flash are trademarks or registered trademarks of Macromedia, Inc. Photoshop is a trademark or registered trademark of Adobe, Inc. Microsoft, DirectX, Windows, Internet Explorer, Excel, PowerPoint, and Visual Basic are trademarks or registered trademarks of Microsoft corporation. 3D Studio MAX, BiPed and Physique are trademarks or registered trademarks of Discreet inc. Maya,is a trademark or registered trademark of Alias|Wavefront. Lightwave 3D is a trademark or registered trademark of Newtek inc. 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. Published byAct-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 Schnau Fog, Pjotr van Schothorst and Erwin Wolf. Cover notes: * Enterprise Edition ** VR Edition 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

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    4

    Part IV: Expert level 233 4.1 Project management ...................................................................................234 4.2 Physics simulation ......................................................................................238 4.3 Database connectivity.................................................................................250 4.4 Networking..................................................................................................260 4.5 Lua scripting................................................................................................267

    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

    Part I: Getting started What follows is a brief overview of the chapters in this part of the manual. Chapter 1.1: Introduction This chapter is a word of welcome to Quest3D. Chapter 1.2: How to use this manual This book is organised in a specific way. Its structure and format is explained here. Chapter 1.3: Quest3D installation The Quest3D program must be installed on a computer before it can be used. This chapter offers the details. Chapter 1.4: Example scenes The example scenes that come with the software package demonstrate a number of Quest3D features. Chapter 1.5: The Quest3D user interface This chapter is a guide to using the application. In addition, it introduces channels, the building blocks of Quest3D programs. Chapter 1.6: Channels Channels are at the heart of any Quest3D project. General properties are covered here. Chapter 1.7: Program flow Quest3D projects are executed in a specific way, and updated in real-time. This chapter explains more. Chapter 1.8: Templates Templates are predefined channels or groups of channels. A quick list of the functionality in Quest3D is given here. Chapter 1.9: 3D scenes Virtual scenes consist of a number of elements, such as 3D objects, a camera and lights.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    6

    Chapter 1.10: Publication Projects made in the editor can be saved as stand-alone programs. Chapter 1.11: Summary This chapter reviews some of the topics covered in this first part of the manual.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    7

    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. Though 3D computer graphics have reached a mainstream status, actually creating them still requires much effort. Only with proper, dedicated tools is it possible to produce convincing results in a timely manner. Quest3D is the perfect software package for creating interactive 3D scenes. Examples include product presentations, architectural visualisations, virtual trainings and computer games. Quest3D features a unique style of programming. Instead of having to write thousands of lines of complex code, developers make use of a large set of powerful building blocks. Both flexible and easy to use, Quest3D appeals to designers , programmers and artists alike. 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. Quest3D has a stunning set of graphics features. Large numbers of animated people, convincing vegetation, shadows, fire and smoke effects and realistic water can all be easily added to a scene. Advanced features include physics simulation, pathfinding routines, database connectivity and networking support. 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. Welcome to the wonderful world of Quest3D!

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    8

    1.2 How to use this manual

    The following text describes the organisation of this manual. Parts This book is divided into four parts. Part I, Getting started, is an introduction to Quest3D. Part II, The virtual studio, discusses 3D objects and animation in great

    detail. Part III, Programming, takes a closer look at the heart of a Quest3D project

    the code. Part IV, Expert level, deals with advanced features, some of which are only

    available in certain editions of Quest3D. 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: C:\Program Files\Act-3D\Quest3D 3.0\Tutorials\ Format The following formats have been used throughout this manual. New concepts are printed in bold.

    Example: Quest3D building blocks are called channels.

    Channels (single building blocks) already used in a Quest3D program are printed between single quotes, with capitals for every word.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    9

    Example: Connect the Logic channel to the Start Scene channel.

    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

    Options from the Application menu are printed as follows. Example: File > Save Group As

    Files and directories are printed in an Arial font. Example: C:\Program Files\Act-3D\Quest3D 3.0\

    Subfolders of the Quest3D directory are referred to as follows. Example: ..\Resources\Textures\

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    10

    1.3 Quest3D installation

    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

    If the window does not appear automatically: On the Windows Desktop, double-click on the My Computer icon.

    Double-click on the drive containing the cd-rom. Double-click on the file Autorun or Autorun.exe. After a few moments, a window comes up asking if you want to install

    Quest3D. Quest3D installation (continued) Select the option, Install Quest3D. Proceed with installation by pressing the Next button. The default installation directory is:

    C:\Program Files\\Act-3D\Quest3D 3.0\

    It is recommended to accept the default installation directory. Confirm by clicking on the Next button.

    It is recommended to create a shortcut to the Quest3D program on the desktop. Press Next to proceed.

    Press Install. Quest3D will now be copied onto your computer. This may take a few moments.

    Press Finish to complete the install. Quest3D relies on an extension of Microsoft Windows called DirectX. It contains advanced graphics and sound functionality. DirectX 9.0c or higher needs to be installed before Quest3D can be used. 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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    12

    Starting Quest3D Press the Windows Start Button.

    From the Start Menu that comes up, choose: Programs > Act-3D > Quest3D 3.0 > Quest3D 3.0

    When asked, enter your Quest3D license key.

    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

    1.4 Demonstation scenes

    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. To view the demonstration scenes: Insert the Quest3D cd-rom into the cd-rom drive of your computer.

    After a few moments, a viewer window comes up.

    If the viewer window does not appear automatically: On the Windows Desktop, double-click on the My Computer icon. Double-click on the drive containing the cd-rom. Double-click on the file Autorun or Autorun.exe.

    After a few moments, a viewer window comes up. 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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    14

    1.5 Quest3D User Interface

    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.

    The Channels Section is the heart of Quest3D. Quest3D shows the Channels Section on start-up. In the Channels Section you will build the foundation of all projects you create.

    The Animation Section is where 3D objects, cameras and lights are positioned and animated. It contains a large preview window perfect for testing projects.

    The Object Section is where 3D objects are prepared and pollished. Quest3D provides a wide range of options to tweak object surface properties such as color and texture.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    15

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    16

    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.

    Interface elements in several Sections Certain windows and buttons can be found in several different Sections throughout the Quest3D program. For example, the Channel Section layout includes an Animation 3D View window.

    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.

    These windows can be accessed by clicking on the appropriate Tab name. 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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    18

    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.

    Quest3D building blocks channel information or functionality to other building blocks. Hence the name channel. 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

    Adding channels to a program The Templates List on the left side of the screen contains all available Quest3D building blocks.

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    20

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    22

    Standard user actionsMuch of the Quest3D user interface works like other Windows software packages. The following lists describe a number of important actions in Quest3D. These terms are used throughout this manual. Move the mouse cursor to a specific position

    Move the mouse to move the on-screen 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

    Tutor ia l

    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: Programs > Act-3D > Quest3D 3.0 > Quest3D 3.0

    The Quest3D splash screen comes up first. Click on it to proceed to the program.

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    24

    Go to the Surface tab by pressing the appropriate name.

    Go back to the Material tab. Go to the Big Channel Section. Examine the screen. The largest area on the screen, with the light blue

    background, is called the Channel Graph. It contains all channels that make up your program. At the moment, there is only one channel named Project Start.

    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

    Zoom out for an overview of the channels in a project. 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).

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    26

    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.

    Click anywhere on the blue background to deselect the Project Start channel. Note the red selection outline disappears.

    Position the mouse cursor over the Project Start channel. To move the channel, press and hold down the left mouse button and move the mouse.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    28

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    30

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    32

    An input link square without a Child connected to it receives no input data. Often, empty input link squares are set to 0. 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 name of the channel in the image below is Clear Screen.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    33

    This channel is used to change the background color of a project. Colors in a computer program often consist of a red, green and blue component. Therefore, colors are often stored as a set of RGB values. The Clear Screen channel accepts three childen of type Value: one for the each of the RGB color components. Link square information can be viewed in a similar way as channel information. The pop-up window displays a link squares name and Basetype. The first link square of the Clear Screen channel in the image below is called R. It represents the red component of the channels 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

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    34

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    36

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    38

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    40

    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

    Channel Properties window Double clicking a channel will bring up the Channel Properties window specific to that channel. The image below shows the properties or dialog window that belongs to the Value channel.

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    42

    The name of a channel can be changed through the General Properties command. Selecting the Channel Properties option results in the same window as double clicking a channel.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    43

    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. Channels shortcuts can be created through a channels Context Menu. Shortcuts can also be made by right clicking on the arrow of a link between two channels. A menu with a single option appears.

    The image on the right shows the result of the operation. 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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    44

    Tutor ia l

    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.

    System \ Clear Screen

    Add the following channel. Variables \ Value \ Value

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    45

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    46

    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

    Make sure the Animation 3D View window is visible by pressing the Animation 3D View tab in the lower left hand corner of the screen.

    Double click on the Value channel to open its properties window.

    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: C:\Program Files\Act-3D\Quest3D 3.0\Projects\

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    48

    Type in a name, for example Introduction to channels.

    Press the Save button to accept.

    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: C:\Program Files\Act-3D\Quest3D 3.0\ 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: C:\Program Files\Act-3D\Quest3D 3.0\Tutorials\1.6 Channels\

    Open the file Channels Complete.cgr. Analyse the finished scene and see if you understood this tutorial. 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

    1.7 Program flow

    A Quest3D program begins with a Start Channel. A Start Channel is marked by a large arrow pointing down.

    The Set as start channel option in a channels 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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    50

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    52

    In the image below the flow of the Channel Group is visible.

    1. The start of each frame. 2. Channel Callers work from left to right, therefore the Start Channel calls the

    left channel called Caller 1 first. 3. The Caller 1 channel calls the hierarchy beneath it. This hierarchy starts

    with a channel of the type 3D Object named Box Object. This channel display a box on screen, visible in image above on the right hand side.

    4. After executing the hierarchy on the left hand side, the Start Channel continues with its second child, Caller 2.

    5. The Caller 2 channel calls its child Fire Object. This channel and its children create the fire object seen in the image above.

    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

    Tutor ia l

    The following exercise illustrates the flow of a Quest3D program. Needed Quest3D scene: ..\Tutorials\1.7 Program flow\Program flow.cgr 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

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    54

    1.8 Templates

    A template is a predefined channel or group of channels designed to speed up the workflow. Templates can immediately be used in a scene. A benefit of working with templates is that you dont have to understand each of the components right away. Later on, when you are more familiar with Quest3D, you can take a better look at all the various templates. You can even build your own. 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. Category Description Example templates Scene 3D stage setup Render

    Camera Light

    Objects 3D objects, surfaces and special effects Primitive Object Texture Particle System Pixel Shader Vertex Shader

    Logic Conditions and triggers in a program Channel Caller If Trigger Channel Switch User Input Finite State Machine Motionplanning

    Variables Data containers and operators Value Vector Matrix Text Expression Value

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    55

    Category Description Example templates Animation Timers, regular and character animation Timer Value

    Timer Command Motionset

    Sound Sound and music Wav File Mp3 File Sound Command

    Physics Physics simulation (based on Open Dynamics Engine)

    ODE Body ODE Joint ODE Command

    Network Connecting multiple computers Network Value Network Text Network Actions

    Database Connecting to a database DB Source DB Query DB Value

    Dynamic Loading

    Dynamic loading of parts of a program Save Channel to Buffer Array Buffer Remove Group

    Windows Pop-up windows Message Box File Dialog Open URL

    Viewers Project viewers ActiveX Event WinAmp Waveform

    System System information and commands System Info System Command

    VR Virtual reality support Glove

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    56

    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 Render channel is used to display 3D objects on the screen. The Start 3D Scene channel is used to initialise the 3D environment. It handles, amongst other things, screen resolution and background color. 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

    Tutor ia l

    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: 3D Items \ Start 3D Scene 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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    58

    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. Its 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 an Object Inspection Camera template onto the Channel Graph. Connect the Object Inspection Camera channel to the first child link square

    of the Render channel. Make sure the Animation 3D View window in the lower-left corner of the

    screen displays your scene using the Project Camera. The Project Camera

    icon is located on the Toolbar. Add a Primitive Object template and connect the 3D Object channel to the

    second child link of the Render channel. Note the 3D object is displayed in the Animation 3D View window.

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    60

    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:

    C:\Program Files\Act-3D\Quest3D 3.0\Projects\

    As name, type in 3D scenes. Press the Save button to accept. 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. Depending on the Quest3D license you work with, a number of publishing options are available. Can publish to type Lite

    Professional Enterprise

    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. All Quest3D programs require DirectX 9.0 or higher to be installed on a target computer. DirectX is a free extension pack for Microsoft Windows and can be downloaded from their site: http://www.microsoft.com/directx/download/ [~10 MB] Viewer files: .q3d Quest3D projects can be published to Viewer files with extension .q3d. Quest3D programs published in this manner can be run using the Quest3D Viewer by simply starting the .q3d file itself.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    62

    The Quest3D Viewer Package must be installed on a target computer in order to run .q3d project files. The Quest3D Viewer Package may be downloaded freely from the following location: http://www.quest3d.com [~1.6 MB] Internet ActiveX: .q3d and .htm Files of type .q3d can also be viewed in an internet browser that supports ActiveX. The .q3d file must be linked from a regular webpage to show. Web pages containing Quest3D media elements will automatically try to download and install the Quest3D Viewer Package from the Quest3D.com website. The user may cancel this operation. Stand-alone programs: .exe A Quest3D project can also be published to a stand-alone self-executing .exe file. Besides DirectX, this type of publication requires no additional components. Installation files: .exe Installers are .exe archive files that copy and expand a program to a specified directory on a harddisk. 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

    Tutor ia l

    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. Needed Quest3D scene: ..\Tutorials\1.10 Publication\Publication.cgr 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.

    Type in Product Visualisation in the Title box. Click on the Browse button to define a directory and name to save the

    published file to. Locate the ..\Tutorials\2.9 Publication\ folder.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    64

    Type in Product_Visualisation in the File name box and press Save to confirm.

    From the Publish type drop-down list, choose Project File (viewer and web-plugin).

    Tick the box Save current project before publishing if it isnt selected yet. In the Project folder content window, make sure the box for

    Publication.cgr is selected. Press the Publish button. Quest3D asks you if you want to save all channel groups. Press Yes to

    confirm. The .exe version of your program is saved into your project directory. A progress bar appears, and disappears when the publication process is done.

    Minimize the Quest3D editor program by pressing the minimize icon in

    the top right corner of the screen. On the Windows Desktop, double-click on the My Computer icon.

    Locate the following folder: C:\Program Files\Act-3D\Quest3D 3.0\Tutorials\2.9 Publication\

    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. Return to the Quest3D editor program. The Project Publishing window should still be open. If it is not, from the

    Applications Menu choose File > Publish. From the Publish type drop-down list, choose Executable (Standalone,

    Installer, Screensaver, WinAmp).

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    65

    Press the Options button. Select Self executing project (click and run) and press OK to confirm. Press the Publish button. The scene is saved to the same directory as before. Locate the file Product_Visualisation.exe in the directory

    ..\Tutorials\Publication\ and double click it. The scene will load as stand-alone application.

    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 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. Return to the Quest3D editor program. The Project Publishing window should still be open. If it is not, from the

    Applications Menu choose File > Publish. Press the Options button. In the Executable Options window, select Project Installer (added to start

    menu). Change the Default installation folder to C:\Program Files\Product

    Visualisation. Change the Start-menu path (folder / title) to Quest3D Product

    Visualisation\Product Visualisation. Tick the box Run project after installation is completed if it isnt selected

    already. Press OK to confirm. Click on the Browse button. Change the File name to Product_Visualisation_Installer and press Save

    to confirm. Press Publish. The scene is saved to the same directory as before. Locate the file Product_Visualisation_Installer.exe in the directory

    ..\Tutorials\Publication\ and double click it. Follow the on-screen instructions to install the application on your computer.

    When done, the scene will run automatically. Test the scene. When ready, press the Escape key to exit the application. Run the program again: from the Windows Start Menu, choose Programs >

    Quest3D Product Visualisation > Product Visualisation. The application will run.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    66

    Test the scene. When ready, press the Escape key to exit the application. Return to the Quest3D editor program. The Project Publishing window should still be open. If it is not, from the

    Applications Menu choose File > Publish. From the Publish type drop-down list, choose Project File (viewer and web-

    plugin). Press the Options button. Tick the Create HTML file box if it isnt selected already. Change the Title to Product Visualisation. Change the Filename to index.htm. Press OK to confirm. Click on the Browse button. Change the File name to Product_Visualisation and press Save to

    confirm. Press Publish. The scene is saved to the same directory as before. Locate the file index.htm in the directory ..\Tutorials\Publication\ and

    double click it. A webpage is opened in the standard internet browser. The application is embedded in the webpage.

    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

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    68

    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. New channels can be added to a program by dragging a name from the

    Templates List on the left side of the screen onto the Channel Graph. A Template is a predefined channel or group of channels designed to speed

    up the workflow. 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

    Part II: The virtual studio What follows is a brief overview of the chapters in this part of the manual. Chapter 2.1: 3D Objects 3D Objects are at the heart of virtual scenes. Chapter 2.2: Animation Whether over time or based on other input, animation means change. Chapter 2.3: Object import Objects created in other software packages can be imported and used. Chapter 2.4: Surface properties Color, texture and transparency all define the looks of a 3D object. Chapter 2.5: Lighting and shadows Lighting is essential to creating a convincing scene. This chapter has the details. Chapter 2.6: Cameras The point of view plays an important role when it comes to user experience. Chapter 2.7: Graphic user interface Buttons, and sliders let the user interact with a program. Chapter 2.8: Sound and music Templates are predefined channels or groups of channels. A quick list of the functionality in Quest3D is given here. Chapter 2.9: Landscapes Virtual scenes consist of a number of elements, such as 3D objects, a camera and lights. Chapter 2.10: Particle systems Projects made in the editor can be saved as stand-alone programs. Chapter 2.11: Character animation This chapter reviews some of the topics covered in this first part of the manual.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    70

    2.1 3D Objects

    3D scenes on the computer consist of virtual objects. The appearance of these objects is defined by a number of elements. The following image shows a cube object.

    A vertex is a single point in 3D space. Vertices are defined by an X, Y and Z coordinate. The image below shows the vertices of a box object.

    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 tris 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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    72

    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.

    The following image shows an example of a transparency texture. Transparency is defined by a grayscale image from black (completely transparent) to white (completely visible).

    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 objects 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 Material channel is subdivided into a number of aspects: Diffuse, Emissive, Specular, Power, Alpha Diffuse and Texture Blend Factor.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    74

    The Diffuse vector contains an objects 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. Material settings and textures can be adjusted in the Object Section.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    75

    Object Section layout:

    1 Application menu Contains standard functions such as file

    management, configuration and help. 2 Toolbar Icons for file management, channel graph

    view and camera view. 3 Section selection buttons Buttons to quickly switch to one of the

    Sections. 4 Run, Run/Edit, Edit buttons Controls user input handling. 5 Material tab Object material properties 6 Surfaces tab Transparency, blending and object sorting 7 Texture tab Texture mapping and advanced

    transparency and blending. 8 Lighting tab Lightmap texture baking. 9 Animation 3D View tab Displays the entire scene. 10 Object 3D View tab Displays the selected object. 11 Textures tab List of all textures in a project. 12 Surface List List of all surfaces of selected objects. 13 Object List List of all objects in a project. 14 Log bar Debug and error messsages.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    76

    Tutor ia l

    The following tutorial focusses on 3D objects in Quest3D. It is also an introduction to the Object Section of the program. Needed Quest3D scene: ..\Tutorials\2.1 3D objects\3D objects.cgr 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.

    Go to the Channels Section. Link the Texture channel to the Surface channel.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    77

    Go to the Object Section. Note the texture is displayed on the model. Drag the Emissive sliders to a different position. Note how the self-lighting

    of the object changes, regardless of light sources. Drag the Specular sliders to a different position. Note how the color and the

    intensity of the highlight on the model change. Power (P) controls the size of the highlight.

    Click on the name Windows in the Surfaces List to select it. Before you can work with transparency, you need to enable it. Go to the

    Surface Tab. From the Transparency drop-down list select the Alpha Value' option.

    Note the object disappears.

    Go back to the Material tab. Drag the Tex Factor slider to a different position. Note how the

    transparency of the object is affected.

    Finished scene: ..\Tutorials\2.1 3D objects\3D objects 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

    78

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    80

    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

    Animation Section layout:

    1 Application menu Contains standard functions such as file

    management, configuration and help. 2 Toolbar Icons for file management, channel graph

    view and camera view. 3 Section selection buttons Buttons to quickly switch to one of the

    Sections. 4 Run / Run/Edit / Edit

    buttons Controls user input handling.

    5 Object tab Shows list of all objects. 6 Camera tab Shows list and properties of all cameras. 7 Light tab Shows list and properties of all lights. 8 Search filter bar Filters objects in the list. 9 Object List List of all objects in a project. 10 Motion control buttons Move, rotate and scale an object. 11 Transform type-in fields Value fields for position, rotation and size. 12 Configuation toolbar Controls elements such as world scale. 13 Animation 3D View window Displays the 3D scene.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    82

    14 Time Slider Bar Keyframe creation and animation playback per Timer.

    15 Log bar Debug and error messsages. 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 Other types of animation Any channel of base type Value can be used as input for animation. Examples include a highlight effect based on mouse-over events, the length of a status bar based on a complex calculation and even behavior of artificial intelligence characters responding 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

    83

    Tutor ia l

    This tutorial introduces time-based animation in Quest3D. After completing it, you should have an understanding of Envelopes, Timers and Timer Commands. Needed Quest3D scene: ..\Tutorials\2.2 Animation\Animation.cgr 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.

    Go to the Channels Section. Drag another Timer Value onto the Channel Graph. Connect it to all 9

    Envelope channels of the motion of the Blue Sphere object.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    84

    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.

    Go to the Animation Section. Click on the Blue Sphere object in the list on the left hand side of the screen

    to select it. The Time Slider Bar currently displays the Default timer. From the Timer

    List, select Blue Sphere. Press the Play button. Note that the blue sphere is now moving. Note that the

    red sphere does not move, as it is animated through another timer (in this case, the Default timer).

    Press the Stop button. In the End Frame box, change the value to 250. Note that the time slider

    bar is resized in order to show all frames from 0 to 250. Drag the Time Slider to 150, and press the Insert keyframe button .

    Confirm the pop-up window by clicking OK. Note that a keyframe is added onto the Bar.

    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. Go to the Channels Section. Locate the Env X channel, which is part of the position vector of the Blue

    Sphere object. Double click on the Env X channel to open its properties window.

    Click on one of the keyframes to select it, and drag it up or down to change its value.

    Drag the keyframe left and right using the right mouse button. This changes the keyframes position on the horizontal axis (time).

    In the Vert. Value (out) box, type in a value for extra precision. Click OK to accept your changes and close the Envelope editor window.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    86

    Go to the Animation Section. Press Play to examine the adjustments to the animation. When ready, press

    Stop. Go to the Channels Section. Drag a Play & Loop template onto the Channel Graph. Connect it to the Play

    Animation channel. Double click on the Play & Loop channel to open its properties window.

    Select Blue Sphere and press OK to accept. Drag a Stop template onto the Channel Graph. Connect it to the Stop

    Animation channel. Double click on the Stop channel to open its properties window. Select Blue

    Sphere and press OK. Go to the Animation Section. Switch to Run Mode by pressing the button. Press the spacebar. The animation starts playing, and loops. Press the escape key. The animation stops.

    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

    2.3 Object import

    Quest3D comes with a number of directly usable 3D objects. Sooner or later, however, you will want to start using your own models. Various companies and websites worldwide offer complete 3D objects, either for free or commercially. It is also possible to create your own models in software packages such as 3d Studio Max, Maya and Lightwave. .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 > followed by the program directory and version of your choice. Make sure you install the utility to the correct plug-ins subdirectory of the modelling package. Appendix A1 details preparation of 3D objects in and export from 3d Studio Max and Maya. In addition, export and import using Polytrans is described.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    88

    Tutor ia l

    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 programs 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!.

    The directory ..\Resources\3D Models\ on your harddisk contains a number of objects in .X file format. You can also use one of these models to complete this tutorial.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    89

    Needed .X file: ..\Resources\3D Models\Cars\Car.X 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.

    Press OK to accept.

    Note that the 3D model from the .X file is now imported into Quest3D. It is stored in the standard 3D Object 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

    90

    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. Go to the Object Section. Make any adjustments necessary to the model surface. Examples are

    Emissive and Specular values, and transparency settings. Go to the Animation Section. Make sure the Animation 3D View displays the scene using the Project

    Camera .

    Switch to Run Mode by pressing the button. Press and hold down the right mouse button and move the mouse around.

    The view rotates around the object. If you wish, you can save the current scene to a folder on the harddisk.

    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

    2.4 Surface properties

    Much of the look of 3D objects in a scene is defined by their surface properties. This chapter takes a closer look at textures, texture mapping, blending methods and transparency. 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 todays 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. It is recommended to keep texture dimensions as small as possbile, without sacrificing detail. A good rule of thumb is to use sizes no greater than the texture will ever be seen on screen. For example, for buildings in the distance of a scene, 128x128 pixel textures might be enough. Grass planes might not need to be greater than 32x32.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    92

    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.

    By using various versions of increasingly smaller size, these distortions may be countered. These smaller versions of the same texture are called mipmaps and can be generated automatically by Quest3D.

    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. .dds file format The .dds image format can store mipmap information. File size increases, but loading times in Quest3D decrease since no mipmaps have to be generated at startup. 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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    94

    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.

    Since UV coordinates are relative, once an object is properly UV mapped, textures of any size may be applied to the object. Wrapping a texture around a 3D object usually requires more control and precision. In practice, UV mapping means placing every vertex of a 3D object onto a 2D image.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    95

    Complex UV mapping should be done in your favorite 3D modelling software package. Please refer to the manual of your modelling package for more information on UV mapping. Keywords: uv, unwrap, texture, mapping. An advanced form of UV mapping in Quest3D is the Reflection map method. It projects a texture onto a surface based on the current camera position. The image below shows an object with reflection mapping in three different angles, plus the reflection texture.

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    96

    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 various texture stages of a surface may be blended together in a number of ways. In the Object Section, on the Surface tab, the Texture Blending dropdown list provides a number of options. They are similar to the options in the Transparency drop-down list, discussed above.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    97

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    98

    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.

    To overcome such glitches, in general, transparent surfaces should be rendered after non-transparent surfaces. Another means to counter sorting glitches is by setting the Z Bias of a surface. It can be changed in the Object Section, on the Surface tab, in Advanced.. mode. When the exact surface rendering order is unclear, surfaces with a higher Z Bias will be rendered in front of others.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    99

    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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    100

    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

    Tutor ia l

    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 Quest3D scene: ..\Tutorials\2.4 Surface properties\Surface properties.cgr 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.

  • Q u e s t 3 D 3 . 0 T u t o r i a l M a n u a l

    102

    Switch to the Editor Camera by clicking on its icon . Look at the landscape from above. Note the green surface needs a texture. Click on the Landscape object in the list to select it. Click on the Grass surface in the list to select it. On th