how would you animate your own (custom)texture with alpha channels?

i want to try and make some moving smoke in bge that isn’t just a scaling plane that fades out.

i want to have smoke that curls, drifts and finally dissolves into nothing.

Could you animate this in the bge and if so how?
I see this often being used in the big blockbuster games (battlefield, cod etc.) and was wondering if this effect was possible within the bge.

thanks

This is definitely possible :). In the uv editor, there is a section for game specific properties such as turning an image strip into an animation(Your smoke could be a set of frames lined up after eachover on a single image). I haven’t been able to get that to work reliably though, so I wrote a script which does a similar thing. It has lots of non-generic stuff in it at the moment, but I’ll post it in a few hours after making it more suitable :). If anyone knows how to use the UV editor thing though, I would go with that as its probably faster :).

Can you find a video of the exact effect you want?

In the end everything you see in video games are either 2d images (possibly on possibly moving polygons) or shader code :slight_smile:

@spike1 OK thanks, i’m looking forward to it :smiley:

@kheetor I’m mainly aiming for the rolling smoke from battlefield 3, more specifically 1:11 onwards. Most of the in-game explosions have a very nice soft look to them, especially the smoke. I’ve tried achieving this affect in my various smoke and fire tutorials but animating the texture itself would give it that nice extra touch. especially when considering close range viewing. Also the smoke from “broken” vehicles.

I’m considering rendering out a simple blender smoke sim from the top with alpha and then somehow applying the texture an to in game object(with alpha) (probably a plane). I just need a good technique to do this, none of which i currently know how to do/setup.

Remember that the smoke effect in BF3 was probably composed by a group of professionals working full time on it so your standards are high :slight_smile:

Might want to experiment with global coordinate texturing or manipulating the object.color / transparency based on particle position to get the rolling effect.

Thanks Kheetor, with a lot of effort i managed to come up with something i was happy with and had a slight rolling effect.

In the big name games those are particle systems, but you can achieve a close effect with far less system strain by using 3 planes bisecting each other in a * shape. Use the same animated smoke texture on both and it will appear 3d. This is often done with shrubs and plants in games like skyrim, fallout New Vegas and such. Regardless of whether you want to go this route with the smoke, you should learn it anyway as it is pretty much mandatory for any game these days. I’ll put a link below to a tutorial.

I used a track to camera for the explosion and smoke as looked the best in my opinion, when using the method you describe i often find that the center of the star shape where all the face meet usually stands out as a lot darker than the rest of the texture and unless you use a shadeless material the lighting will muck around with the normals and make certain faces darker on one side than the other.
thanks for the suggestion though:D