Light Style© by Fisana

Jump to content


Photo

Particles


  • Please log in to reply
111 replies to this topic

#1 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 03 April 2011 - 09:07 PM

We've only had about four independent attempts at particle systems for the game, which isn't nearly enough, so I started a new one yesterday that actually integrates with the game and committed a mostly-working version now. There's a fire effect to demonstrate it - you create a particle definition file, and a special actor file, then you can use the new actor as a prop attached to any point on an existing actor.

A particle editor GUI is an explicit non-goal, since it's a load of effort and I don't think it's that useful - the XML files support hotloading so you can easily tweak and test changes, and we won't have hundreds of different effects so it'll likely be less aggregate effort than writing a GUI.

I think the current system basically works okay for fire (though it could probably be much improved artistically), but will need extensions for some other effects (e.g. one-shot emitters instead of continuous emitters, and gravity, and maybe more randomness in the emission rate, etc). What kind of particle effects would people suggest adding?
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#2 k776

k776

    Centurio

  • WFG Retired
  • 724 posts

Posted 03 April 2011 - 09:42 PM

* Campfires
* Waterfalls
* Dust cloud when you place a building
* Dust kicked up by feet on dirt
  • 0

Kieran P [ aka k776 ]


#3 Thorfinn the Shallow Minded

Thorfinn the Shallow Minded

    Triplicarius

  • Community Members
  • PipPipPipPip
  • 477 posts

Posted 03 April 2011 - 09:43 PM

Awesome stuff there. It's great to see the that kind of progress in the game.
  • 0
To win, we must endeavour to be the stronger of the two at the point of impact. Our only hope of this lies in making our own choice of operations, not in waiting passively for whatever the enemy chooses for us."—Schlieffen

#4 WhiteTreePaladin

WhiteTreePaladin

    Primus Pilus

  • WFG Retired
  • 1,644 posts

Posted 03 April 2011 - 10:09 PM

Water: ship wake, splashes, waterfalls, fountains
Fire: campfires, torches, fiery projectiles, building destruction
Dust: building construction / destruction, cavalry hordes
Smoke: (basically dust, but a darker color - but should rise rather than spread)
Sparkle: ore mines, some treasures
Leaves: when a tree falls?
  • 0

Brian [aka WhiteTreePaladin]

0 A.D. Gameplay and UI Developer


#5 feneur

feneur

    Cartographer of imaginary worlds

  • 0 A.D. Project Leader
  • 7,800 posts

Posted 03 April 2011 - 10:14 PM

Breaking waves against the shore would be nice to have, probably can wait though as I imagine it will take quite some work. I think there might be some sprites for it already though from Michael's static experiments some years ago.

I think footprints have been mentioned as well as something that could/should be done with particles.
  • 0

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#6 historic_bruno

historic_bruno

    Primus Pilus

  • WFG Programming Team
  • 2,399 posts

Posted 03 April 2011 - 10:34 PM

Suggesting a few more:
  • Blood (nothing too excessive)
  • Weather effects (rain, snow, hail, sandstorms)
  • Large projectiles (maybe more exciting to look at if they leave some sort of trail or blurriness?)
  • Dust/debris from large projectile hits

  • 0
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben [at] wildfiregames [dot] com

#7 Pureon

Pureon

    Primus Pilus

  • 0 A.D. Art Team
  • 3,592 posts

Posted 04 April 2011 - 12:03 AM

Dust appearing around 'collapsing' buildings would be great.

I must say this system looks very versatile, very easy to add to any existing units, easy to create new types of fire/effect by creating new png files, and it even has adjustable properties in the definition file. Brilliant.
  • 0

Pureon
0 A.D. Part time Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com


#8 Shield Bearer

Shield Bearer

    Primus Pilus

  • WFG Retired
  • 1,621 posts

Posted 04 April 2011 - 03:32 AM

Bits of stone flying when a mine is picked
I don't think it would be a good idea to throw dust up every time a single unit moves, rather it should be when larger groups of units move. Don't know how feasible that would be though :/
I think it would be a good idea that when a unit levels up so particle thing should happen around him, something like this.
Would it be possible to show shininess on a unit's armour? Or would that be a spectral shader job?
  • 0

Amish Coelho [aka Shield Bearer aka gAMeboy]
Wildfire Games Art Department
Contact me: amish13@gmail.com
AIM handle: Mythgamer
MSN Account: amish13@live.com


"The fate of 0 AD is in the hands of those who have vision and perseverance." - Ken Wood


#9 Shield Bearer

Shield Bearer

    Primus Pilus

  • WFG Retired
  • 1,621 posts

Posted 04 April 2011 - 04:21 AM

I just played around with the textures, here's what i came up with. Should I commit it?
  • 0

Amish Coelho [aka Shield Bearer aka gAMeboy]
Wildfire Games Art Department
Contact me: amish13@gmail.com
AIM handle: Mythgamer
MSN Account: amish13@live.com


"The fate of 0 AD is in the hands of those who have vision and perseverance." - Ken Wood


#10 Shield Bearer

Shield Bearer

    Primus Pilus

  • WFG Retired
  • 1,621 posts

Posted 04 April 2011 - 07:52 AM

I made a campfire, this is fun :D
  • 0

Amish Coelho [aka Shield Bearer aka gAMeboy]
Wildfire Games Art Department
Contact me: amish13@gmail.com
AIM handle: Mythgamer
MSN Account: amish13@live.com


"The fate of 0 AD is in the hands of those who have vision and perseverance." - Ken Wood


#11 Thorfinn the Shallow Minded

Thorfinn the Shallow Minded

    Triplicarius

  • Community Members
  • PipPipPipPip
  • 477 posts

Posted 04 April 2011 - 10:41 AM

I commend the idea of having dust be kicked up when the soldiers run, especially with cavalry. I also think that they should kick dust up always while they are on sandy terrain. (They should kick up even more while they run.)
  • 0
To win, we must endeavour to be the stronger of the two at the point of impact. Our only hope of this lies in making our own choice of operations, not in waiting passively for whatever the enemy chooses for us."—Schlieffen

#12 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 04 April 2011 - 10:56 AM

I think footprints have been mentioned as well as something that could/should be done with particles.

I don't think footprints would really be related to particles - they're probably more an application of decals, since they need to sit flat on the terrain. (I think the defining characteristics of particles are that they are camera-facing sprites and that they are continuously moving/rotating/fading/etc. Anything like that should probably be handled by the particle system (maybe needing extensions beyond its current functionality); anything else probably shouldn't be.)

I think it would be a good idea that when a unit levels up so particle thing should happen around him, something like this.

Yeah, that'd be nice once we have promotion.

Would it be possible to show shininess on a unit's armour? Or would that be a spectral shader job?

Spectral like these guys? :P If you mean specular, that should be handled by creating a new texture map to represent the shininess of the current diffuse textures, and it should be relatively easy to extend the new shader-based renderer to make use of that.

I just played around with the textures, here's what i came up with. Should I commit it?

If you think it looks better then please do :). I just drew the smoke myself with some splotches in Gimp, and derived the flame from here, so they're certainly not ideal. By the way, there's some old particle images in here which apparently came from CheeZy so I expect they should be fine from a licensing perspective if we want to reuse them for anything.
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#13 alvinx

alvinx

    Tiro

  • Community Newbie
  • 2 posts

Posted 04 April 2011 - 11:40 AM

Good textures are here.
  • 0

#14 Shield Bearer

Shield Bearer

    Primus Pilus

  • WFG Retired
  • 1,621 posts

Posted 04 April 2011 - 12:03 PM

Yeah, that'd be nice once we have promotion.


Good advertising ;)

Spectral like these guys? :P If you mean specular, that should be handled by creating a new texture map to represent the shininess of the current diffuse textures, and it should be relatively easy to extend the new shader-based renderer to make use of that.


Arghh!! Yeah, I meant specular :P lol, my bad. Okay, i see. But that would mean the highlights used in the diffuse textures wouldn't make sense and would have to be removed right?

If you think it looks better then please do :). I just drew the smoke myself with some splotches in Gimp, and derived the flame from here, so they're certainly not ideal. By the way, there's some old particle images in here which apparently came from CheeZy so I expect they should be fine from a licensing perspective if we want to reuse them for anything.


Hmm, I think mine look better than CheeZy's but I don't know... What do you think? They seem to be a bit light to me :/

(maybe more exciting to look at if they leave some sort of trail or blurriness?)


Oh yeah! Would that be possible? to make the area behind the smoke hazy or something? like this or this.
  • 0

Amish Coelho [aka Shield Bearer aka gAMeboy]
Wildfire Games Art Department
Contact me: amish13@gmail.com
AIM handle: Mythgamer
MSN Account: amish13@live.com


"The fate of 0 AD is in the hands of those who have vision and perseverance." - Ken Wood


#15 fcxSanya

fcxSanya

    Centurio

  • WFG Retired
  • 682 posts

Posted 04 April 2011 - 12:41 PM

Yeah, that'd be nice once we have promotion.

I work on it now, btw, slow but sure :) (on promotion patch, I mean, not on particles)
  • 0

Alexander Olkhovskiy [ aka fcxSanya ]
Wildfire Games Programmer
E-mail: fcxsanya at wildfiregames dot com


#16 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,965 posts

Posted 04 April 2011 - 06:13 PM

Unit promotion is one of the seminal ideas for the game. It'll be great to have it back and in the Alpha for fans to experience.

The particle stuff looks awesome! Can't wait to update and see this stuff. Yeah, Amish, commit that stuff! Shore Waves would be kinda important, as would be dust for construction. Since we don't have the animating know-how and gumption to make the buildings "piece" together when being built, I think the best looking thing would be to have a big cloud of dust and the building rises up from the ground into position.

EDIT: For flames we can make a series of flame sizes and types, then reuse them for different situations (like we do for other props).
  • 0

#17 Pureon

Pureon

    Primus Pilus

  • 0 A.D. Art Team
  • 3,592 posts

Posted 04 April 2011 - 09:33 PM

I made a campfire, this is fun :D


That's the first thing I did when I got home from work today, but mine was only a few sticks burning, yours is so much more advanced :)

Does using multiply blending for smoke reduce the impact on performance at all (no need for transparency within the texture file)?

I'm going to go and burn more stuff now :D


Edit:
Posted Image
  • 0

Pureon
0 A.D. Part time Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com


#18 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 04 April 2011 - 10:20 PM

Performance is the same for any blend mode.

Currently there's "add", "subtract", "multiply" and "over". The tricky one is "over", which is the standard alpha-blending thing - it'll use the colour from the texture, with the alpha channel determining how much to show of the texture vs the background. The problem is that "over" is order-dependent - to be correct you have to draw the furthest objects first, so you can draw the closer ones over them. (The others are all order-independent: A+B+C = A+C+B, A-B-C = A-C-B, A*B*C = A*C*B, etc). Currently the system sorts each separate particle emitter by distance (so the furthest get drawn first), but sorting every single particle by distance would be relatively slow and complex, so it draws particles in some arbitrary order instead. So you need to be careful when using "over" - if the particles have high alpha then it might look a bit wrong when viewed from certain angles. But in some cases it might look okay, particularly for low-alpha textures, so you just need to test it.
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#19 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 05 April 2011 - 12:08 AM

Arghh!! Yeah, I meant specular :P lol, my bad. Okay, i see. But that would mean the highlights used in the diffuse textures wouldn't make sense and would have to be removed right?

Maybe it'd look okay for highlights to still be in the diffuse texture, enhanced by the true specular lighting, or maybe that'd look ugly. I really don't know - as far as I'm concerned it's just an art problem :P

Would that be possible? to make the area behind the smoke hazy or something? like this or this.

Don't know - that's a code problem but it's beyond my graphical knowledge. (Well, anything is always possible, but I don't know what the performance impact would be, and don't know whether it'd fit with our current renderer design or would introduce a load of new complexity.)
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#20 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,965 posts

Posted 05 April 2011 - 04:09 AM

Great work guys. I think the smoke is too black though. I think the smoke should be grayer. Use black smoke to denote damage. :victory:
  • 0