A question on particle effects

A question on particle effects

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

A question on particle effects

Post by Erik »

How do colour maps work? (for example on muzzleflashes)
Havent yet found out how to work with it, for example how does one make darker parts visible? How to change the fully transparent colour (if possible)?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: A question on particle effects

Post by KDR_11k »

They're RGBA value sets, each set is one color it reaches during its lifetime.
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: A question on particle effects

Post by Master-Athmos »

As KDR said: You always have groups of four numbers meaning Red, Green, Blue and Alpha (i.e. transparency). You just write those four number groups right one after another. So e.g.

Code: Select all

1 1 1 0.5 0 0 0 0.5
would result in a colormap that makes the particle white in the beginning and then makes it go black until the end of its lifetime while always being halfway transparent (it's a fluent transition). Each group of the four numbers you add get distributed equally on the particle's lifespan. So if you put in three of the four number groups the first quad of numbers will be about how the particle looks when it gets emitted, the second quad will be about its state when having passed 50% of its lifetime and the third quad is how it has to look at the end of its lifespan...

To give you a visual clue: I guess you already know that kind of functionality from applying a gradient in whatever graphics software you use. It works the same way (except for having an additional value for the transparency):

Image

So with five quads of values for the particle's color and alpha it'll do just that transition you can see in the image...
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: A question on particle effects

Post by Erik »

So what do i need to do if i want a thick dark cloud, without the black square around it showing up?
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: A question on particle effects

Post by bobthedinosaur »

what image are you using for the effect? something you made or something from another game? it might have to do with the alpha map, or it could just be you have a texture issue with your visual settings and/ or your gpu.
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: A question on particle effects

Post by Erik »

I'm using both self made textures and some that are "default" as in i don't really know where i got them from, most likely the sample mod.
They work fine but only for bright colours and low transparency settings. Higher alphas turn them into black squares.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: A question on particle effects

Post by bobthedinosaur »

try giving the texture an alpha map, make black the outside and details white. this may help the texture loose its box effect
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: A question on particle effects

Post by Erik »

I cant do Alphamaps T_T
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: A question on particle effects

Post by bobthedinosaur »

uploaded it and i will make one
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: A question on particle effects

Post by Erik »

For every particle that i wanna do?
How does that work with gimp? All i can do is pressing "del" after loading an image to make the housecolour dissapear...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: A question on particle effects

Post by smoth »

Gundam has pd effects take what you want.
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: A question on particle effects

Post by Erik »

thx, can i even take the codes?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: A question on particle effects

Post by smoth »

Yeah
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: A question on particle effects

Post by Erik »

Thanks a lot I'm really not good at coding those.
Post Reply

Return to “Game Development”