I have an issue with render order in my scene. All objects have transparency. There are multiple child objects for each group in the scene.
Each scenario below uses the same data.
Option 1 below works as intended. But I need option 2 to work since the user of the application should not have to manually add data to the application.
- If I manually add a set of objects in a specific order they render properly.
- If I load all the objects at once and then add them to the scene in a specific order, the render order is wrong. I thought the documentation said they are rendered based on order added to the scene. I figure this would give the same result as option 1.
- If I load all the objects and hard code renderOrder, the order is wrong since child objects have different depths in the scene.
I cannot figure out why option 1 and option 2 give different results. I would prefer to not use option 3.
Is there something else besides order of objects added to the scene that determine render order?
Here are two videos demonstrating my issue.