Jump to content

Particles


Recommended Posts

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?

Link to comment
Share on other sites

  • Replies 111
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
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.

Link to comment
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?

Link to comment
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.

Link to comment
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.

Link to comment
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).

Link to comment
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

Link to comment
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.

Link to comment
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.)

Link to comment
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' ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...