QSDK Documentation
[ Previous ] [ Up ] [ Next ]

Tutorial: Creating a Q Effect

This page provides a walkthrough of placing a particle effect in a scene.

Before you start

This page indicates how to use Q tools (mip builder and QDS) to create a Q file for the tutorial. If you wish to skip this step, or you did not install the documentation locally, a prebuilt Q file is available here:

 After you have downloaded/located the pre-built Q file proceed to the Overview. You are advised to copy the Q file or source materials to a new folder before starting the tutorial.

Building the initial Q file

The texture used in this tutorial is made available in the QStudio release as <installdir>/QSDK/qstudio-docs/tutorial/fxtest/fxtex.tga. 

Before we use the texture it is advisable, but not essential, to mip-build it in case you do not have sufficient video memory to display the highest resolution. To do this using the following approach you must have the Q SDK, ImageMagick and Perl installed:

  1. go to the directory where you have ImageMagick installed (refer to the Q release for details of ImageMagick).
  2. enter the following:
    perl <installdir>/QSDK/win32/bin/mipBuilder.pl <installdir>/QSDK/qstudio-docs/tutorial/fxtest

any other approach which creates scaled down textures and names them fxtex_1024.tga, fxtex_512.tga, fxtex_256.tga, fxtex_128.tga, fxtex_64.tga, fxtex_32.tga may also be used.

Create a Q file with the sample texture in it. If you don't have one, you can do the following to create a file containing texture fxtex.tga:

  1. go to the directory with the texture fxtex.tga in it
  2. copy class.q to fxtest.q. The file "class.q" is a template Q file that provides necessary base-data for all Q databases. It is found in the QSDK distribution. For a normal windows install, class.q will be located in "<installdir>\QSDK\database\class.q"
  3. at the windows prompt
    > qds fxtest.q
  4. import the texture into the q file by, at the qds prompt,  doing 
    > createTextureFrom fxtex.tga
  5. leave qds
    > quit

Note: you will be shown an alternative way to import textures into QStudio in step 8.

Overview

To place an effect we need to:

  1. load the file into QStudio
  2. define what the atoms will look like (particles with our fxtex image on them) - we'll use two different appearances for this tutorial
  3. define the sequence of different appearances
  4. define how the particles are emitted and how they move
  5. place the effect in the scene
  6. duplicate the effect and rotate the duplicate
  7. persist the effect assets in XML
  8. import the effect assets into a new file
[ Previous ] [ Up ] [ Next ]

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004