Patrefans
TGC69 from patreon
TGC69 patreon

Small Lighting Tutorial

🕑 Added 2021-12-02 15:09:29 +0000 UTC
Small Lighting Tutorial

Comments

TGC

Yo are welcome :D

Chris

This is extremely interesting. Thanks for sharing.

TGC

Well I kinda noticed aswell a bit that they are hungry. Don't know how much exactly, but it is still a good reason to try to avoid them, when its possible :)

CaseEP

Note: 1) Note that most of what I wrote above is conjecture. 2) Not sure it's fair to say that the Anipatterns really "eat" performance - what I DO know is that the Unity 2018 version VaM is based on has no native implementation of splines (or "Beziercurves", as they are often (misleadingly) called) and that Meshed implemented a rather spartanic, homegrown implementation of what looks to me like CadMull-Rom splines, which is (afaiks) the passed on to Unity's animationcurve class. Dunno how efficient Meshed's implementation is - Splines are a pretty basic tool, and you're pretty much guaranteed to be using the one or other variety of them as soon as you go beyond drawing straight lines.

TGC

If its already a bit performance saving thats great! Especially without downsides and even with advantages :) Also interesting to know that the animation patterns are such performance eaters and why. I am already trying to avoid them at all costs, but will try to do that even more in the future. Definitely helps me a lot to know such stuff :)

CaseEP

Yeah, I had a peek at the .cs file, and as far as I can tell, the plugin only stores position & orientation for the initial and final point. No other storables - that's six little floats as opposed to the mid-sized novel the anipattern will add to your scene .json. And it just uses Unity's built-in lerp & slerp for animation rather than involving the whole machinery of computing a cubic interpolation polynomial in realtime and passing that onto an animationcurve every update step. Won't save you a huge amount of performance if it's just the two patterns - but if it's a whole bunch of them, my guess the cost will add up rather quickly.

TGC

Thats pretty cool idea! Just tested it and it works perfect with blend to trigger the linear animation. Gonna sack animation pattern for this then. It also has an additional benefit of moving the lights freely around! Thanks for this one :D

CaseEP

Wrt Performance/Filesize: Moving the lighting sources with animationpatters is another three atoms each, and animpatterns have a lot of storables (ie additional entries in the scene .json) As long as you only need linear movements, I think you can save some performance by using the LinearAnimation logicbrick. Pretty sure it'll also help a bit with keeping the size of the scene .json down

TGC

Cool very happy to hear that :)

unknowngreatone

Thank you so much for this! I made edits and saved scenes, but didn't change global illum. That option really did it for me.


More Creators