particle_system - ryzom/ryzomcore GitHub Wiki


title: Creating particle systems using Object Viewer description: published: true date: 2023-03-01T05:20:37.890Z tags: editor: markdown dateCreated: 2022-03-12T06:40:30.357Z

Playing with Particle Systems

  • Launch the ObjectViewer
  • Open the particules window in the menu "Window" -> "Particle"
  • Load a particle system right clicking on the "PS" tree and Select "Load" ov_3.png
  • Select the particule system snow.ps in the shapes/ directory.
  • You can press the "Play" button to start the particle system.

In this example, the particle system's setup like this:

ov_4.png

The system uses an Emitter, a Particle and multiple Forces.

snow.ps has a rectangular emitter to emit particle on top of the camera called EmitSnow. This emitter emits PartSnow particles. PartSnow is a basic particle that display a look-at texture. There's two forces that affect the particle system. The first is a Brownian Force to generate a random force that simulates the wind and a Directional Force that simulates gravity.

The resulting is a basic snow effect.

ov_5.png

Common Problems

Particles Not Affected When Out of Frustrum

Particle systems aren't instantiated until they become visible. To force instantiation you can call UParticlesystem::forceInstanciate() just after 'createInstance' in your game code.

Simulation of particle trajectories is done in an incremental way so if the frame-rate is too choppy the particle effects may slow down, that is if elapsed time is over the duration, which is specified in the Particle Systems main editor page. For unimportant effects this is acceptable but for effects related to game-play you can force real-time animation by choosing "Spell FX" as a preset.

  • Spell FX
    • Real-time
    • Animates even when not visible
    • For game-play related effects.
  • Environment FX
    • May slow down if the frame-rate is low or choppy.
    • Does not animate if not visible.
    • For decoration effects and other unimportant effects.

Forces Behave Relative to Camera

Forces should be tagged to be in "world" coordinate system, as shown in the screenshot below. Possibly the emitted particles should be tagged to be in world too, especially if the effect is moving, so they remain at their spawn position in the world (if there's no gravity) and the effect thus leaves a trail.

force.jpg

Some samples

You will find some examples (.max and .shape) of material here: https://web.archive.org/web/20050428012503/http://hulud.planet-d.net/?item=19&lang=en

Particle Effects Screenshots

image071.jpg image073.jpg

Rain Effects

image075.jpg image077.jpg

Ribbon Effect

image079.jpg

Fountain Effect

image081.jpg

Smoke Effect

image083.jpg

Shockwave Effect

image085.jpg

Fountain Effect #2

image087.jpg

Particle System with 3D Meshes

image089.jpg image091.jpg image093.jpg image095.jpg image097.jpg image099.jpg

⚠️ **GitHub.com Fallback** ⚠️