1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"[]>
2<html xml:lang="en-US" lang="en-US">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/document.css" type="text/css" />
7    <title>Basic Particle Features</title>
8  </head>
9  <body>
10    <h1>Particle Hierarchical Structure and Coordinate System</h1>
11  <div class="section">
12    <h2><a name="summary" id="summary"></a>Coordinate System Overview</h2>
13    <p>The coordinate system for emitters (<a href="../../../nw/gfx/ParticleEmitter/Overview.html">ParticleEmitter</a>) only controls the emission position and initial velocity.<BR> The coordinate system for models (<a href="../../../nw/gfx/ParticleModel/Overview.html">ParticleModel</a>) influences the drawing and animation of particles after generation.</p>
14    <p>When a particle is born, its position is determined by the emitter. However, coordinate conversion is performed so that its position does not shift when passed to the model. In other words, regardless of how the hierarchy is arranged, emitted particles appear in the emitter position at this point. After emission, particles are drawn using the model coordinate system.
15    </p>
16    <h3>Recommended Structure Example 1: Parent: Model; Child: Hierarchical structure formed by the emitter</h3>
17    <p>Models are controlled by the program.<br /> If the model is moved, the emitter also moves.<BR> The emitter transform can be used as an offset versus the model.<BR> If you move the emitter, only the source of emission moves int eh local coordinate system of the model. Movement of the emitter after particles have been generated does not influence those particles.</p>
18<h3>Recommended Structure Example 2: Do not form a hierarchy of emitters and models</h3>
19    <p><br /> This type of structure is often used when the emission source moves, but generated particles should not follow the emission source. <br />In this case, the model coordinate system does not move.</p>
20    <h2>Option &quot;Locate in World Coordinate System&quot;</h2>
21    <p>As an exceptional option for hierarchical structures, <a href="../../../nw/gfx/res/ResParticleSet/Overview.html">ResParticleSet</a> includes an option (<a href="../../../nw/gfx/res/ResParticleSet/GetIsForceWorld.html">IsForceWorld</a>) for forcing the use of the world coordinate system.<BR> If this option is specified, the world coordinate system is used for the particle set regardless of the hierarchical structure. In other words, status is the same as if there was no hierarchical structure.</p>
22    <p>Tis option is useful for switching between the recommended structure types described above.</p>
23    <h2><a name="scale" id="scale"></a>Usage of Each Scale Type</h2>
24    <h3><a href="../../../nw/gfx/ParticleEmitter/Overview.html">ParticleEmitter</a> Scale</h3>
25    <p>This scale influences the size of the emitter shape and magnitude of the initial velocity of particles being generated.</p>
26    <h3><a href="../../../nw/gfx/ParticleModel/Overview.html">ParticleModel</a> Scale</h3>
27    <p>All coordinates systems for particle sets to be drawn that are located under <a href="../../../nw/gfx/ParticleModel/Overview.html">ParticleModel</a> increase in scale.</p>
28    <p>Specifically:</p>
29    <ul>
30      <li>the intensity of gravity and other force field animations,</li>
31      <li>the location at which particles are drawn,</li>
32      <li>and the size of the particles being drawn</li>
33    </ul>
34<p>are influenced.  </p>
35<h3><a href="../../../nw/gfx/ParticleSet/Overview.html">ParticleSet</a> (<a href="../../../nw/gfx/ParticleCollection/Overview.html">ParticleCollection</a>) PARTICLEUSAGE_SCALE Streams and Parameters</h3>
36    <p>This array stores the scale value of each particle. If the fact that all particles have the same value is established at time of binary output, this single value is mainainted as a parameter at the <a href="../../../nw/gfx/ParticleSet/Overview.html">ParticleSet</a> level.</p>
37    <p>The size of each particle can be changed by the program by manipulating the stream.</p>
38    <h3><a href="../../../nw/gfx/ParticleSet/SetScaleOffset.html">ParticleSet::SetScaleOffset</a></h3>
39    <p>This value is applied when calculating the size of particles by means such as vertex shader billboard processing.</p>
40    <p>You can change just the size of particles without changing their render position. Settings are made at the <a href="../../../nw/gfx/ParticleSet/Overview.html">ParticleSet</a> level.</p>
41    <p> </p>
42    <p>Although this description covers only scale, the same is true for rotation and position.</p>
43    <h2><a name="updatenode" id="updatenode"></a>Precautions When Independently Updating Nodes
44    </h2>
45    <p>Although updates such as TransformNode are usually performed using SceneUpater, sometimes you want to use an independent implementation in an application for greater speed.</p>
46    <p>Correct values must be obtained for particles using the following methods.</p>
47    <ul>
48      <li>ParticleModel::WorldMatrix()</li>
49      <li>ParticleModel::InverseWorldMatrix()</li>
50      <li>Emitter::WorldMatrix()</li>
51    </ul>
52    <p>In addition, in order to render, correct values must be obtained for Camera, obtainable using the GetActiveCamera() function of the RenderContext class, using the following methods.</p>
53    <ul>
54      <li>Camera::ViewMatrix()</li>
55      <li>Camera::InverseViewMatrix()</li>
56      <li>Camera::ProjectionMatrix()</li>
57    </ul>
58    <p>It is particularly important to note that inverse arrays are cached internally and, depending on the setting method, are not recalculated automatically.</p>
59  </div>
60  <hr><p>CONFIDENTIAL</p></body>
61</html>
62