domenica 25 ottobre 2015

Day 82: Particle System

I took a little pause from the engine both for school reasons and for the disappointment with the GJK algorithm which i just can't fix.
So today I decided to start anew with a particle system. I already implemented something like that for an old 2D engine, and back there everything was really easy, now it is quite complex for multiple reasons:
1) In 3D the particles must always face the camera, which is something not supported by the GUI sprites
2) Transparency doesn't work with deferred rendering, so I'm not really sure that something like smoke will ever be possible to implement without some trick I don't know yet. Full transparecny could be supported though, which is the most important thing.
3) Mesh particle systems would be a nice future add to the engine, because they work perfectly with deferred rendering, and potentially I could create parcicles that emit lights, respond to  collisions (if I will ever have a collision system) or even cast shadows. Of course I won't be able to spawn millions of those ones though.

Right now I just implemented a simple emitter in camera view, it needs tons of optimizations and refactoring, and then I'll try to port it in 3D, which will probably take some time.


Nessun commento:

Posta un commento