From 3123f35681594c7366686582f31adb84dc10a17c Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Fri, 4 Dec 2020 17:13:48 +0100 Subject: [PATCH] first commit --- ch01/pg1_1.htm | 73 +++++++++++++++++++++ ch02/pg2_1.htm | 162 ++++++++++++++++++++++++++++++++++++++++++++++ ch03/pg3_1.htm | 100 ++++++++++++++++++++++++++++ ch04/pg4_1.htm | 94 +++++++++++++++++++++++++++ ch05/pg5_1.htm | 132 +++++++++++++++++++++++++++++++++++++ ch06/pg6_1.htm | 67 +++++++++++++++++++ index.html | 115 ++++++++++++++++++++++++++++++++ styles/design.css | 23 +++++++ 8 files changed, 766 insertions(+) create mode 100644 ch01/pg1_1.htm create mode 100644 ch02/pg2_1.htm create mode 100644 ch03/pg3_1.htm create mode 100644 ch04/pg4_1.htm create mode 100644 ch05/pg5_1.htm create mode 100644 ch06/pg6_1.htm create mode 100644 index.html create mode 100644 styles/design.css diff --git a/ch01/pg1_1.htm b/ch01/pg1_1.htm new file mode 100644 index 0000000..bd692ba --- /dev/null +++ b/ch01/pg1_1.htm @@ -0,0 +1,73 @@ + + +Particle Manual: Introduction + + + +

Particle Manual

+
+ +

1 Introduction

+ +The particle system defined in the engine encompasses more than just flying +sprites. +
+The particle system is a pipeline through which models, beams and +trail effects can be defined and utilized by the game-logic without having to +know how to program a single line of code. + +

In this document we'll go over the conventions and commands you need to look +at if you want to create particle effects. + +

1.1 What is a particle config?

+ +Particle configs short text scripts that define the properties of a particle +effect as it appears and interacts in a game world. +
+For example, it defines which textures and shapes are used and if they emit +sound, light or collide with the geometry around them. + +

Particle configs are located in the particles/ directory, using the '.cfg' +file extension. + +

Contained within a particle config we can define multiple effects of similar +nature. Let's look at the particle config: 'particles/volume.cfg' which as of +this writing only contains one entry: + +

+r_part dustmote
+{
+	texture		ball
+	type			normal
+	count			1
+	blend			add
+	rgbf 0 0 0
+	alpha 0
+
+	rampmode lerp
+	ramp 0 0 0 0 0.5
+	ramp 0 0 0 0 0.5
+	ramp 0 0 0 0 0.5
+	ramp 255 255 190 0.5 0.5
+	ramp 0 0 0 0 0.5
+
+	die				10 5
+	gravity			1
+	scalefactor		0
+} 
+
+ +

This is a more complex material, dealing with pre-programmed color and alpha +changes over time to create the effect of dust traveling inside a volume. + +

1.2 Particle Name & File Conventions

+The first line tells the engine that we're defining a new particle effect with +the name 'dustmote'. +
+As this effect is defined in the file 'volume.cfg', the +name by which this specific effect will be accessible is 'volume.dustmote'. + +

Back | Home | Next + + + diff --git a/ch02/pg2_1.htm b/ch02/pg2_1.htm new file mode 100644 index 0000000..fd97dca --- /dev/null +++ b/ch02/pg2_1.htm @@ -0,0 +1,162 @@ + + +Particle Manual: General Keywords + + + +

Particle Manual

+
+

2 General Keywords

+ +

2.1 type <mode>

+

+	How the particles look.
+
+	Mode may be:
+		beam: valid only for trails. Particles form a single textured beam acting as nodes along it.
+		spark: particles are lines, their length depending upon their speed.
+		sparkfan: particles are non-planar triangle fans, their length depending upon their speed.
+		texturedspark: textured particles are aligned along their direction of movement, their length depending upon their speed, width equal to their scale.
+		cdecal/decal: particles are spawned only upon bsp geometry. They are clipped by it.
+		udecal: unclipped decal. exact semantics are subject to change.
+		normal/*default*: Particles are regular, rotating, 2d images.
+
+ +

2.2 count <min> <max>

+

+	Point/box effects only (not trails or beams)
+	Specifies how many particles are spawned per effect (some classic effects contain an extra scaler which is multiplied by the resulting value)
+
+ +

2.3 assoc <effectname>

+

+	Specifies another effect to spawn at the same time that this effect is spawned.
+	Thus allowing two sets of particles from one effect.
+
+ +

2.4 die <maximum age> <minimum age>

+

+	Specifies the maximum age of the particle, in seconds.
+
+ +

2.5 spawnmode <mode> [arg1] [arg2]

+

+	This affects how particles are positioned when they first spawn, and their initial velocities.
+
+	For point effects, mode may be one of:
+		box: simple axially aligned box of particles.
+		circle: particles spawn within a ball with uniform distance from the center. none will appear in the middle.
+			arg1: percentage of the circle to cover. a value of 5 will go around the circle 5 separate times. this can be used for weird beam effects.
+			areaspread: the radius of the ball
+			areaspreadvert: the height of the ball. if 0, will be a flat circle
+		ball: particles spawn randomly within a ball.
+			areaspread: the radius of the ball
+			areaspreadvert: the height of the ball. if 0, will be a flat circle.
+		telebox: matches quake's telebox
+		lavasplash: like chthon's lava splash
+		uniformcircle: particles are spawned in a circle with uniform distance between and from the center. z=0.
+		syncfield: particles spawn at predictable locations based upon time within a rough sphere. Only useful for effects that are regenerated+replaced every frame.
+		distball:
+		*default*: regular box. particles are spawned inside an axially aligned box.
+
+	For trail effects, mode may be one of:
+		spiral: particles are given velocities perpendicular to the direction based on the distance moved.
+		tracer: particles spawn with alternating horizontal velocities (a wake effect).
+		*default*: particles spawn as a regular trail.
+
+ +

2.6 clippeddecal <mask> [match]

+

+	Implies 'type decal'.
+	The two extra args allow you to spawn these decals ONLY on surfaces with matching surfaceflags.
+	Separation of mask+match allows you to create many descrete surface types instead of being limited to 32 bits/types.
+
+ +

2.7 spawntime <value>

+

2.8 spawnchance <value>

+ + +

2.9 emit <effectname>

+

+	Specifies the effect to periodically emit.
+
+ +

2.10 emitinterval <min>

+

+	Particles will not emit additional effects for this duration after emitting one.
+
+ +

2.11 emitintervalrand <extra>

+

+	FIXME: fold into emitinterval
+
+ +

2.12 emitstart <seconds>

+

+	Prevents the particle from emitting anything for this duration when it first spawns.
+
+ +

2.13 perframe

+

+	Apply inverse frametime to count (causes emits to be per frame).
+
+ +

2.14 averageout

+

+	Average trail points from start to end, useful with t_lightning, etc
+
+ +

2.15 nostate

+

+	Causes the particle system to ignore all state information.
+
+ +

2.16 sound <name> [options]

+

+	Plays a sound when the effect is spawned.
+	Only ONE sound will be used, picked randomly from the included sounds according to their weights.
+
+	Options are:
+		vol=
+		attn=
+		pitch=
+		delay=
+		weight=
+
+ +

2.17 model <name> [options]

+

+	Spawns sprites or models that fly away with random angles and run through
+	some frame sequence. handy for simple gib effects.
+
+	Options are:
+		frame=
+		framestart=
+		framecount=
+		frameend=
+		frames=
+		framerate=
+		skin=
+		alpha=
+		scalemin=
+		scalemax=
+		trail=
+		orient
+		additive
+		transparent
+		fullbright
+		shadow
+		noshadow
+
+ +

2.18 viewspace [frac]

+

+	Specifies that this particle type should move relative to the camera.
+	Should not normally be used in combination with clipping/bouncing.
+	Not compatible with most splitscreen games.
+
+ +

Back | Home | Next + + + diff --git a/ch03/pg3_1.htm b/ch03/pg3_1.htm new file mode 100644 index 0000000..cc3ab96 --- /dev/null +++ b/ch03/pg3_1.htm @@ -0,0 +1,100 @@ + + +Particle Manual: Texture Keywords + + + +

Particle Manual

+
+

3 Texture Keywords

+ +

3.1 texture <texturename>

+

+	Specifies to use an image named texturename for this effect.
+
+ +

3.2 material <materialname>

+

+	Specifies to use a named material.
+	This overrides blendmodes, as no new material will need to be created.
+
+ +

3.3 tcoords <s1> <t1> <s2> <t2> [tscale] [rsmax] [rsstep]

+

+	Specifies to use a subsection of the image.
+
+	If 'tscale' is set, all units are divided by this. it is the virtual size of
+	your texture.
+	So a value of 1 means that your texture coords must be between 0 and 1.
+	But if it properly matches your texture's size, the coords are in pixels.
+
+	If 'rsmax' is present, each particle will use a random image.
+	These images must be on a single row in your particle font.
+
+	'rsstep' specifies the stride (gap from one to the next) in your particle
+	font, and is only needed if 'rsmax' is present and greater than 1.
+
+ +

3.4 atlas count_in_each_axis firstidx [last]

+

+	An alternative to tcoords.
+	The specified texture (or material) is to be considered as a grid of sprites (x*x, where x is specified in that first arg).
+	'firstidx' specifies the first image to use (horizontal THEN vertical).
+	'last' specifies the last image to use (inclusive). The engine will pick one at random. They should not span multiple rows.
+
+ +

3.5 rotation <startmin> <startmax> <speedmin> <speedmax>

+

+	The particle will start with a rotation rotated between 'startmin' and 'startmax'.
+	It will then rotate with some per-particle value randomly picked between the 'speedmin' + 'speedmax' values.
+	Should NOT be used on beam particles.
+
+ +

3.6 beamtexstep <value>

+

+	Only valid if the effect is a beam.
+	Specifies the number of quake units per beam texture repitition.
+
+ +

3.7 beamtexspeed <value>

+

+	Only valid if the effect is type 'beam'.
+	Controls how fast the texture scrolls on the beam.
+
+ +

3.8 scale <min> [max]

+

+	Particles will start with a diameter of this many quake units.
+	Actual scale will be randomly chosen between 'min' and 'max' ('max' defaults to equal if 'min' is missing)
+
+ +

3.9 scalefactor <frac>

+

+	Controls how the particle scales with distance.
+	1 makes the particle scale the same as anything else
+	0 makes the particle not change size no matter how far it is
+
+ +

3.10 stretchfactor <factor>

+

+	Controls how spark particles stretch according to their velocity.
+	Negative values give fixed length sparks.
+
+ +

3.11 scaledelta <value>

+

+	Controls how the particle scales over time
+	Specifies the change in the particle scale per second.
+
+ +

3.12 step <min> <max>

+

+	Trails/beams only
+	Specifies the distance between each particle in the trail (or beam).
+
+ + +

Back | Home | Next + + + diff --git a/ch04/pg4_1.htm b/ch04/pg4_1.htm new file mode 100644 index 0000000..598d0f2 --- /dev/null +++ b/ch04/pg4_1.htm @@ -0,0 +1,94 @@ + + +Particle Manual: Color Keywords + + + +

Particle Manual

+
+

4 Color Keywords

+ +

4.1 alpha <value>

+

+	Specifies the initial alpha value of the effect
+
+ +

4.2 alpharand <value>

+

+	Specifies a randomized additonal value added to each particle's initial alpha.
+
+ +

4.3 alphadelta <value>

+

+	Specifies how much the alpha value of the effect changes per second (subtracted)
+
+ +

4.4 rgbdeltatime <value>

+

+	Specifies for how long the particle may change colours for.
+	After this many seconds, the particle may no longer change colours (delta becomes 0).
+
+ +

4.5 rampmode <mode>

+

+	Mode may be one of:
+	none: uses rgb+rand+sync+delta+scale+scaledelta values.
+	nearest(or absolute): the ramp overrides all colour+scale values. The effect moves from one absolute ramp index to the next.
+	lerp: smoothly interpolates from one value to the next.
+	delta: uses rgb+rand+sync+scale, but not delta values. All delta values come from the colour ramp instead.
+
+	If not none, the ramp index used is based upon the particle's age, its lifetime, and how many ramp elements there are.
+
+ +

4.6 rampindexlist <idx1> [<idx2> [idx3 ...]]

+

+	Scale used is the currently set scale value.
+	Specifies a set of palette index values to use for the effect as part of the effect's colour ramp.
+
+ +

4.7 rampindex <idx> <scale>

+

+	Specifies an individual palette index value and particle scale to use for the effect as part of the effect's colour ramp
+
+ +

4.8 ramp <red> <green> <blue> [alpha] [scale]

+

+	Specifies a ramp index in rgb terms, regardless of palette.
+
+ +

4.9 blend <mode>

+

+	If the texture used is actually a material then that material's blend mode will take precidence.
+	As a general rule you should try to use only the premul blend modes (as well as atlasing).
+
+	Mode may be one of:
+		adda: 
+		addc:
+		subtract:
+		invmoda:
+		invmodc:
+		blendcolour:
+		blendalpha:
+		premul_subtract:
+		premul_add:
+		premul_blend:
+		rtsmoke:
+
+ +

4.10 stains <value>

+

+	How much the effect discolours the wall upon impact.
+	The stained colour is based upon the colour of the particle upon impact.
+
+ +

4.11 spawnstain <radius> <r> <g> <b>

+

+	Controls whether a stain will be created at the same time as any particles
+	(instead of depending upon impacts).
+
+ + +

Back | Home | Next + + + diff --git a/ch05/pg5_1.htm b/ch05/pg5_1.htm new file mode 100644 index 0000000..9c02941 --- /dev/null +++ b/ch05/pg5_1.htm @@ -0,0 +1,132 @@ + + +Particle Manual: Physics Keywords + + + +

Particle Manual

+
+

5 Physics Keywords

+ +

5.1 randomvel <horiz> [vert]

+

+	Controls how fast the particle moves when it spawns (according to its spawn pattern).
+	This works regardless of any requested velocities.
+
+	If 'vert' is not specified, 'horiz' is used instead.
+
+ +

5.2 veladd <value>

+

+	Controls how much of the effect's spawn velocity is used, can be greater than 1, or negative.
+
+ +

5.3 orgadd <value>

+

+	Biases how much to add to the starting origin relative to the requested velocity.
+
+ +

5.4 orgbias <x> <y> <z>

+

+	Biases the particle's origin by this absolute worldspace vector, regardless of spawn mode.
+
+ +

5.5 velbias

+

+	Biases the particle's velocity by this absolute worldspace vector, regardless of spawn mode.
+
+ +

5.6 orgwrand

+

+	Randomised offset for the particle's origin, in worldspace.
+
+ +

5.7 velwrand

+

+	Randomised offset for the particle's origin, in worldspace.
+
+ +

5.8 friction <<xyz>|<xy> <z> | <x> <y> <z>>

+

+	Proportion of the particle's speed that should be lost from friction. Negative values are accepted.
+
+ +

5.9 gravity <value>

+

+	Amount that the particle's velocity changes per second, in units.
+
+ +

5.10 clipbounce <value>

+

+	how much of the particle's velocity to use if the particle is clipped. See cliptype.
+	Defaults to 0.8
+
+ +

5.11 cliptype <effectname>

+

+	Specifies which new effect to spawn when the particle hits something.
+	The origin and velocity of the particle are used to spawn the new effect.
+	The clipbounce value is used as a scaler for the reflected velocity.
+	If the effect named is the effect itself, the particle will merely bounce, instead of spawning a new effect.
+
+	FIXME: make default to bounce if clipbounce is set without cliptype.
+
+ +

5.12 clipcount <count>

+

+	The scaler to use for the number of particles to spawn upon a clip event.
+	Only valid in conjunction with 'cliptype'.
+
+ +

5.13 notunderwater [content names]

+

+	Specifies that this particle should ONLY be spawned when out of water.
+	The particle will not spawn under water (this does not affect assoc chains).
+
+	Content names are a space-separated list of: water slime lava sky solid fluid.
+	Default is 'fluid' if not specified.
+
+	The r_part_contentswitch cvar must be enabled for this to function correctly.
+
+ +

5.14 underwater [content names]

+

+	Specifies that this particle should ONLY be spawned when underwater.
+	The particle will not spawn if the spawn position is non-water (this does not affect assoc chains).
+
+ +

5.15 perframe

+

+	Apply inverse frametime to count (causes emits to be per frame).
+
+ +

5.16 averageout

+

+	Average trail points from start to end, useful with t_lightning, etc
+
+ +

5.17 nospreadfirst

+

+	Don't randomize position/velocity for first generated particle.
+
+ +

5.18 nospreadlast

+

+	Don't randomize position/velocity for last generated particle.
+
+ +

5.19 rainfrequency <multiplier>

+

+	Specifies the interval between spawning new particle puffs on surfaces.
+
+ +

5.20 flurry <magnitude>

+

+	These particles will periodically all change their direction, in a vauge attempt to approximate snow flurries.
+
+ + +

Back | Home | Next + + + diff --git a/ch06/pg6_1.htm b/ch06/pg6_1.htm new file mode 100644 index 0000000..d5a0d8d --- /dev/null +++ b/ch06/pg6_1.htm @@ -0,0 +1,67 @@ + + +Particle Manual: Light Keywords + + + +

Particle Manual

+
+

6 Light Keywords

+ +

6.1 lightradius <radius>

+

+	Spawns a dynamic light when the effect is spawned.
+	The dynamic light is removed when radius drops to 0 or the age is exceeded.
+	At this time it is not possible to override the corona/specular levels.
+
+ +

6.2 lightradiusfade <radiuspersecond>

+

+	How fast the light radius shrinks per second.
+
+ +

6.3 lightrgb <r> <g> <b>

+

+	Dynamic light RGB colours.
+	Higher values can over-saturate.
+
+ +

6.4 lightrgbfade <r/s> <g/s> <b/s>

+

+	How fast 'lightrgb' changes over time.
+
+ +

6.5 lighttime <maxage>

+

+	Specifies the maximum lifetime of your dynamic light.
+
+ +

6.6 lightcubemap <cubemapnum>

+

+	Value 0 means no cubemap.
+	otherwise with eg cubemap 5, uses image files cubemaps/5ft.tga, cubemaps/5bk.tga, etc.
+
+	FIXME: At the current time, the cubemap is world-aligned and cannot rotate.
+
+ +

6.7 lightscales <ambient> <diffuse> <specular>

+

+	Multipliers for the dynamic light's various types of lighting
+
+ +

6.8 lightshadows <castshadows>

+

+	0 or 1, specifies whether the dynamic light will cast shadows or not.
+	Its faster if it doesn't.
+
+ +

6.9 lightcorona <intensity> <scale>

+

+	Defines the intensity (the glare) and size of the corona the dynamic light
+	will cast.
+
+ +

Back | Home + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..f6fad9f --- /dev/null +++ b/index.html @@ -0,0 +1,115 @@ + + +Particle Manual: Table of Contents + + + +

+

Particle Manual

+ +

Revision #1

+ +

assembled by Marco Hladik + +

based on documentation provided by David Walton

+
+

Table of Contents

+ +1 Introduction + + +2 General Keywords + + +3 Texture Keywords + + +4 Color Keywords + + +5 Physics/Animation Keywords + + +6 Light Keywords + + + + diff --git a/styles/design.css b/styles/design.css new file mode 100644 index 0000000..e98ae2b --- /dev/null +++ b/styles/design.css @@ -0,0 +1,23 @@ +body { font: 12pt "Times New Roman"; + margin-left: 5mm; + margin-right: 5mm; + text-align: justify; + background: #ffffff; + color: #000000 } +h1 { font: bold 24pt Arial, Helvetica } +h2 { font: bold italic 18pt Arial, Helvetica } +.subheading { font: bold 16pt Arial, Helvetica } +:link {color: blue; + text-decoration: none; } +:visited {color: purple; + text-decoration: none; } +h6 { font: 10pt "Times New Roman" } +.MsoToc2 { font: bold small-caps 12pt "Times New Roman" } +.MsoTitle { text-align:center; + font: bold 24pt "BankGothic Md BT"; + letter-spacing:2.5pt } +.heading { font: italic 10pt "Times New Roman" } +.subcontents { font: 10pt "Times New Roman" } +.tip { font: 10pt "Comic Sans MS" } +.type { font: 10pt "Courier New" } +.menu { font: 10pt Arial, Helvetica } \ No newline at end of file