Results 1 to 3 of 3

Thread: Challenge: Bonanza-style form close

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Challenge: Bonanza-style form close

    For you folks who'd like a test of your graphics acumen ...
    remember the intro to the old Bonanza TV show where the map of the Ponderosa starts burning from the center outwards, leaving a hole in the middle exposing the background?

    Doesn't this sound like a nifty way to close a form, in a blaze of glory?

    Using the form's TransparencyKey it's easy to paint a "hole" in a form, but the flames part seems a bit tricky.

    Anyone "on fire" to try this?

    DaveBo
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: Challenge: Bonanza-style form close

    Maybe if I get some time tonight I will give it a shot, but here is how I would start.

    Find some images of flames:

    http://graphics.ucsd.edu/~henrik/papers/fire/

    And then place the images around your hole you are burning in the form, randomly selecting from one of many different flame images and then each redraw, you replace each flame with new flame image. Maybe you have a looping pattern and you start several locations with different starting images and then do your loop.

    So lets say you have only 3 flame images. Image 1 is a small flame, Image 2 is a medium flame, and image 3 is a large flame. Then when you are transitioning images, you always increase if you are on image 1 to image 2, you randomly increase or decrease if you are on image 2 (so you would either show image1 or image3), and you always decrease when you are on image 3, back to image2. Since you are starting different spots with different starting images, some places in the flame with appear to be getting hotter, while others seem to start fizzling out.

    Now if you increase your images, you might get a better look and you will probably have to find the magic number that looks right.

  3. #3
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Challenge: Bonanza-style form close

    It would be easier to simulate the embers of a fire rather than the fire itself. Embers are normally stationary but gradually change their color as they either burn hotter or cool down.

    Maybe a modified version of a flood-fill algorithm would be able to cling to the edges of an expanding area (not necessarily circular) region.

    I think this would be much easier if you could use a palettized color system. It would be quite a hard thing to achieve in .net because of its penchant for BPP color systems.

    I shall think about this and get back soon if I think of something. "Challenge" is the right word

    It may be easier to use a pre-rendered animation for this effect. It would certainly take up a huge amount of cpu time and would be difficult to ensure its smoothness.

    Hmmm.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width