OpenXcom Forum

Modding => Resources => Topic started by: robin on December 29, 2014, 12:06:50 pm

Title: Smoke animation
Post by: robin on December 29, 2014, 12:06:50 pm
I want to make a new smoke animation and there's something I need to understand before proceeding.

If I look at the spritesheet there are 4 "small smoke" frames and 8 "big smoke" frames: are  the 8 big smoke frames part of a single 8-frames-long animation, or they are 2 different, 4-frames-long, animations?

Thanks
Title: Re: Smoke animation
Post by: volutar on December 29, 2014, 01:12:12 pm
There are 3 densities of smoke sprites, and 4 frames per each.
16-19 density 1
20-23 density 2
24-27 density 3
density 0 is no smoke.
(https://www.ufopaedia.org/images/c/cb/Smoke.gif)
Title: Re: Smoke animation
Post by: robin on December 29, 2014, 02:49:14 pm
There are 3 densities of smoke sprites, and 4 frames per each.
16-19 density 1
20-23 density 2
24-27 density 3
density 0 is no smoke.
(https://www.ufopaedia.org/images/c/cb/Smoke.gif)
Thanks!

(The numbers you wrote though are different than the ones in the image?)
Title: Re: Smoke animation
Post by: volutar on December 29, 2014, 03:54:24 pm
Yeah, my fault. I've used to numbers labeled at the bottom of the actual image. Like in my MCDEdit   ::).
Title: Re: Smoke animation
Post by: robin on December 30, 2014, 01:13:33 am
lol a bit overkill maybe
Title: Re: Smoke animation
Post by: ivandogovich on December 30, 2014, 01:38:11 am
uhh.. ya think?  ;)
Title: Re: Smoke animation
Post by: volutar on January 10, 2015, 06:21:16 pm
robin, did you make those checker-transparent curly smoke animated? Or it's just static?
Title: Re: Smoke animation
Post by: robin on January 10, 2015, 09:07:19 pm
robin, did you make those checker-transparent curly smoke animated? Or it's just static?
Still not animated. Will take some time.
Title: Re: Smoke animation
Post by: robin on January 10, 2015, 10:09:20 pm
Here, if you want to check hgow it looks now.

The problem with animation is that I want it to moves slowly, but I'm tied to the number of frames (4 per stage) and framerate (about 10fps I'd say?) of vanilla smoke, and.. it think it's impossible to make a proper animation fro a cloudy-looking smoke at these conditions.
Apocalypse smoke, from which I'm copying the look, is static (only has anim when the smoke cloud is created, from what I could see) but has a lot of stages to simulate the slow and gradual dissipation over time.

ruleset bit:
Code: [Select]
  - type: SMOKE.PCK
    height: 40
    width: 384
    subX: 32
    subY: 40
    files:
      8: Resources/apoc/SMOKE/smoke_cloud.gif
Title: Re: Smoke animation
Post by: volutar on January 10, 2015, 11:38:49 pm
It's really weird, this smoke IS animated, but it's like going beyond 4 frame range, and drawing neighbour.
They are supposed to be animated from 8 to 11, from 12 to 15 and from 16 to 19, but it's like ... going beyond 4 frames range, to some other... and I think it's the bug.
It's like, sometimes going from 9 to 12, from 13 to 16..

And, robin, it's animated 2 times slower than any other animation, i.e. 5 frames per seconds.
Title: Re: Smoke animation
Post by: robin on January 10, 2015, 11:58:59 pm
It's really weird, this smoke IS animated, but it's like going beyond 4 frame range, and drawing neighbour.
They are supposed to be animated from 8 to 11, from 12 to 15 and from 16 to 19, but it's like ... going beyond 4 frames range, to some other... and I think it's the bug.
It's like, sometimes going from 9 to 12, from 13 to 16..

And, robin, it's animated 2 times slower than any other animation, i.e. 5 frames per seconds.
I though it was because of some built-in randomization of the smoke animation, with the purpose of making a patch of smokes look not too "cloned".
Maybe 8 is the wrong value to set it at.

5 is still way too fast for what I had in mind. I need to experiment with it to see what can I do.
Title: Re: Smoke animation
Post by: volutar on January 11, 2015, 12:16:34 am
Ok I found the reason. Engine doesn't consider it as three distinct densities with four animation frames each. It's more like continuous animation with increasing density. It can start anywhere from 0 to 7 and animate 4 sequential frames. So each 4 sequential frames gotta be sorta looped. You can't get static smoke. But you can make it mildly animated with really barely noticeable fluctuations and it will look pretty good.
Title: Re: Smoke animation
Post by: Hollow_Fang on January 15, 2015, 07:30:15 am
Is it possible to make a reference so that you can have 1 gif  for all 55 as smoke and 1 reference for all 55 of fire?

a side question can gifs work in base menu say aliens walking back and forth in the containment cell smoke in the hanger of damaged vehicle or a percent to show how much ammo and fuel with out having to click on the hanger to see?