33 Commits
Author SHA1 Message Date
BMagnu e827011113 Particle source duration curve + life remaining input (#7231)
* Add curve to control the duration of a particle source

* Also add fractional Life Left curve input for sources

* Actually register new particle curve output
2026-02-17 12:09:13 +01:00
BMagnu 1e7431a044 Give Particles Access to Their Spawner Effect (#7034)
* Make particles aware of the effect that spawned them

* Allow modular curves to call global functions from submember inputs

* Add more in and outputs for particle lifetime curves

* Allow post-curve velocity as a curve input

* fix warning and incorrect assig

* Disable CheckTriviallyCopyableMove

* Clang Tidy
2025-09-15 04:42:06 +02:00
Kestrellius 0bf632ceae Add apparent size input for particle source curve (#6947)
* functional method

* add input
2025-08-18 22:36:17 -04:00
wookieejedi 6132f8bfc1 Another particle fix for standalones (#6905)
* Another particle fix for standalones

Fix more standalone crashes from particles by "allowing the code to create particles, and just silently quit if in standalone. I.e., accept an invalid effect handle if in standalone and that'll just quit out the source on its first frame of processing." Thanks to @Bmagnu for the fix! Putting here to allow taylor and chief to more easily test.

* add needed include

* and another fix
2025-08-05 16:25:16 -04:00
BMagnu e28b3bb592 Remove unused enum in particle code (#6891)
* Remove unused enum

* remove comment as well
2025-08-01 01:33:29 +00:00
BMagnu 82dfdbc962 Cleanup of Level 0 Particles (#6808)
* Make scripting use the full-blown particle system

* Add reverse option

* Add animation reversal as an option to modern particles

* Start implementation of beam particles

* Add multi-emission particle source API for legacy particles

* Attach beam muzzle particles to the correct host

* Reorder code in order to facilitate apparent visual size as modular curve input for particles

* fix lua api

* Typo

* Fix scripting and beam muzzle particles

* Remove muzzleflash code, prepare to replace with particles

* Begin mflash effect conversion

* Pass final parameters to mflashes and fix curve

* Remove deprecated particle function

* Add debris flame particles

* remove weapon_explosion table

* Convert shield explosion particles

* Fix modular curve full inputs and convert particle curve inputs accordingly

* Allow particle volume offset and rotation with curve-based rot around fvec

* Add Ring and Point Volumes

* Convert PSPEW to new system

* Make particle curve timing aware of interp

* Update todos

* get rid of performance waste

* Add last parameter for converted pspews

* Fix pspew bugs

* Fix direction for default pspew

* Fix order for voluem rotation

* particle vel interp

* particle vel interp 2

* Make beam muzzle stay parented to the firing ship, as it's likely the more commonly intended variamnt

* fix scripting particle lifetime

* Allow beam muzzle particle override

* Skip invalid pspews

* remove pspew dcf code

* Fix sparkler stretch

* Correct sparkler bia

* General sparkler weirdness

* Tune distribution of sparklers

* Convert Asteroid particles

* Fix conversion warning

* Fix conversion warning again

* Fix conversion warning again again

* Really clang?
2025-07-09 16:47:14 +09:00
BMagnu b3c3627f54 Allow using seeded noise for particle velocity and spawn position offset (#6675)
* Add noise backend for particles

# Conflicts:
#	code/particle/ParticleEffect.cpp

* noise frontend

* Proper scaling for noise

* make normalize safe
2025-05-26 20:43:56 +09:00
BMagnu 23dc22e172 Unify Particle Attachment (#6571)
* Fix incorrect ship legacy particle curve assignment

* Setup trigger radius

* Properly attach particle sources to objects and subobjects

* Add trigger velocity for weapon impacts

* Onetime particle source timing fix

* Warnings

* Allow global_to_local to work with no submodel

* Allow global_to_local to work with no submodel, again
2025-02-03 22:14:19 +01:00
Birk Magnussen ada62c6c59 missing includes 2025-02-01 13:33:43 +01:00
Birk Magnussen 1f2a8dce2a remove optional 2025-02-01 13:17:26 +01:00
Birk Magnussen 40312e7419 Add modular curve sets to volumes 2024-12-12 16:44:34 +01:00
BMagnu c2051578d6 Basic modular curves for particles 2024-12-11 13:55:36 +01:00
Birk Magnussen e2dbb46b9c Fold OmniEffect into ParticleEffect 2024-11-03 14:45:16 +01:00
Birk Magnussen 1aa67c9342 Properly use new effect host 2024-11-02 14:48:58 +01:00
Birk Magnussen 98ddb1500f Add sensible particle host class 2024-11-01 16:23:11 +01:00
BMagnu bd1792d777 Move Effect timing into the ParticleSource. 2024-10-24 16:54:02 +02:00
Birk Magnussen b9b7a13586 Fix source bugs 2024-09-24 17:42:19 +02:00
BMagnu 8503c8a068 Start replacing legacy effects with omnieffect 2024-09-24 17:23:01 +02:00
Birk Magnussen e0c2ba7011 Prepare for the removal of composite effects 2024-09-24 17:23:01 +02:00
Kestrellius 6da7830b7b Add offset for tabled particle effects (#6264)
* Adds particle effect offset.

* bugfixing

* Switches to a cleaner approach.

* Futureproofing for particle parenting.

* actually let's just bundle parenting into this one

* working on turrets

* grinding toward turret correctness

* still grinding toward correctness

* Gets turrets working correctly.

* Fixes merge artifact

* appeases clang-tidy

* Updates some comments.

* Updates some comments.

* Tiny bit of cleanup.

* Deduplicates comments.
2024-08-13 23:06:44 +02:00
Kestrellius cb75da4de6 Interpolate particle spawning positions for moving spawner objects (#6249)
* Sets up linear interpolation for object particles.

* Makes interpolation time-based.

* Updates comments to match changes.

* appeases clang-tidy

* Adds interpolation for particle particles.
2024-07-29 22:35:44 +02:00
Goober5000 d5e387479e replace pointers with indexes in object_h
This refactors the object_h struct to store objects as indexes rather than pointers.  This is a prerequisite for making the collection of objects dynamic in the future.  See also #6100.

Follow-up to #5800 and #5829.
2024-06-09 02:06:22 -04:00
Kestrellius 9192bb00b1 Alters other files to match previous changes. 2024-05-13 13:23:41 -07:00
Asteroth b23dff91e7 revert removal of allow relative (#5807) 2023-11-16 22:20:54 -05:00
Asteroth 0355d2b8d1 update docs 2023-11-02 02:27:40 -04:00
Asteroth 71ac62e395 add parent size and parent lifetime 2023-05-24 23:54:38 -04:00
Asteroth 63df812d79 Add beam particles (#5330)
* add beam particles

* tweaks

* more tweaks

* fix warning

* dumb c++

* fix switch

* spelling
2023-04-29 08:45:31 -04:00
Asteroth 0f06bf279a Add velocity inheritance for particle effects (#3691)
* implement velocity inheritance for particles

* add vel inherit for single effects

* appease clang

* review feedback
2021-10-10 13:37:31 -04:00
asarium 8f88801646 Add dynamic action programming system
This system adds the code necessary for letting content creators specify
complex events by specifying a simple, program-like sequence of
operations that will be executed by the engine when a certain event is
triggered.
2021-02-21 21:29:02 +01:00
asarium 422753976f Add support for "Effects per second" feature
This allows specifying how many times per second an effect should be
triggered for a particle source instead of triggering the effect every
frame. This will allow modders to achieve more consistent particle
effects regardless of FPS.
2019-01-19 13:56:45 +01:00
asarium 68372b18a2 Enable performance clang-tidy warnings 2018-04-13 12:08:56 +02:00
asarium a7b1c00a84 Fix handling of relative source directions
Previously, the source orientation was always aligned to the world so it
couldn't adapt to a weapon that changes direction. This fixes that by
introducing a "relative" mode for source orientations that is enabled by
default and disabled if the direction is set explicitly.
2017-10-04 15:59:09 +02:00
asarium bbeaaa1565 Add a new particle effect system
This is similar to the script I wrote a few years ago but unlike that
one, this solution doesn't kill the performance.
2016-08-04 11:08:39 +02:00