Author Topic: Animated Particles and Other Particle Options  (Read 1408 times)

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Animated Particles and Other Particle Options
« on: 22 October 2016, 00:32:35 »
Suggested Features:
  • Animated Particles Using Spritesheets
  • Random Starting Rotation (needed for animated particles to look good)
  • Soft Particles: Not sure how hard this would be in MG's engine, but simple soft particles just modify opacity based on scene depth. This effect is relatively cheap, and hides ugly geometry intersections.
  • Child Particles: Nothing too fancy, just a reference in the particle xml that would call another particle xml to run at the same time. This would be a better way to handle multiple particle effects than stacking them for each unit. This also could be used to handle projectile children, a feature we'd all like. (For fire arrows!  ;D)

For animated particles, I have quite a few spritesheets that I made using Blender. I have usable art assets now, already being used in Unity engine. I would be willing to give you guys a couple fire and smoke sprite sheets.

Here's what I've got going in Unity - Fire - Smoke - Explosion Sim as Fire

I may think of some more features, but for now, those are the main ones I've been thinking about.
« Last Edit: 25 October 2016, 22:40:26 by -Archmage- »
Egypt Remastered!

Proof: Owner of glest@mail.com

thdgaming

  • Archer
  • *
  • Posts: 25
    • View Profile
Re: Animated Particles and Other Particle Options
« Reply #1 on: 4 December 2016, 21:26:04 »
You had a good idea, I support you and I wish developers gona make it too  :) :thumbup:

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Animated Particles and Other Particle Options
« Reply #2 on: 7 December 2016, 13:19:59 »
Child partices: We already  have child particles, see here: https://docs.megaglest.org/XML/Projectile_particle.

- Animated particles would be good yes, problem is I don't know a lot about handling spritesheets but should be possible.
- Random starting Rotation: Is this not possible to use energy-var to change it ? If not, what exactly do you need there ( pseudo xml example )?
- Soft Particles: I have no clue what "scene depth" is and I don't understand the feature request at all .
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Animated Particles and Other Particle Options
« Reply #3 on: 7 December 2016, 22:48:48 »
Child Particles: Awesome! Didn't realize they were in. :D

Animated: This is done by shifting the particle UV to each frame in the spritesheet. No video files or anything more complex like that. I also wrote a small python program that generates sprite sheets from image sequences, and the logic for reading a sprite sheet would be similar to assembling one. If you want, I'll upload that little program.

Random Starting Rotation: This isn't to do with particle lifetime or intensity. It's to do with the visual rotation of the particle with respect to the camera.
Pseudo XML:
<particle-rotation>
     <rotation-value min= "-30"/> (degrees, negative 30 would be 330 degrees)
     <rotation-value max= "30"/> (degrees positive, clockwise)
     <rotation-random= "1"/> (value of 0 means particles spawn only at 30, and 330 degrees, value of 1 means particles spawn anywhere between -30 and 30 degrees)
</particle-rotation>

If you don't understand or want to see the purpose of the feature, let me know, I'll make something quick in Unity.

Soft Particles: The purpose is to hide the ugly intersections between 2D sprites and 3D geometry. Scene depth is Unity's term for the distance between each pixel and the camera. The simple way to handle intersections is to lower particle opacity per-pixel based on the depth of the pixel before the particle is drawn. This would probably require a setting in the menu as it does have a small performance impact, most of which could be negated by having a switch in particle XMLs that defaults to off. This would be a substantial visual update, making bigger particle effects appear more volumetric.

(click to show/hide)
Egypt Remastered!

Proof: Owner of glest@mail.com