Check this out. It's an example of smoke with a moving fractal texture. To add an alpha channel, I used the VertexLit (seperate alpha) shader from this thread: http://forum.unity3d.com/viewtopic.php?t=2451&highlight=. To make it less flat I added a second material with the Particles/Alpha Blended shader to add shadows and highlights. I'm having a problem where the particles don't fade out before they dissappear. For this test I'm just faking it with fog.
Thats really neat! I am wondering how it would look with a colorful background or used as a rocket trail. Probably the most impressive is when you move the camera inside the smoke.
I'm actually having a bit of trouble. I'm just starting to learn the shader language, and there are a few things I can't seem to figure out: This smoke uses the fractal texture script from the procedural example project and, therefor needs an alpha channel to not look like squares. The shader from this thread: http://forum.unity3d.com/viewtopic.php?t=2451&highlight= allows for this, but doesn't allow for the paricles to fade based on the particle animator component. I've been trying to write a shader to make this work properly, but not having much success. If anyone can help me out with this that'd be great. When this is all finished I'll definately upload the scene and assets and a how-to.
Code (csharp): SetTexture [_MainTex] { Combine texture * primary DOUBLE, texture } replace the combine line with this: Code (csharp): Combine texture * primary DOUBLE, texture * primary
Okay. Here it is. A web-player and unity package of my procedural smoke. Use it, modify it, do whatever you want with it.
Thanks, that's impressive - If you play with the fractal speed, you can create a very convincing billowing effect! And the fractal script could be used to modulate terrain heightmap ...
WOW... i am more than impressed. And procedural textures will certainly come in handy when i look at the atmospheric simulation project wich started in the colaboration section of the forum. Strange, that things exist for such a long time without being noticed. It seems to need some modifications for unity 2.0 though. Many thanks! Frank
Very cool result! I started coughing profusely when the smoke filled the camera view... Coincidence!?
Rez, thanks for the Smokey package. It's just what I was needing. I had logged into the forums specifically looking for fire and smoke. I got the package imported and now have fire/smoke in my scene. But my world seems to be much larger than yours. How do I scale up your smoke emitter? Or should I worry about the scale of my world and re-import it to be smaller? I'm in the early stages so don't mind if re-importing is the smartest thing to do. Is scale something I need to worry about in Unity? Meaning is it possible for my world to be too large and cause problems? I modeled it in C4D in metric and imported it at a scale of 1. Thanks for the advice, Terry
This very nice, how does one cause the smoke to last longer so it lingers high in the sky? I've gotten bigger smoke but not longer lasting smoke.