However in certain areas it seems parts of the pre-rendered cubes disappear?
You are simply exhausting the resources of your hardware. Even a beefy graphics card can only take you so far.
I need to be able to rotate all the layers along both the x and y axis like an actual rubik's cube.
Impossible even in a 3D program. Well, not actually impossible, but you need like over 30 levels of nesting/ parenting, which is impossible to manage. A Rubik's cube has over one billion combinations, after all. The common approach is to animate a couple of steps and then freeze/ snapshot the current positions and start off fresh. There are scripts for this to help.
Thanks for the input. I had figured these were/would be the issues I was facing. I jumped back on it this morning and was able to find a camera angle which rendered it properly, and simplified it. So I believe I have found a way around my obstacles, and although it won't be quite what I set out to do I am quite pleased with what I have done. I ended up going through the process of pre-rendering the layers individually with their rotation in either horizontal or vertical direction. Then taking the pre rendered animations and layering them together. Seems to work well and still can be used for what I want even though now I will have to manually edit the "movements" to the audio source rather than keyframing it.
By far the easiest and most efficient way to do a Rubik's Cube in AE is with this script: RubikCube - aescripts + aeplugins - aescripts.com
Even my puny Mac Mini can build one in about 35 seconds and it has no problems rendering:
More than worth the price if you need one.
Thank you, I will have to keep that in mind if I ever decide to go beyond what I have already done with the rubik's cube I was able to render out Just finishing up with the last set of vertical rotations.