• Register

A group dedicated to indie and standalone game development.

Post tutorial Report RSS Coding realistic Smoke and Dust effects in Fusion 2.5

In my mind, beside the graphic look of things, the realism is always connected as close as possible to the laws of nature. Around us things like dust, tend to look like they are random or at least unpredictable in a way. In another way we expect them to happen in a certain pattern. Two opposite sides always fighting.

Posted by on - Basic Other

In my mind, beside the graphic look of things, the realism is always connected as close as possible to the laws of nature. Around us things like dust, tend to look like they are random or at least unpredictable in a way. In another way we expect them to happen in a certain pattern. Two opposite sides always fighting.

Having this in mind I like to create effects that have a life of their own and though they are coded with a specific algorithm (giving them a pattern), they appear randomly (giving them an unpredictability).

For Maniakos Mineras, I have implemented an earth shake effect when a dynamite explodes. Therefore I decided to make an effect like there is dust falling from the ceiling.

sd preview


The algorithm in my mind looks like this:

  • Every time earth shakes -> Start creating dust by using a loop which runs 3 times
  • Every 1 loop -> create and position randomly a dust active, make sure it shows in a top layer, set smoke flag 0 on
  • If flag 0 = on -> always move downwards (creating the effect of falling dust)

In the Event Editor it will look like this:

sd01

More or less that’s all. Now what do we achieve?

1st we make sure that every time a shake happens we will have dust created

2nd the dust is created 3 times so we have enough visual to make it look nice

3rd we made a self sustainable code that we don’t need to care about any more. If we change our mind about the times the earth will shake we will not do anything to the code of dust. The visual will be different

So it seems like we have some “false” nature rules set up.

  • When the earth shakes Dust happens
  • Dust happens on various locations like it would in real life (we are cheating, because it wouldn’t happen exactly randomly but to the less strong parts of the roof i.e.)
  • If dust happens, then it will slowly fall down due to gravity

So far so good but there is still one detail which is one of my favorite parts. Since Clickteam gave us the ability to scale real time the objects and even more rotate them, my favorite effect is random scaling and rotation. This breaks the repeatability and everything looks more realistic.

Thank you Clickteam no 1…

And there is another thank you… Behaviors give me the chance to have clean code at last. We put the event in a behaviour in the dust so everytime we create it it will behave in the same way, coding it like below:

sd02


Thank you Clickteam no 2-1000…

The final effect is shown in this short video.

Notice how the dust has various sizes and angles. Also I have used some smoke at the destruction of the Rocks. You can see there how the scaling and rotating behavior works also. Everytime I will put this dust, I will have this effect and I will not care to make it look better by breaking its repeatability.

So many ways to make “false” nature rules, so little time…

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Established
Privacy
Public
Subscription
Open to all members
Contact
Send Message
Membership
Join group
Group watch
Follow
Related Engines
Multimedia Fusion
Multimedia Fusion Commercial
Related Groups
Clickteam
Clickteam Developer & Publisher with 2 members
Indie Devs
Indie Devs Hobbies & Interests with 1,653 members