Apply this material shader to a plane parented in front of a camera to get highly customisable, real time lens flare effect. Choose from either synthesised lens-flare elements - or your own images. Example
You Tube Tutorials Here:
Part 1 LensFlare Tutorial Part 1 of 4: Blender Real TIme Lens Flare Shader Introduction.
Part 2: LensFlare Tutorial: Part 2 of 4: How To Set Up a LensFlare Shader in Blender Cycles.
Part 3 :LensFlare Tutorial Part 3 of 4: Blender Lens Flare: Automatic Masking
Blog Notes Here:
http://blendbits.blogspot.com.au/2013/05/lens-flare-shader-for-blender-cycles.html
Thanks Thomas.
I've re-uploaded the files (several times!). THe external shader (lensflare.osl) file looks like it was being stripped from the .zip -- so I've switched to internal script mode.
Looks like I still have a problem with absolute texture file paths for the Earth texture (at the moment this has to be re-linked to textures/earth/...) -- so will fix this tonight with 'packing' and re-up load.
Thanks again..
Dylan
It looks like the files download and correctly run now ("lensflare_shader_blend_example_1c.zip" version and onwards) - can any one confirm this?
Cheers
Dylan
Very impressive! Good work. Can you to update with more realistic textures like this (i forget link to scene from blendswap)
http://ubuntuone.com/2HExNuIM0xRjaEYAX0onMj
http://ubuntuone.com/2b8HhvAJ9lS24YLLTpsSTs
http://ubuntuone.com/2xeOsmIXLzYYiKbJvHQMuz
http://ubuntuone.com/3JCZV2p5wqjzr1QJoMXprF
http://ubuntuone.com/5WwJkbvELSjLY9VljWqBqj
it will be good opensource alternative to https://www.videocopilot.net/products/opticalflares/
Thank you for script
With respect, Ilia. brothermechanic@gnail.com
Hi, sorry excuse my ignorance but I'm trying to download the script on a mac and I can't seem to find the osl file only a blend file? There is nothing actually in the Mac osx folder. Again apologies if the answer is staring me in the face.
I've watched the tutorials and this looks like a great addition.
ok, I can run the blend file and the shader is there but how do I save out the osl file?
Hi Nigel,
This is a good question!
Yes - the .blend file includes the osl shader -- so you don't have to save it out (like in the video tutorial) - it should just run.
Apologies for any confusion - I made the video before uploading the file to Blendswap (where all extra non-texture files get stripped out).
So... the .blend file should just work (don't forget to enable OSL shaders though!) e.g. - In the Render (camera icon) settings: -- Device: is set to CPU (not GPU) -- Open Shading Language is checked.
Good luck - let me know if you have any problems.
Dylan
Hi Dylan
Thanks yep, I've got it up and running no problem. But how do I use the shader in other blend files? I'm guessing I need to save it out somehow but not sure how? Guessing I could just append files to your blend file but that seems somewhat inelegant?
Oh and is it possible to turn the initial light source completely off so only the flare artifacts remain?
thanks Nigel.
Hi Nigel,
Sorry for the slow reply. I've just uploaded a tutorial that helps answer this. (Tutorial 3 above). It's quite a long tutorial though -- here's a direct link to the bit you want.
http://www.youtube.com/watch?feature=player_detailpage&v=2leKfFhsa6o#t=442s
Regarding turning off the 'light source'. Yes this can be done. The shader generates all its 'lights' internally. Each lens flare element (bloom, starburst, rainbow and all the spots) can have their intensity levels set from 0 (invisible) to 1 or higher (very bright). Just tweak the numbers on the shader :-)
Cheers
Dylan
@BrotherMechanic. Thanks for the lens flare image links.
Anyone can use these by just down loading the images to their texture folder -- and then typing in the local path to the images directly into the shader node (just replace the ones that are there).
In this way -- you can use any lens flare element you like!
Cheers
Dylan
Good ! You made important a deal !!! Continue it is.With Renderman-like shaders all clear.And what GLSL and WebGL ?(Please,without links at Thomas Dinges :D)
Has anybody got this shader working with latest Blender releases (2.76b - Windows10)? It seems to run ok - but I don't see the flare ....
Thanks a lot for your work (even if it's "only" porting) If you had not done it, we would not have a shader now :)
One thing I had to change was to set the OSL script from external to internal and assign the script textblock. Otherwise it does not show anything at all... Maybe you could change that and reupload?!
Greeting, Thomas