sisilicon / godot-lens-flare-plugin Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
https://imgur.com/a/VoP8ZFc
That darker shading just appears when using the flare lens effect.
As the subject says it lacks documentation or even a demo to see how this works.
In Godot 3.2.3, I tweaked the lens flare settings while leaving the strength to 10.0 (its default value) to obtain this: #4 (comment)
Then I closed the project, and reopened it. I didnt touch anything, and this is how it looked when playing the game:
It looks a lot fainter. So I increase strength so 10.0001
, and this is the result:
Then closed Godot, and reopened, which made it go back to this:
I know Godot is not saving default values (and because of this, not setting them), which means, a value of 10 will make the setter not called, despite the variable being 10
. In the material, the initial value is 0.294
so it's actually gonna default to that, due to the setter not being called.
To fix this you either need to constantly keep default values the same as the material's initial values, or trigger all setters in ready.
Note: this applies to all parameters, not just strength.
I installed the plugin (excluding everything that is not under addons/
because I dont want to clutter my project), added the LensFlare
to my scene, and nothing shows up in editor. When I play the game, I see no lens flare either.
Note: I add my directional light and camera at runtime, if case it matters. I wonder how the plugin knows where the sun is, there is no code searching for it and no parameter as far as I can see. It also produces no errors so I have no idea if I'm missing something important.
If I create an empty project, install the plugin without excluding anything and open the LensFlare.tscn
demo scene, I see something.
But if I just create an empty new scene and create a LensFlare
, nothing shows up as well, so I wonder what's required to make this work?
Hey! This is amazing, and I'd love to understand better how it works!
That being said - shouldn't the halos be following a circle rather than an ellipse?
Unless the camera is using an anamorphic lens, the optic elements are all circular, so the effect should not be squeezed to display aspect ratio, it should be cropped on the top and bottom.
Could there be a control added to change that?
I guess anamorphic lens flares are a different beast alltogether :)
I wonder how hard would it be to port this to Godot 4...
Your directory
"addons/SIsilicon.vfx.lens flare/"
is referenced in files as "addons/SIsilicon.vfx.lensflare/"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.