source: OGRE/trunk/ogrenew/Docs/manual/manual_32.html @ 692

Revision 692, 13.4 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1<HTML>
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3<!-- Created on , 12 2006 by texi2html 1.64 -->
4<!--
5Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
6            Karl Berry  <karl@freefriends.org>
7            Olaf Bachmann <obachman@mathematik.uni-kl.de>
8            and many others.
9Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
10Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
11 
12-->
13<HEAD>
14<TITLE>OGRE Manual v1.2.0 ('Dagon'): Standard Particle Affectors</TITLE>
15
16<META NAME="description" CONTENT="OGRE Manual v1.2.0 ('Dagon'): Standard Particle Affectors">
17<META NAME="keywords" CONTENT="OGRE Manual v1.2.0 ('Dagon'): Standard Particle Affectors">
18<META NAME="resource-type" CONTENT="document">
19<META NAME="distribution" CONTENT="global">
20<META NAME="Generator" CONTENT="texi2html 1.64">
21<LINK TYPE="text/css" rel="stylesheet" href="../style.css"> 
22</HEAD>
23
24<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
25
26<A NAME="SEC192"></A>
27<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
28<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_31.html#SEC191"> &lt; </A>]</TD>
29<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_26.html#SEC145"> Up </A>]</TD>
30<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_33.html#SEC200"> &gt; </A>]</TD>
31<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
32<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
33<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
34<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
35</TR></TABLE>
36<HR SIZE=1>
37<H3> 3.3.6 Standard Particle Affectors </H3>
38<!--docid::SEC192::-->
39Ogre comes preconfigured with a few particle affectors. New ones can be added by creating plugins: see the Plugin_ParticleFX project as an example of how you would do this (this is where these affectors are implemented).
40<P>
41
42<UL>
43<LI>
44<A HREF="manual_32.html#SEC193">Linear Force Affector</A>
45<LI>
46<A HREF="manual_32.html#SEC194">ColourFader Affector</A>
47<LI>
48<A HREF="manual_32.html#SEC195">ColourFader2 Affector</A>
49<LI>
50<A HREF="manual_32.html#SEC196">Scaler Affector</A>
51<LI>
52<A HREF="manual_32.html#SEC197">Rotator Affector</A>
53<LI>
54<A HREF="manual_32.html#SEC198">ColourInterpolator Affector</A>
55<LI>
56<A HREF="manual_32.html#SEC199">ColourImage Affector</A>
57</UL>
58<P>
59
60<A NAME="Linear Force Affector"></A>
61<A NAME="SEC193"></A>
62<H3> Linear Force Affector </H3>
63<!--docid::SEC193::-->
64<P>
65
66This affector applies a force vector to all particles to modify their trajectory. Can be used for gravity, wind, or any other linear force. It's extra attributes are:<BR><BR>
67<DL COMPACT>
68<DT>force_vector
69<DD>Sets the vector for the force to be applied to every particle. The magnitude of this vector determines how strong the force is.<BR>
70    format: force_vector &#60;x&#62; &#60;y&#62; &#60;z&#62;<BR>
71    example: force_vector 50 0 -50<BR>
72    default: 0 -100 0 (a fair gravity effect)<BR>
73<DT>force_application
74<DD><P>
75
76Sets the way in which the force vector is applied to particle momentum.<BR>
77    format: force_application &#60;add|average&#62;<BR>
78    example: force_application average<BR>
79    default: add<BR>
80The options are:
81<DL COMPACT>
82<DT>average
83<DD>    The resulting momentum is the average of the force vector and the particle's current motion. Is self-stabilising but the speed at which the particle changes direction is non-linear.
84<DT>add
85<DD>    The resulting momentum is the particle's current motion plus the force vector. This is traditional force acceleration but can potentially result in unlimited velocity.
86</DL>
87</DL>
88<BR>
89To create a linear force affector, include a section like this within your particle system script:
90<TABLE><tr><td>&nbsp;</td><td class=example><pre>affector LinearForce
91{
92    // Settings go here
93}
94</pre></td></tr></table>Please note that the name of the affector type ('LinearForce') is case-sensitive.
95<P>
96
97<A NAME="ColourFader Affector"></A>
98<A NAME="SEC194"></A>
99<H3> ColourFader Affector </H3>
100<!--docid::SEC194::-->
101<P>
102
103This affector modifies the colour of particles in flight. It's extra attributes are:
104<DL COMPACT>
105<DT>red
106<DD>Sets the adjustment to be made to the red component of the particle colour per second.<BR>
107    format: red &#60;delta_value&#62;<BR>
108    example: red -0.1<BR>
109    default: 0<BR>
110<DT>green
111<DD>Sets the adjustment to be made to the green component of the particle colour per second.<BR>
112    format: green &#60;delta_value&#62;<BR>
113    example: green -0.1<BR>
114    default: 0<BR>
115<DT>blue
116<DD>Sets the adjustment to be made to the blue component of the particle colour per second.<BR>
117    format: blue &#60;delta_value&#62;<BR>
118    example: blue -0.1<BR>
119    default: 0<BR>
120<DT>alpha
121<DD>Sets the adjustment to be made to the alpha component of the particle colour per second.<BR>
122    format: alpha &#60;delta_value&#62;<BR>
123example: alpha -0.1<BR>
124default: 0<BR>
125</DL>
126To create a colour fader affector, include a section like this within your particle system script:
127<TABLE><tr><td>&nbsp;</td><td class=example><pre>affector ColourFader
128{
129    // Settings go here
130}
131</pre></td></tr></table><P>
132
133<A NAME="ColourFader2 Affector"></A>
134<A NAME="SEC195"></A>
135<H3> ColourFader2 Affector </H3>
136<!--docid::SEC195::-->
137<P>
138
139This affector is similar to the <A HREF="manual_32.html#SEC194">ColourFader Affector</A>, except it introduces two states of colour changes as opposed to just one. The second colour change state is activated once a specified amount of time remains in the particles life.
140<DL COMPACT>
141<DT>red1
142<DD>Sets the adjustment to be made to the red component of the particle colour per second for the first state.<BR>
143    format: red &#60;delta_value&#62;<BR>
144    example: red -0.1<BR>
145    default: 0<BR>
146<DT>green1
147<DD>Sets the adjustment to be made to the green component of the particle colour per second for the first state.<BR>
148    format: green &#60;delta_value&#62;<BR>
149    example: green -0.1<BR>
150    default: 0<BR>
151<DT>blue1
152<DD>Sets the adjustment to be made to the blue component of the particle colour per second for the first state.<BR>
153    format: blue &#60;delta_value&#62;<BR>
154    example: blue -0.1<BR>
155    default: 0<BR>
156<DT>alpha1
157<DD>Sets the adjustment to be made to the alpha component of the particle colour per second for the first state.<BR>
158    format: alpha &#60;delta_value&#62;<BR>
159example: alpha -0.1<BR>
160default: 0<BR>
161<DT>red2
162<DD>Sets the adjustment to be made to the red component of the particle colour per second for the second state.<BR>
163    format: red &#60;delta_value&#62;<BR>
164    example: red -0.1<BR>
165    default: 0<BR>
166<DT>green2
167<DD>Sets the adjustment to be made to the green component of the particle colour per second for the second state.<BR>
168    format: green &#60;delta_value&#62;<BR>
169    example: green -0.1<BR>
170    default: 0<BR>
171<DT>blue2
172<DD>Sets the adjustment to be made to the blue component of the particle colour per second for the second state.<BR>
173    format: blue &#60;delta_value&#62;<BR>
174    example: blue -0.1<BR>
175    default: 0<BR>
176<DT>alpha2
177<DD>Sets the adjustment to be made to the alpha component of the particle colour per second for the second state.<BR>
178    format: alpha &#60;delta_value&#62;<BR>
179example: alpha -0.1<BR>
180default: 0<BR>
181<DT>state_change
182<DD>When a particle has this much time left to live, it will switch to state 2.<BR>
183    format: state_change &#60;seconds&#62;<BR>
184example: state_change 2<BR>
185default: 1<BR>
186</DL>
187To create a ColourFader2 affector, include a section like this within your particle system script:
188<TABLE><tr><td>&nbsp;</td><td class=example><pre>affector ColourFader2
189{
190    // Settings go here
191}
192</pre></td></tr></table><P>
193
194<A NAME="Scaler Affector"></A>
195<A NAME="SEC196"></A>
196<H3> Scaler Affector </H3>
197<!--docid::SEC196::-->
198<P>
199
200This affector scales particles in flight. It's extra attributes are:
201<DL COMPACT>
202<DT>rate
203<DD>The amount by which to scale the particles in both the x and y direction per second.
204</DL>
205To create a scale affector, include a section like this within your particle system script:
206<TABLE><tr><td>&nbsp;</td><td class=example><pre>affector Scaler
207{
208    // Settings go here
209}
210</pre></td></tr></table><P>
211
212<A NAME="Rotator Affector"></A>
213<A NAME="SEC197"></A>
214<H3> Rotator Affector </H3>
215<!--docid::SEC197::-->
216<P>
217
218This affector rotates particles in flight. This is done by rotating the texture. It's extra attributes are:
219<DL COMPACT>
220<DT>rotation_speed_range_start
221<DD>The start of a range of rotation speeds to be assigned to emitted particles.<BR>
222    format: rotation_speed_range_start &#60;degrees_per_second&#62;<BR>
223example: rotation_speed_range_start 90<BR>
224default: 0<BR>
225<DT>rotation_speed_range_end
226<DD>The end of a range of rotation speeds to be assigned to emitted particles.<BR>
227    format: rotation_speed_range_end &#60;degrees_per_second&#62;<BR>
228example: rotation_speed_range_end 180<BR>
229default: 0<BR>
230<DT>rotation_range_start
231<DD>The start of a range of rotation angles to be assigned to emitted particles.<BR>
232    format: rotation_range_start &#60;degrees&#62;<BR>
233example: rotation_range_start 0<BR>
234default: 0<BR>
235<DT>rotation_range_end
236<DD>The end of a range of rotation angles to be assigned to emitted particles.<BR>
237    format: rotation_range_end &#60;degrees&#62;<BR>
238example: rotation_range_end 360<BR>
239default: 0<BR>
240</DL>
241To create a rotate affector, include a section like this within your particle system script:
242<TABLE><tr><td>&nbsp;</td><td class=example><pre>affector Rotator
243{
244    // Settings go here
245}
246</pre></td></tr></table><P>
247
248<A NAME="ColourInterpolator Affector"></A>
249<A NAME="SEC198"></A>
250<H3> ColourInterpolator Affector </H3>
251<!--docid::SEC198::-->
252<P>
253
254Similar to the ColourFader and ColourFader2 Affector?s, this affector modifies the colour of particles in flight, except it has a variable number of defined stages. It swaps the particle colour for several stages in the life of a particle and interpolates between them. It's extra attributes are:
255<DL COMPACT>
256<DT>time0
257<DD>The point in time of stage 0.<BR>
258    format: time0 &#60;0-1 based on lifetime&#62;<BR>
259example: time0 0<BR>
260default: 1<BR>
261<DT>colour0
262<DD>The colour at stage 0.<BR>
263    format: colour0 &#60;r&#62; &#60;g&#62; &#60;b&#62; [&#60;a&#62;]<BR>
264example: colour0 1 0 0 1<BR>
265default: 0.5 0.5 0.5 0.0<BR>
266<DT>time1
267<DD>The point in time of stage 1.<BR>
268    format: time1 &#60;0-1 based on lifetime&#62;<BR>
269example: time1 0.5<BR>
270default: 1<BR>
271<DT>colour1
272<DD>The colour at stage 1.<BR>
273    format: colour1 &#60;r&#62; &#60;g&#62; &#60;b&#62; [&#60;a&#62;]<BR>
274example: colour1 0 1 0 1<BR>
275default: 0.5 0.5 0.5 0.0<BR>
276<DT>time2
277<DD>The point in time of stage 2.<BR>
278    format: time2 &#60;0-1 based on lifetime&#62;<BR>
279example: time2 1<BR>
280default: 1<BR>
281<DT>colour2
282<DD>The colour at stage 2.<BR>
283    format: colour2 &#60;r&#62; &#60;g&#62; &#60;b&#62; [&#60;a&#62;]<BR>
284example: colour2 0 0 1 1<BR>
285default: 0.5 0.5 0.5 0.0<BR>
286<DT>[...]
287<DD></DL>
288The number of stages is variable. The maximal number of stages is 6; where time5 and colour5 are the last possible parameters.
289To create a colour interpolation affector, include a section like this within your particle system script:
290<TABLE><tr><td>&nbsp;</td><td class=example><pre>affector ColourInterpolator
291{
292    // Settings go here
293}
294</pre></td></tr></table><P>
295
296<A NAME="ColourImage Affector"></A>
297<A NAME="SEC199"></A>
298<H3> ColourImage Affector </H3>
299<!--docid::SEC199::-->
300<P>
301
302This is another affector that modifies the colour of particles in flight, but instead of programmatically defining colours, the colours are taken from a specified image file. The range of colour values begins from the left side of the image and move to the right over the lifetime of the particle, therefore only the horizontal dimension of the image is used. Its extra attributes are:
303<DL COMPACT>
304<DT>image
305<DD>The start of a range of rotation speed to be assigned to emitted particles.<BR>
306    format: image &#60;image_name&#62;<BR>
307example: image rainbow.png<BR>
308default: none<BR>
309</DL>
310To create a ColourImage affector, include a section like this within your particle system script:
311<TABLE><tr><td>&nbsp;</td><td class=example><pre>affector ColourImage
312{
313    // Settings go here
314}
315</pre></td></tr></table><P>
316
317<A NAME="Overlay Scripts"></A>
318<HR SIZE=1>
319<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
320<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_31.html#SEC191"> &lt; </A>]</TD>
321<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_26.html#SEC145"> Up </A>]</TD>
322<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_33.html#SEC200"> &gt; </A>]</TD>
323<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
324<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
325<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
326<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
327</TR></TABLE>
328<BR> 
329<FONT SIZE="-1">
330This document was generated
331by <I>Steve Streeting</I> on <I>, 12 2006</I>
332using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
333"><I>texi2html</I></A>
334
335</BODY>
336</HTML>
Note: See TracBrowser for help on using the repository browser.