So now that I've effectively finished with uni I can finally take the time to get back into doing what I love. So I took some time to sit down and try and learn how to make my own depth bias alpha as it's something I end up using a lot in my FX and it's just so expensive. The base of this is from a section in Bill Kladis' recent tutorial. But I modified it to work directly in cascade as well as using some of the techniques from Uncharted 3's excellent FX presentation.
Above is just a simple test emitter with a simple circle sprite. As you can see where it intersects with the geometry it creates a hard edge.
Using a simple scene depth and pixel depth equation I was able to smooth out the edge. But I linked the control with a dynamic parameter so that I may control the softness of the intersection directly in cascade.
Then using the idea behind the fire techniques in Uncharted 3 I was able to run a couple of gradients through the scene depth before it had the pixel depth subtracted from it. This breaks up the straight edge of the intersection to make it more natural and varied. This is great for effects such as fire, which is what I ended up trying it with. Again I can control the amount of noise with a power node connected to a dynamic parameter so I can control it on the fly in cascade.
Here you can see the material. It's still not exactly cheap so I have to be wary of how many particles I spawn but considering a normal depth bias alpha node generally pushes my materials above 50 instructions it's certainly much cheaper. And I could make it cheaper still, if it's just a smoke or any normal material that needs it I could remove the gradient stuff.
And here is how it looks on a really basic fire emitter. But now I've learnt the basics of how it works I can start implementing this in my pipeline and decrease the instruction counts of my materials.
But now that this little experiment is over I should start thinking about what I'll be working on next. Now I've got the time to start working on my show reel properly, and not a rush job in a week for deadlines. I think that I've got a good starting point for one; I might render out my rain shader properly by itself as a break down of the street scene. I think I need to almost start from scratch with the gas station explosion and redo it. I can take this as an opportunity to really get to grips with Maya Fluids and improve on my skills using fluid sims. As for that spell effect, that just needs to go, it's just weak. But I think that if I worked just a bit more on the beam that I could get that to be a really nice effect.