SceneKit rendering order is incorrect in some cases

Originator:miles.chris
Number:rdar://14271770 Date Originated:26-Jun-2013
Status:Open Resolved:
Product:Mac OS X SDK Product Version:10.9
Classification:Other Bug Reproducible:Always
 
26-Jun-2013 02:27 PM Chris Miles:
Summary:

Scene Kit renders nodes sorted in order of distance to the point-of-view, where distances are measured to the center of each geometry. In some cases (such as the example project attached) this simplistic default ordering of nodes can result in rendering problems.


Steps to Reproduce:

Build and run the attached sample project, SceneKitRenderingOrder. You will see a scene with three planes. The front most plane is much wider than the two behind it, and is mostly transparent. The second plane contains some coloured shapes. The back plane is white.

Without adjusting the scene, the second plane can be seen through the front plane, as expected.

Rotate the scene left/right +/- 45 degrees or so and you will see, after a certain angle, the second plane is no longer visible through the front plane.


Expected Results:

We expect the rendering order to remain consistent no matter what angles the scene is viewed by. The rendering order needs to remain consistent so that blending results are as expected.


Actual Results:

When viewed at some angles, the default calculated rendering order is incorrect causing blending in the wrong order leading to undesired rendering output, particularly when blending transparent materials.


Regression:

n/a


Notes:

We understand that explicitly calculating the node rendering order and setting the renderingOrder property on all nodes is a way to work around the default ordering issues. However, it would be great if Scene Kit's default node sorting behaviour was able to be smarter about such cases.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!