It looks like you're new here. If you want to get involved, click one of these buttons!
Has anybody experimented with this? I've been working on a particle system and today I decided to implement point lights, since I was having a lot of trouble when I first attempted it, I pushed it off. Since starting the project, I've purchased a new device and I'm happy to report that there has been a measurable increase in performance, however, whenever the particles light intensity is beyond 0, and if those particles lifespans are longer than a half a second, then the entire application crashes.
I was unable to even get a few lit particles on the screen with my iphone 8, however with an iphone 11, I can have up to 30 lit particles with a pretty heavy performance loss. The real problem occurs when I turn up the lifespan of the particles.
This leads me to assume, as I originally thought, that the lights are optimized for static entities, and not for runtime instantiation. Am I wrong in assuming so? The particle system works flawlessly with 1000s of particles as long as there are no lights involved.
Should I try to use shade to create a material with emission? is that even compatible with craft.renderer? I would have gone with that, but I assumed it's not possible.
So if you've tried something similar and figured out a workaround, or some way to fake emission please enlighten me
Comments
You can try this, My test code:
I'm talking about potentially having 30-100 point light entities instantiated at nearly the same time, each having there own update functions affecting things like gravity, scale, and speed. I have this system working for standard unlit models, but as soon as you apply lights to them. At least, on my device, the performance is really, really bad. I don't have any issues with using lights normally, just in this particular way. Sorry if I wasn't clear! @binaryblues
I finally have a bunch of “lit” particles on the screen. (:
can you make a video tutorial of how you got Shade to work with Codea?
@arismoko Sorry for my misunderstanding. In my test code, the max numbers of craft.light is nine. If I set ten lights, it will disappear.
Hey guys, lights in craft aren't implemented very optimally, all lights effect all geometry in the scene and passed into lit shaders, meaning that at some point you'll get very bad performance or exceed uniform block limits and it'll break in some way or another...
In Codea 4 I'm working on getting clustered forward rendering working so there will be effectively much better performance and much higher light limits, but for now it's a bit crappy
@John that’s really exciting stuff, until then some bloom and an emission shader works just fine for my purposes (: i'm excited for that though! All craft needs at this point is a pathfinding/navmesh system plus some collision callbacks and we're golden.
Thanks. When I get the change I want to look at integrating this tool for navmesh and navigation stuff: https://github.com/recastnavigation/recastnavigation