Sign in to follow this  
Followers 0
Ykkrosh

Particles

112 posts in this topic

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?

Share this post


Link to post
Share on other sites

* Campfires

* Waterfalls

* Dust cloud when you place a building

* Dust kicked up by feet on dirt

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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:

0ADbarrackssmoke.jpg

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.)

Share this post


Link to post
Share on other sites

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:

Share this post


Link to post
Share on other sites

Its done, committed! I've changed the color of the smoke a bit and made it last longer, so check it out Michael :)

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

Alright :P so, i guess we could use it, if u want to do it. :)

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.)

No big deal...we can live without it ;)

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 :)

lol, i can see the ad banners 'Advanced Campfire for the new breed of caveman' ;)

Share this post


Link to post
Share on other sites

lol, i can see the ad banners 'Advanced Campfire for the new breed of caveman' ;)

Haha! Is the advanced campfire committed?

I think the smoke is too black though.

As do I, it was just an experiment using the multiply blend mode, which can't do gray :P

Share this post


Link to post
Share on other sites

Yeap :) Didn't include any billboards though :P

As do I, it was just an experiment using the multiply blend mode, which can't do gray :P

I've got the .psd of the smoke file, so i can save it with a transparent background instead of black :)

Share this post


Link to post
Share on other sites

The PR department kindly requests a cool screenshot of some fire and smoke.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0