Hello,
I was recently wondering how does one make a nuclear explosion in UDK?
Basically what I want is a dynamically lit smoke that also casts shadow on itself. From what I've gathered most smoke particle systems are done with Unlit lighting model and translucent blend mode, meaning its not possible. Yet games do it:
Uncharted 3:
http://youtu.be/RswxxH_a9wo?t=6m25s
Killzone 2:
http://youtu.be/ygo0KHebiHo?t=17s
I could do it as a flipbook I guess if its gonna be in a distance, but I wanna achieve is something like this:
http://www.youtube.com/watch?v=xrz4QpoyKFY&feature=youtu.be
I tried using normal maps with just a cut out alpha but the particle system wont render it out, applying the material to the BSP however renders out the material nicely...
Any ideas?
Replies
You can just fake shading inside the texture, this is perfectly acceptable and done frequently (even at my studio). However it's never truly "lit" or accepting any sort of light direction.
You can get tricky and use a normal map against a vector3 and put those into a DOT product. The vector 3 would be a fake light position that you could parameterize then. You can use a vector transform to convert the vector3 from world to view coordinates so that as you rotate the camera you get shading from the normal map. This still isn't real lighting, but a trick I've done with some success. This would ultimately end up in the emissive channel of an unlit material.
For real lit particles, check out the foliage map that comes with the samples. Take a look at this material (Material'GDC_Materials.Materials.M_FX_LitSmokeParticle'). Similar to my approach above, they are using a light vector instead of a vector3 converted to some different view space. This should allow the material to be lit from real lights. Note that the lighting model has to be set to custom for it to work.
For what it's worth, this exact sort of thing is my list of "future tutorials to make", I just haven't gotten around to it yet. We don't support this stuff on our old version of unreal at work, so I want to make sure I sit down and explore lots of different scenarios so I know I fully understand it. I'm interested in hearing any other people's experience doing this, or if there are key things I'm missing.
Hope this helps!