How would you implement a "dripping smoke" shader like in DOTA 2

cubrman

Newcomer
DOTA 2 has a number of interesting effects one if witch looks like smoke, dripping from a model. Watch it here (between 1:09 and 1:16):

http://www.youtube.com/watch?v=b7TsYURjEos

The smoke follows the model and leaves a trail in the air. I am wondering how they did both on the CPU and GPU side. I can imagine that they draw the 3d model first and then they draw a polygon on top of it to access the pixels that does not belong to the model. The pixel shader in the second step reads the positions of the model's pixels and draws dripping smoke via some combination of spritesheet texture lookup and coded logic. Other solution could be particles, but how do they know where to each individual stream of smoke? They might have some pre-set dots on the model though.

Am I anywhere near correct?
 
I expect it's a lot simpler than you think. There are animated sheets hanging from his arms. If they were solid textured, they would look like flags. But, they aren't solid. Instead, there are two smokey textures that are being mixed together to form the alpha channel used to blend with the screen. The UVs of the sheets are already wavy, but they are also being animated over time to make it look like the textures are sliding through the wavy sheets.
 
Just a note... you can always capture a frame in GPA or similar and check it out for yourself :) But I suspect corysama is right... likely just some simple blended geometry with animated alpha.
 
Thanks everyone for your replies.

corysama, ok if they use polygons how does they make the smoke follow the wings when the model turns? Especially during the transformation animation? Maybe they animate the polygons (flags) togather with the model to make them follow it? In any case of you can think of a tutorial or an example where the approach you discussed was used, I would highly appreciate the link.

Andrew, I tried to use Nvidia NSight for that, as I sucessfully did in Sait's Row 3. The problem is, DOTA 2 does not allow you to run it with an external program running in another thread. Once I launch the app, it starts with NSight monitor, but then it shuts down and restarts without it. I guess it's a form of protection agains cheating. Maybe GPA works differently from NSight?
 
corysama, ok if they use polygons how does they make the smoke follow the wings when the model turns? Especially during the transformation animation? Maybe they animate the polygons (flags) togather with the model to make them follow it? In any case of you can think of a tutorial or an example where the approach you discussed was used, I would highly appreciate the link.

The "flags" are using some sort of dynamic or baked cloth simulation so that they move like flags. That effectively drags the smoke along with the arms.

Here are a few examples of UV animation I found with a quick search. From least to most complex:

http://hewiki.heroengine.com/wiki/Animated_UVs_Tutorial This will look like a swirly, animated streak. But, the mesh geometry is completely static. The texture will travel along the static ribbon like it's riding down a highway.

http://cgcookie.com/blender/2013/12/05/tip-animating-uvs/ I'm pretty sure the mesh here is static too. But, they are scrolling a displacement map across it.

http://www.oztalay.com/matt/tutorials/flaming-rainbow-material-udk/ Here they are using a noise texture to add detailed displacement to the individual texel UVs. The noise is scrolled smoothly and use to displace the rainbow noisily.
 
Andrew, unless I am doing something wrong, the good days are gone now :). I launched our game with GPA and could successfully capture a frame and profile it, but when I did the same with DOTA 2 - it started properly, showed me the infamous headvalve screen and then restarted without the monitor :). The thing is, you cannot even find the .exe file that actually launches the game. And when you do find it (via the Task manager), it always starts the game only to shut down after the valve screen to be restarted with some magical script that finally gets the app beyond that screen. I don't have a perfect understanding about how apps are launched in Windows and my quick Google search yielded no results, so I am quite cornered here :).

cyrosama, wow, never even thought that was possible, that's quite a topic for me to discover! Thanks!
 
.. with DOTA 2 - it started properly, showed me the infamous headvalve screen and then restarted without the monitor :). The thing is, you cannot even find the .exe file that actually launches the game. And when you do find it (via the Task manager), it always starts the game only to shut down after the valve screen to be restarted with some magical script that finally gets the app beyond that screen. I don't have a perfect understanding about how apps are launched in Windows and my quick Google search yielded no results, so I am quite cornered here :).

...
Steam overlay? Your Steam games are in the Programs folder?
 
Yes, if you mean Program Files. They are located at D:\Program Files\Steam\steamapps...

If there is now way to capture a frame for profiling without running the game with the monitor turned on, I don't know how one can profile DOTA 2.
 
I was able to profile DOTA 2. If anyone stumbles upon this, you just need to enable "autodetect launched 3D apps" in GPA Monitor Preferences. Thanks everyone for your help.
 
Back
Top