Animating Fire Part 2: Three-Dimensional Flames

In the previous post we covered how to create a two-dimensional flame such as the one below:

Note that the flame is seen from a side-on view, and any game requiring a different viewing angle will not be able to get one using this method alone. In this post we will expand upon our technique to create a three-dimensional flame like the one below:

This effect is used in Brimstone to make the flames appear to come out of the page, and may be used in any birds-eye platformer where the objects are seen from an angle.

Recall that in this post we were able to make a two-dimensional image appear to rotate in three dimensions, see for example the coin below:

Note that this technique was used to make objects rotate over time, but there is no reason that we can't perform several such rotations all at once. This is essentially the idea we will use to create our three-dimensional flame.

With the coin, we had a constant ω set to 2π/T, where T is how long it takes the coin to rotate back to the same state. Here, we will create fires with M animation frames each and will set ω equal to 2π/N. Each step of the animation, we will perform N transformations of the canvas in the same manner that we did the coin. Each transformation we will draw a different fire. For example, during the j-th transformation of the k-th step we will draw the k-th animation frame of the j-th fire. This will ensure that each fire will be animated at a different rotation angle, and we will essentially have rotated our two-dimensional fire into a three-dimensional one.

Games Mentioned in this Post:

130 thoughts on “Animating Fire Part 2: Three-Dimensional Flames”

  1. I am only writing to let you understand what a magnificent encounter my wife’s princess enjoyed checking yuor web blog. She picked up a lot of pieces, which included how it is like to possess a great coaching heart to let the rest with no trouble learn several problematic matters. You actually did more than people’s expectations. Thank you for presenting such informative, trusted, edifying not to mention cool thoughts on the topic to Emily.

  2. With havin so much content do you ever run into any problems of plagorism or copyright infringement?

    My blog has a lot of completely unique content I’ve either authored
    myself or outsourced but it looks like a lot of it is popping it up all
    over the internet without my permission. Do you know any solutions to help stop content from being
    stolen? I’d certainly appreciate it.

  3. Having read this I thought it was extremely informative.

    I appreciate you finding the time and energy to put this short article together.

    I once again find myself spending way too much time both reading and leaving comments.
    But so what, it was still worth it!

  4. Hi there I am so thrilled I found your webpage, I really found you by mistake, while I was looking
    on Askjeeve for something else, Anyhow I am here now and would just like to say cheers for a marvelous
    post and a all round entertaining blog (I also love the theme/design), I don’t
    have time to read through it all at the moment but I have saved it and
    also added your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the great
    work.

  5. I’m really impressed with your writing skills as well as with the layout on your weblog.
    Is this a paid theme or did you modify it yourself?
    Either way keep up the excellent quality writing, it’s rare to see a
    nice blog like this one today.

  6. Amazing blog! Is your theme custom made or did you download it from somewhere?
    A design like yours with a few simple tweeks would
    really make my blog stand out. Please let me know where you got your design.
    Thanks

  7. I blog quite often and I genuinely thank you for your
    information. The article has really peaked my interest. I’m going to bookmark
    your website and keep checking for new information about
    once a week. I opted in for your Feed too.

  8. I really like your blog.. very nice colors & theme.
    Did you design this website yourself or did you hire someone to do it for you?
    Plz reply as I’m looking to design my own blog and would like to find out where u got
    this from. thank you

  9. Thanks for another great post. The place else could anybody get that kind of information in such a perfect means of
    writing? I’ve a presentation subsequent week, and I am on the look for such info.

  10. We’re a group of volunteers and opening a new scheme in our community.
    Your website offered us with valuable info to work
    on. You have done an impressive job and our whole community will be grateful to you.

  11. Right here is the perfect site for anyone who really wants to understand this topic.
    You realize so much its almost tough to argue with you (not that I really will need to…HaHa).
    You certainly put a fresh spin on a topic which has been written about for decades.
    Great stuff, just great!

  12. I loved as much as you’ll receive carried out right here. The sketch is
    tasteful, your authored subject matter stylish.
    nonetheless, you command get got an edginess over that you wish be delivering the following.
    unwell unquestionably come more formerly again as exactly the
    same nearly a lot often inside case you shield this increase.

  13. You really make it seem so easy with your presentation but I find this matter to be actually something which I
    think I would never understand. It seems too complex and extremely
    broad for me. I’m looking forward for your next post, I will try to get the hang of it!

  14. I really like your blog.. very nice colors & theme.
    Did you make this website yourself or did you hire someone to do it for you?

    Plz respond as I’m looking to create my own blog and would like to know where u got this
    from. kudos

  15. I have been browsing on-line greater than three hours lately, but
    I never found any fascinating article like yours. It is lovely value
    enough for me. Personally, if all website owners and bloggers made just right content as you
    probably did, the internet will be a lot more useful than ever before.

  16. When I initially commented I clicked the “Notify me when new comments are added” checkbox and
    now each time a comment is added I get four e-mails with the
    same comment. Is there any way you can remove me from that service?
    Thanks!

  17. Its like you learn my mind! You appear to understand so much about
    this, such as you wrote the guide in it or something.
    I feel that you could do with a few % to force the message home a little bit,
    however other than that, this is excellent blog. A great read.
    I will definitely be back.

  18. I think this is among the most significant info
    for me. And i’m glad reading your article.
    But want to remark on some general things, The
    web site style is great, the articles is really excellent :
    D. Good job, cheers

  19. I’m no longer positive where you’re getting your info, but great topic.
    I needs to spend some time learning more or figuring out more.

    Thank you for excellent info I used to be searching for this information for my mission.

  20. With havin so much content and articles do you ever run into any problems
    of plagorism or copyright infringement? My blog has a lot of completely unique content I’ve either written myself or outsourced but it looks like a lot of it
    is popping it up all over the web without my permission. Do you know any methods to help prevent content from being
    stolen? I’d really appreciate it.

  21. With havin so much content and articles do you ever run into any problems of plagorism or
    copyright infringement? My blog has a lot of exclusive content I’ve either
    authored myself or outsourced but it appears a lot
    of it is popping it up all over the internet without
    my agreement. Do you know any ways to help prevent content from being stolen? I’d definitely appreciate it.

  22. Generally I do not learn post on blogs, however I wish to say
    that this write-up very compelled me to take a look at and do so!
    Your writing taste has been amazed me. Thank you, very great post.

  23. Hi! I could have sworn I’ve visited this blog before but after
    going through some of the articles I realized it’s new to me.
    Anyways, I’m certainly delighted I found it and I’ll be bookmarking it and checking back regularly!

  24. I must thank you for the efforts you have put in writing this
    blog. I am hoping to see the same high-grade content by you in the future as well.

    In truth, your creative writing abilities has motivated me to get my own website now ;
    )

  25. I’m very happy to discover this page. I need to to
    thank you for ones time for this particularly wonderful read!!
    I definitely savored every little bit of it and i also have you saved as a favorite to check
    out new information on your website.

  26. It’s a shame you don’t have a donate button! I’d
    without a doubt donate to this fantastic blog!

    I suppose for now i’ll settle for book-marking and adding your
    RSS feed to my Google account. I look forward to new updates
    and will share this blog with my Facebook group. Chat soon!

  27. Oh my goodness! Awesome article dude! Thank you so much, However I am having difficulties with your RSS.
    I don’t understand why I cannot join it. Is there anybody else having the same RSS
    problems? Anyone who knows the answer can you kindly respond?
    Thanks!!

  28. This design is steller! You most certainly know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Great job.
    I really enjoyed what you had to say, and more than that, how you
    presented it. Too cool!

  29. Fantastic goods from you, man. I have bear in mind your stuff previous to
    and you’re just extremely excellent. I actually like what you’ve obtained here, certainly like what
    you are saying and the way in which in which you are saying it.
    You are making it entertaining and you still care for to keep
    it smart. I cant wait to learn far more from you.
    That is actually a great site.

  30. Right here is the right site for anybody who wants to find
    out about this topic. You understand so much its almost tough
    to argue with you (not that I personally would want to…HaHa).
    You certainly put a new spin on a subject which has been discussed
    for a long time. Wonderful stuff, just excellent!

  31. Usually I do not read article on blogs, but I wish to say that this write-up very forced me to take
    a look at and do it! Your writing style has been surprised me.
    Thank you, very great article.

  32. I really love your blog.. Excellent colors & theme. Did you make this amazing site yourself?
    Please reply back as I’m wanting to create my
    own personal site and would like to know where you got this
    from or what the theme is named. Cheers!

  33. Just want to say your article is as amazing.
    The clearness to your publish is just excellent and that i can think you’re a professional on this subject.
    Fine together with your permission let me to take hold
    of your feed to stay up to date with forthcoming post. Thanks a million and please
    continue the rewarding work.

  34. Howdy! I know this is kind of off topic but I was wondering if you knew where I could get a captcha plugin for my comment form?
    I’m using the same blog platform as yours and I’m having
    problems finding one? Thanks a lot!

  35. Aw, this was an exceptionally nice post. Taking the time and actual
    effort to make a top notch article… but what can I say… I put things off a
    whole lot and don’t seem to get nearly anything done.

  36. Hi! This is my first comment here so I just wanted to give a
    quick shout out and say I really enjoy reading through your
    posts. Can you suggest any other blogs/websites/forums that go over the same
    subjects? Thanks a lot!

  37. Hi there this is kinda of off topic but I was wanting to know if blogs
    use WYSIWYG editors or if you have to manually code with HTML.
    I’m starting a blog soon but have no coding know-how so I wanted to get advice from someone
    with experience. Any help would be enormously appreciated!

  38. Admiring the time and energy you put into your website and in depth information you provide.
    It’s nice to come across a blog every once in a while
    that isn’t the same old rehashed information. Fantastic read!
    I’ve bookmarked your site and I’m including your RSS feeds to my Google account.

  39. This is very interesting, You are a very skilled
    blogger. I’ve joined your rss feed and look forward to
    seeking more of your excellent post. Also, I have shared your web site in my social
    networks!

  40. Hey there! I’ve been following your blog for a
    long time now and finally got the courage to go ahead and give you a shout out from Dallas
    Tx! Just wanted to mention keep up the excellent work!

  41. Good day! This is my 1st comment here so I just wanted to
    give a quick shout out and say I really enjoy reading your posts.
    Can you suggest any other blogs/websites/forums that cover the same topics?
    Thanks a lot!

  42. This design is wicked! You certainly know how to keep a reader entertained.

    Between your wit and your videos, I was almost moved to start my
    own blog (well, almost…HaHa!) Excellent job. I really loved what you had to say,
    and more than that, how you presented it. Too cool!

  43. Excellent article. Keep posting such kind of information on your site.

    Im really impressed by your blog.
    Hey there, You’ve done a fantastic job. I will definitely digg it and individually suggest to my friends.
    I am confident they will be benefited from this website.

  44. You actually make it seem so easy with your presentation but I
    find this topic to be really something that I think I would never
    understand. It seems too complex and extremely broad for me.
    I’m looking forward for your next post, I will try
    to get the hang of it!

  45. Howdy would you mind stating which blog platform you’re working with?
    I’m looking to start my own blog in the
    near future but I’m having a tough time selecting between BlogEngine/Wordpress/B2evolution and
    Drupal. The reason I ask is because your design seems different then most blogs and I’m looking for something completely unique.
    P.S My apologies for getting off-topic but I had to ask!

  46. Good day very cool site!! Guy .. Beautiful .. Superb .. I’ll bookmark your website
    and take the feeds additionally? I am happy to find so many useful
    info here in the publish, we’d like work out extra techniques in this regard, thanks for sharing.
    . . . . .

  47. It is actually a great and useful piece of information. I am satisfied that you shared this useful info with us. Please stay us up to date like this. Thanks for sharing.

Leave a Reply

Your email address will not be published. Required fields are marked *