I just posted my first item to the Unity Asset Store - Dirty Lens Effect. It’s a really nice effect, inspired by what we’ve seen in recent AAA games.
The usage is quite easy. It’s a simple, lightweight material that can be applied to anything in your scene. Ideally, apply it to a particle system if your game is first person (because particles are camera-facing by default), but you can add it to a plane as well if your game is isometric. This would compliment a lens flare quite nicely, but works well on its own.
Here’s a sample of what it looks like -
I’ve supplied the basics of what is needed to get you going. Just open the included sample scene and test it out.
I should mention that if this effect gains enough interest, I’ll start to put together very low costs texture packs.
What’s next?
As requested below, I will make some mobile friendly shaders and separate version for both particles and geo (for mobile and not).
Enjoy!
Tested and works in both PRO and Free versions of Unity 3.5
UPDATE
new version is up with separate shaders for both geometry and particles. it also includes versions that are mobile-friendlier. Get it while it’s hot!
UPDATE
Bug fixes and optimizations. I also added a new emitter to the package that’s tinted red to show that you can play around with the settings to get some interesting results.
damn, I actually don’t know. I have the pro version. I don’t think it uses anything that is pro-specific, but let me try to unlicense my Unity and test. Stay tuned.
Ok, just tried it out. It’s still working great in non-pro. You should be good to go. Keep in mind that this was tested locally after removing my PRO license, so if it still doesn’t work for you then I’m really sorry.
Looks amazing! Just one question - have you tested this on mobile? What’ s the performance like?
Also, will you be releasing more contents (eg. more dirty lens material) for this?
1-
I’ve not tested it on mobile, but like anything with mobile, it will have a hit. But if it means anything - it’s incredibly light, it doesn’t even show up on the profiler on my 2011 iMac (meaning the values are almost zero). Basically, it’s about the same weight as a lens flare. And like lens flares and particles, the thing to keep in mind is overdraw. There’s no avoiding that if you want it relative to the game world.
What I’ll do is make a version that’s the bare minimum, which would make it even lighter. I had plans to do that, I’ll just accelerate the plans. Any masking elements will be removed and will need to be done in the texture. I’ll leave the exposed multiplier though. That’s only two or three extra instructions. The added bonus of the intensity is that you can you can lerp it via scripting if need be.
Actually, better yet… I’ll make different versions for particle and for geo. The particle version needs a few more instructions.
Let me do that today and post it.
Thanks for the feedback, I was not expecting interest from the mobile world.
2 -
lens packs. This was something that I was planning on doing if this item gained enough popularity. Actually, I should probably put that in the original post.
Another question - would you sell a FULL pack - This + the texture pack in one package? I hate to be updating two packages all the time. Also maybe a bit of discount for buying both at once?
This looks brilliant, and a great price too! I have just one question - it looks like the effect is rendered based on the position of the particle effect. Any thoughts on how to tie this in to the rotation of a directional light?
That would make it a lot tougher to use, but what you could do is then script an object to be camera-facing and then just scale the plane along with the rotation. This exact question would be where a proper lens flare system would be great. Unity’s lens flare is adequate at best and only supports textures - not shaders, sadly.