Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / (DBC) I made a nice realistic smoke effect, need help to make it a bit better

Author
Message
Goldeneye Nemesis
21
Years of Service
User Offline
Joined: 9th Dec 2002
Location:
Posted: 27th May 2003 19:39
Ok, here's a really neat realistic smoke effect. It’s separated into a ‘make smoke’ function and an ‘animate smoke’ function, but can be run ‘as is’ ‘cos I made a little example .

Press space to spawn the smoke in another place

It fades away beautifully, but I can’t get it to start form the spawn point, i.e. all the smoke particles originate from one point before turning into the plume you see in the example.

Can anyone tinker with the code and see if you can make it do this? You are free to use the code, but I would appreciate it if you let me know what for, and how (what? Might give me some ideas ) credit would be nice too.

you'll need the 'smoke.bmp' file from the Tank demo that came with dark basic
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 27th May 2003 21:37
Very nice code, well done. The smoke doesnt start at one point because for every smoke particle, you increase its initial height using

object position y(smoke#(0,4))+(I*0.5)

If you take away the +(I*0.5), all the smoke will start at the same point, however it will seem very cluttered. If you want it like this, you could maybe use 3 or 4 points where smoke emerges, going different directions to give it a random look, although not straying too far otherwise the smoke will look tattered. Try changing the height or the points of origin, and see what result you get.

Cheers,
Kentaree

Whatever I did I didn't do it!

Login to post a reply

Server time is: 2024-04-23 20:01:26
Your offset time is: 2024-04-23 20:01:26