Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Tutorials and Resources

Reply
 
Thread Tools
Old 07-08-19, 10:32   #1
Joey79100
Member
 
Joey79100's Avatar
 
Joined: Mar 2012
Posts: 3,741
Default FLEP particle emitters reference

This aims to be a full documentation for FLEP's customizable smoke emitter patches. There may be mistakes here and there, and there are holes. If there is any help you can provide, please do.
MODS: please don't close this thread so I can update it if needed.


Introduction

FLEP provides a set of patches that allow you to create custom particle emitters by using smoke emitters.
This allows you to create more complex and interesting effects like fire, smoke, dust, snow, steam, waterfalls, lava burps, and whatever you can imagine.
For this, you need to enable a few patches first: Extend Tomb4.exe size, New blending modes, Enable new blending modes for particles, Extended steam / smoke emitter OCBs. But you can jump straight to the Smoke emitters white OCB 00 settings and FLEP will offer you to enable those patches in one click.

You can have:
  • 16 different SMOKE_EMITTER_WHITE
  • 16 different SMOKE_EMITTER_BLACK
  • 1 custom STEAM_EMITTER (done directly from the Extended steam / smoke emitter OCBs patch)
Which gives you up to 33 different kind of emitters per game.
Of course you can have several instances of the same particle effect in your level.

To assign a custom particle set to a SMOKE_EMITTER, just put the corresponding OCB value in it.


You can use the following package to experiment with your particles in real-time:
Quote:
Originally Posted by Lwmte View Post
Here is the particle testing ground package.

You can use it to test particle emitter properties on the fly, and then write down desired parameters into FLEP. All instructions are included in README file!

Notes

To prevent artifacts, use formula: Lifetime >= (StartTime + EndTime).


Detailed description of the fields

Start color
  • Range: 0..255 per value
  • Description: Color at the beginning of the lifecycle, in R,G,B format
Start time
  • Range: 0..255
  • Description: Time taken by the particle to fade in before becoming completely visible.



End color
  • Range: 0..255 per value
  • Description: Color at the end of the lifecycle, in R,G,B format
End time
  • Range: 0..255
  • Description: Time taken by the particle to fade out before disappearing completely.
  • Note: This is not a time counted from the beginning of the lifecycle of the particle, but from the end. For example, if you set the lifetime to 60 and the endtime to 10, then the particle will start fading out at frame 50.



Blending mode
  • Range: 0..16
  • Description: Method used by the renderer to display the particle. This basically determines whether it will be opaque, transparent, or something else.
  • Available modes:
    • Mode 0 - Opaque (fully)
    • Mode 1 - Opaque (magenta = transparent)
    • Mode 2 - Additive transluscency. The colors of the particle are "added" onto the background.
      The darker the pixel, the less visible it is.
      Consequently the particle will only get brighter, never darker.
      This is the default transluscency used in TR3-4-5 for room geometry (water).
    • Mode 3 - Almost same as Mode 1.
      The 1st difference is that you can actually "see" a black/white version of the objects behind the particle, a bit like a shadow.
      I believe this is the effect used when using flashing grenades: it flashes light gray, then everything is dark gray but you can see silhouettes before it goes back to normal. Here the effect is similar.
      A 2nd difference is that these particles are rendered in inverted order: particles that have just spawned will appear "behind" particles that have spawned before.
    • Mode 4 - Opaque (magenta = transparent | always rendered in front).
      This mode is used for rendering fonts, sky, etc. It is similar to Mode 1, but everything that is 3D will be rendered behind the particle.
    • Mode 5 - ???
    • Mode 6 - Wireframe.
      The texture itself is not rendered, instead there are 2 lines on 2 sides of the face, and 1 diagonal line (basically it looks like a N).
    • Mode 7 - ???
    • Mode 8 - Brightness = transluscency.
      The brighter parts of the textures will be more transparent, and the darker parts will be more opaque.
    • Mode 9 - Screen.
    • Mode 10 - Invert and multiply.
    • Mode 11 - Unused
    • Mode 12 - Unused
    • Mode 13 - Unused
    • Mode 14 - Unused
    • Mode 15 - Unused
Lifetime
  • Range: 0..248
  • Description: Time before a particle is destroyed. This also defines the speed at which a particle grows.
  • Note: While putting a too big value in other fields simply acts like the value was back to 0, putting more than 248 here seems to make the game crash.



Size variation higher byte
  • Range: 0..3
  • Description: Initial size multipler. 0 means initial size will be small (then increase), 3 means inital size will be big (then decrease).
Size variation lower byte
  • Range: 0..255
Size multiplier
  • Range: -1..31
  • Description: Increase the size of the whole particle.



Rotation
  • Description: Defines the speed of rotation of each particle.
Flags
  • Description: Defines special behaviors of the particles.
  • Note: Note: this is a flag field: each digit acts like a switch. Each digit position corresponds to a specific behavior. Hence, every digit must be 0 (off) or 1 (on).
  • Known flags descriptions:
    • Bit 0 - Set Lara on fire on contact
    • Bit 1 - Use perspective correction
      Defines wether the size of the particle on the screen should be smaller when it is further.
      If disabled, the particle will always take the same space on the screen, no matter how far it is from the camera. Effectively, this means the particle will seem small when it is close, and big when it is far.
    • Bit 2
    • Bit 3 - Lines
    • Bit 4 - Rotates
    • Bit 5
    • Bit 6
    • Bit 7 - Is visible
    • Bit 8 - Reacts to wind (note: the wind will affect the whole line of particles, not every particle separately)
    • Bit 9
    • Bit 10 - Causes damage on contact
    • Bit 11 - Pushed by Lara horizontally on collision
    • Bit 12 - Pushed by Lara vertically on collision
    • Bit 13
    • Bit 14
    • Bit 15



Horizontal speed
  • Description: Sets overall particle velocity.
Horizontal curve
  • Ranges: 1..16 | 17..32 | 33..48 (???)
  • Description: Defines trajectory curvature. However the way the curve is created is a bit complex.
    A very low value in one of the ranges (1, 17, 33...) will make the particle decelerate very fast (ie. with a high speed, the particle will have a high speed at first, and then it will slow down very fast). A higher value in one of the ranges (16, 32, 48...) will have lower deceleration.
  • Note: Horizontal particle direction is defined by nullmesh cone direction in level editor.
Vertical speed 1
  • Note: Negative values = upward velocity.
Vertical speed 2
  • Note: Negative values = upward velocity.



Spawn interval
  • Range: 0..255
  • Description: Defines the time before a new particle is spawned.
  • Note: The value is not a simple timer: it represents a pattern. Below is a visual representation of all the patterns according to the value that you can use as needed.
  • Values:
    Each dot represents 1 frame where no particle is spawned, and each O represents 1 frame where a particle is spawned.
    A column is equal to 16 frames.
    • ..0..3.. - OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO
    • ..4..7.. - .O.O.O.O.O.O.O.O .O.O.O.O.O.O.O.O .O.O.O.O.O.O.O.O .O.O.O.O.O.O.O.O
    • ..8..11. - ..OO..OO..OO..OO ..OO..OO..OO..OO ..OO..OO..OO..OO ..OO..OO..OO..OO
    • .12..15. - ...O...O...O...O ...O...O...O...O ...O...O...O...O ...O...O...O...O
    • .16..19. - ....OOOO....OOOO ....OOOO....OOOO ....OOOO....OOOO ....OOOO....OOOO
    • .20..23. - .....O.O.....O.O .....O.O.....O.O .....O.O.....O.O .....O.O.....O.O
    • .24..27. - ......OO......OO ......OO......OO ......OO......OO ......OO......OO
    • .28..31. - .......O.......O .......O.......O .......O.......O .......O.......O
    • .32..35. - ........OOOOOOOO ........OOOOOOOO ........OOOOOOOO ........OOOOOOOO
    • .36..39. - .........O.O.O.O .........O.O.O.O .........O.O.O.O .........O.O.O.O
    • .40..43. - ..........OO..OO ..........OO..OO ..........OO..OO ..........OO..OO
    • .44..47. - ...........O...O ...........O...O ...........O...O ...........O...O
    • .48..51. - ............OOOO ............OOOO ............OOOO ............OOOO
    • .52..55. - .............O.O .............O.O .............O.O .............O.O
    • .56..59. - ..............OO ..............OO ..............OO ..............OO
    • .60..63. - ...............O ...............O ...............O ...............O
    • .64..67. - ................ OOOOOOOOOOOOOOOO ................ OOOOOOOOOOOOOOOO
    • .68..71. - ................ .O.O.O.O.O.O.O.O ................ .O.O.O.O.O.O.O.O
    • .72..75. - ................ ..OO..OO..OO..OO ................ ..OO..OO..OO..OO
    • .76..79. - ................ ...O...O...O...O ................ ...O...O...O...O
    • .80..83. - ................ ....OOOO....OOOO ................ ....OOOO....OOOO
    • .84..87. - ................ .....O.O.....O.O ................ .....O.O.....O.O
    • .88..91. - ................ ......OO......OO ................ ......OO......OO
    • .92..93. - ................ .......O.......O ................ .......O.......O
    • .96..99. - ................ ........OOOOOOOO ................ ........OOOOOOOO
    • 100..103 - ................ .........O.O.O.O ................ .........O.O.O.O
    • 104..107 - ................ ..........OO..OO ................ ..........OO..OO
    • 108..111 - ................ ...........O...O ................ ...........O...O
    • 112..115 - ................ ............OOOO ................ ............OOOO
    • 116..119 - ................ .............O.O ................ .............O.O
    • 120..123 - ................ ..............OO ................ ..............OO
    • 124..127 - ................ ...............O ................ ...............O
    • 128..131 - ................ ................ OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO
    • 132..135 - ................ ................ .O.O.O.O.O.O.O.O .O.O.O.O.O.O.O.O
    • 136..139 - ................ ................ ..OO..OO..OO..OO ..OO..OO..OO..OO
    • 140..143 - ................ ................ ...O...O...O...O ...O...O...O...O
    • 144..147 - ................ ................ ....OOOO....OOOO ....OOOO....OOOO
    • 148..151 - ................ ................ .....O.O.....O.O .....O.O.....O.O
    • 152..155 - ................ ................ ......OO......OO ......OO......OO
    • 156..159 - ................ ................ .......O.......O .......O.......O
    • 160..163 - ................ ................ ........OOOOOOOO ........OOOOOOOO
    • 164..167 - ................ ................ .........O.O.O.O .........O.O.O.O
    • 168..171 - ................ ................ ..........OO..OO ..........OO..OO
    • 172..175 - ................ ................ ...........O...O ...........O...O
    • 176..179 - ................ ................ ............OOOO ............OOOO
    • 180..183 - ................ ................ .............O.O .............O.O
    • 184..187 - ................ ................ ..............OO ..............OO
    • 188..191 - ................ ................ ...............O ...............O
    • 192..195 - ................ ................ ................ OOOOOOOOOOOOOOOO
    • 196..199 - ................ ................ ................ .O.O.O.O.O.O.O.O
    • 200..203 - ................ ................ ................ ..OO..OO..OO..OO
    • 204..207 - ................ ................ ................ ...O...O...O...O
    • 208..211 - ................ ................ ................ ....OOOO....OOOO
    • 212..215 - ................ ................ ................ .....O.O.....O.O
    • 216..219 - ................ ................ ................ ......OO......OO
    • 220..223 - ................ ................ ................ .......O.......O
    • 224..227 - ................ ................ ................ ........OOOOOOOO
    • 228..231 - ................ ................ ................ .........O.O.O.O
    • 232..235 - ................ ................ ................ ..........OO..OO
    • 236..239 - ................ ................ ................ ...........O...O
    • 240..243 - ................ ................ ................ ............OOOO
    • 244..247 - ................ ................ ................ .............O.O
    • 248..251 - ................ ................ ................ ..............OO
    • 252..255 - ................ ................ ................ ...............O



Sprite ID
  • Description: ID of the texture of the DEFAULT_SPRITES object to use for these particles.


Quote:
Help needed
This sheet is incomplete. There are some things I had difficulties understanding, so I left it as is.
I need help mainly with:
  • Some blending modes
  • Missing flags
  • Size variation
  • Vertical velocity
  • Horizontal curve
If there is any information or correction you can provide, please do.

Last edited by Joey79100; 07-08-19 at 10:34.
Joey79100 is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 09:58.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.