2008 03 12Core Animation culling problems
Unfortunately, it looks … pretty bad.
Once you setup a projection matrix and give your layers a z position, Core Animation handles your layers as 3D objects. The problem here is culling : deciding which layers are visible on screen. In 2D the problem is trivial : just check the x,y position of the layer and test that against the NSView boundaries. In 3D, take x,y,zPosition of layers and project them using the projection matrix. You then get a x,y position on screen to render the layer. Rendering works fine — but Core Animation uses the original x,y position of layers to cull them.
We can somewhat offset the problem by selecting one layer and making it big enough to take up the whole view. But layers will stil be culled to the view boundary according to their original position. Download the sample and check 'fix culling', then drag the dots to an edge : you'll see them disappearing almost all at once.
- CocoaNav a Cocoa Class Browser using Core Animation
- Core Animation Starfield Core Animation sample using 3D layers
- Core Animation culling problems Don't setup a projection transform on the root layer !
- Threaded Core Animation while on the main thread, update your display with
- Core Animation Bindings binding Cocoa objects to
Core Animation Bindings.zip
- Core Animation Phantom Fade seeing ghosting ? Use two transaction to create and animate your objects
- Photoshop-like compositing with Core Animation