Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Mushroom Cloud

Discussion in 'Scripting' started by MetroidHunter, Jun 20, 2007.

  1. MetroidHunter

    MetroidHunter

    Joined:
    May 22, 2007
    Posts:
    213
    how do i make a mushroom cloud explosion?
     
  2. Joe ByDesign

    Joe ByDesign

    Joined:
    Oct 13, 2005
    Posts:
    841
    there are a few ways, the easiest is probably to take 2 parts enriched uranium or plutonium add it into to a high-density cocktail shaker. Increase the pressure in the shaker until you reach your desired result (wear gloves at minimum!)

    Another is a little more complicated as it involves all of the above, but you have to increase the pressure while adding tritium, deuterium, or lithium deuterid. Though this approach is more complicated, your desired result is magnified by 10x or more.

    :p

    in Unity, I would imagine a good effect could be achieved with a combination of particle systems, an animated or morphing mesh, plus various additive material layers to start. That would result a complex effect, but I could see it being awesome!

    Anyone up for an explosion contest? (though i won't be able to enter at the present time, too busy on TLC).
     
  3. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    Don't take Casemons advice man! That stuff is stupid and immature and will get you killed!

    The cocktail shaker has to be _glass_ not metal. Anyone knows that. Metal will cause an early decomposition of the mix, and the result is a smoking pair of sneakers where you used to be.

    If you want this stuff, buy it off the black market or something. If you do mix it yourself, the gloves are a good idea, but I would add that you should breath through your shirt to screen out the harmful fumes and radiation. Just make sure it's a cotton shirt. Sweatshirt if you are extra-careful.

    As for Unity, you could also use the particle API if you could figure out the math for it. If you figure it out, please post it as it would be awesome to see.

    In 3D apps, mushroom effects are usually formed by using different "forces" places all around to direct the shape of the particle cloud.

    -Jeremy
     
  4. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    I could throw in another joke about dropping some Lithium Di-isopropylamide in water but I won't...

    You can simulate the "geometry" of an explosion in a fairly simple way. Imagine a 2D circle split down the centre and hinged at the bottom (like a PacMan). Open the "mouth" and then fill in the missing triangle to create a filled shape. Then, split this down the middle, open it out and then fill in the missing triangle again. And so on. Now, do a lathe operation on this object around its centre axis. You essentially get a ball which expands at the top (hot burning gas rising and expanding) and tucks in at the bottom (spent fuel extinguishing).

    I've attached a script that generates this kind of mesh. You would attach it to an empty GameObject and then add a MeshParticleEmitter and your choice of materials and parameters. I would suggest you use Interpolate Triangles on the emitter to avoid an unconvincingly symmetrical explosion. (Apologies in advance if you don't like C#! Also, the script isn't particularly robust - some choices of parameters raise errors - but it should help get you going.)

    To visualise exactly what the script is doing, try displaying with a simple MeshRenderer first and set the Lift parameter to 0.
     

    Attached Files:

  5. socksy

    socksy

    Joined:
    May 21, 2005
    Posts:
    244
    If you live in the US, it's legal: http://www.unitednuclear.com/uranium.htm

    Now that would be fun :D
     
  6. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    I'm game.

    -Jon
     
  7. Joe ByDesign

    Joe ByDesign

    Joined:
    Oct 13, 2005
    Posts:
    841