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.

DarkBASIC Professional Discussion / Volumetric Smoke Effect

Author
Message
Gil Galvanti
21
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 2nd Feb 2011 04:17 Edited at: 2nd Feb 2011 04:26
Hey,

I'm looking into making a volumetric smoke effect, and I found this good example:



The only problem is on line 77, where the smoke has the zdepth disabled. This creates a better looking smoke effect, as you can see if you run it, the transparent planes don't interfere with each other. Of course, this means that no objects can appear between the camera and the smoke or the smoke will appear on front. Does anyone know how to stop these transparency artifacts without disabling the zdepth?

EDIT: Of course, as soon as I post it, I find the answer...
it seems that "disable object zWRITE" works. It seems to render objects between the camera and smoke correctly and doesn't have the problems with transparency.


Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 2nd Feb 2011 08:26
One thing that is worth trying as well, is alpha transparent textures, with no ghost object - its possible to get properly smokey greys that way, and appears much more volumetric IMO.

Health, Ammo, and bacon and eggs!
CuCuMBeR
23
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 2nd Feb 2011 09:24
Eh, just dropped by to see if theres anything new here and see this very old code of mine

Actually, you should also give a try to this overseen [href=null]very old shader[/href] . With a good looking conic mesh or whatever shape you need and adjusting the values according to aaaand with maybe an additional noise map and/or a normal map to give a heat effect, it would look much better.

There is always one more imbecile than you counted on.
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 2nd Feb 2011 11:30
Use for example .png's with alpha channel, and then use 'set object transparency', and try it with different flags (0-6) at the end, there's got to be one which will make the artifacts go away.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Feb 2011 12:40
Very nice demo.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Feb 2011 13:18
GG, didn't you do a cool fog shader once?

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Feb 2011 17:52
Here's the original thread. There's a better updated version lurking somewhere.

misty, smoky fog shader
Gil Galvanti
21
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 2nd Feb 2011 19:18
Quote: "One thing that is worth trying as well, is alpha transparent textures, with no ghost object - its possible to get properly smokey greys that way, and appears much more volumetric IMO."

Yup, that's actually what I ended up doing with a smoke png texture, looks good!

Quote: "Eh, just dropped by to see if theres anything new here and see this very old code of mine "

Haha, yeah, thanks, it's proving to be useful .


Login to post a reply

Server time is: 2026-07-18 05:06:19
Your offset time is: 2026-07-18 05:06:19