Thursday, May 28, 2009

Particles.....

Hello E!

So I have been working closely with an Artist trying to get all the games particles in and working as they have been described to work.

Gamebryo's Maya tools have proven to be horrible horrible when it comes to particles.

First we find we can't use all the particle options Maya gives normally after several failed exports. We later find in the docs in this tiny little piece in the middle of a page the options that are available in Maya to use.

We found some exports still didn't work with the apparently 'will work options' and it took a lot of trail and error before we could assitain what we could use.

The next issue we had was the sorting of the particles. They decided they wanted to draw over everything and anything. We found hidden in Maya some flags that could be set to allow for z testing and writing.

Then a new frame rendering system was implemented and the particles got shitted again! Now their alpha wouldn't work (stayed pink) and they wouldn't draw in front of any objects! Turns out they were being placed in a new root node that didn't have any an alpha accumulator set up on it properly and wasn't being updated correctly.

The next issue was that all the particle systems were Animating at the same time. Turns out a specific cloning process had to be adapted to allow for the time controllers to not be shared. The time controllers also needed to be set to app initialised so we could start and stop the particles when desired.

For a long time I was getting the time controllers out of the node hierarchy purely by chance, and when we started implementing a new particle system that system would not work. It took some time to realise the system could be opened in the asset viewer and the node properties could be viewed for what each node contained. Knowing the correct hierarchy now I could access all time controllers on all particle systems and work with them.

Turned out the particles could not be added to the scene and then removed and added again, they simply did not want to work second time around, something to do with gamebryo internal code. So I revamped the entire particle system so it was better designed to work with all we had learned and loaded each particle we would potentially use in the scene node first and simply moved to and off screen location and moved to the desired location we needed. This however is still and on going issue with reloading the game second time round because the particles get removed and re added to the scene node and still fail to work after a complete deinitialise and reinitialise of the game world.

Another error occurred where a particle was complaining off not having a colour value set, reset the colour value in Maya and re-exported until it worked. Not sure what the exact fix was but it works now...

After all these painstaking errors managed to get all the effects in and playing. Still need to change the way the game deinitialises and restarts so we can have particles on the second playthrough.

Managed to get particles to attach to other nodes in the scene graph so they follow them around.

Frame rate badly effects particles created with a vortex field, they go widely offtrack.

Managed to get looping effects working.

These are only the problems we have faced that I can remember, I'm sure there are plenty more and they have taken a massive chunk out of our development time to get working...

Screens of the particles to come later......

1 comment: