depth sorting 3d model loaded with assimp

Hi all,

I have a series of 3d models that need to be displayed in an OF app. I’m loading them using the ofxAssimpModelLoader addon. I’ve finally got the models loading and texture displaying almost perfectly, but the one thing that still stands out is the trees which are made using translucent textures for the leaves. They show up, but you can see through to the background color.

I understand this is an issue with the order in which the polys are drawn and that I probably need to sort the faces, but I’m not sure how to go about this in the most efficient and elegant manner, using the tools provided by OF and the assimp addon.

Anyone have any ideas?

![](http://forum.openframeworks.cc/uploads/default/2346/Screen Shot 2012-05-17 at 1.52.20 AM.jpg)

![](http://forum.openframeworks.cc/uploads/default/2348/Screen Shot 2012-05-17 at 1.55.23 AM.jpg)