I have a scene where I have a lot of particles (> 5000) which are essentially spheres, that I would like to animate in a particular fashion. Basically, the thousands of particles can be categorized into a few types, with each type having its own material.
I am working on animating the behavior of a "periodic" box where, as particles cross a plane, they appear out the other side. Similar to a game of snake where the snake goes through one wall and appears out the other. However, I have come across the following limitation(s):
- When I keyframe the animation, unless the frames are literally 1 apart, the particles will travel backwards then start moving forwards again. If the frames are 1 apart, the particle will disappear and reappear at the back. This is undesirable as I would like to have a smooth animation.
As a solution to this, I thought of fading out the object, move it, then fade it back in at the start. However this brings up another issue:
- I am using cycles. Short of having 5000+ materials, one for each objects, I don't know how to control the opacity/transparency of an object independently. Also, if I have that many materials, I lose the ability to change the attributes (color/texture/etc...) of an entire group collectively.
If anyone has any thoughts on how to deal with this issue, whether in terms of fading out an object independently of its material, or any neat approaches to what I am trying to do, it would be greatly appreciated. Just for sake of completeness, I am writing a blender python module to do this, since all the position data for the particles are in a file generated by a simulation, and this is the remaining issue I have.