Rendering three/four camera views on a single screen?

@Andrew_Stacey - Thanks for the example, this just what I need to help get my head round the 3D stuff

So…I was finally able to get a 3D scene to render in a Imagine/TurboSilver style with images and multiple cameras. However, for some reason, my object rendering seems to be out of order if I use SetContext(). If I render to the screen directly, the object renders fine.

I know that I read something on the forums about the render engine…Update: the z-buffer bug…which was supposed to be fixed in 1.5…

@aciolino, do you see a similar issue to what I get from my code in http://twolivesleft.com/Codea/Talk/discussion/4322/detecting-touch-in-3d-issue#Item_29? When I draw to an image, it doesn’t capture what I see on the screen.

@aciolino - so that’s what you’ve been working on for 15 months!

@aciolino setContext ignores z-buffering, is that what you’re experiencing?

(Related: https://bitbucket.org/TwoLivesLeft/core/issue/275/provide-option-to-turn-on-z-level. Simeon’s said this shouldn’t be too hard to implement, but maybe a few more people fussing about it would shift it up the priority list!)

Yes, it’s DEFINITELY a z-buffer issue.

When I load a 3D object, I typically don’t have control over the render order of the mesh :slight_smile: so yes, it’s pretty important :slight_smile: Seeing that there was commentary from @Simeon that it was worked on after 1.4, I was curious if it was done or still in process.

Screenshot of my Porsche model is here. https://www.dropbox.com/s/pa1580uqp174o4j/Bad%203D%20Rendering.png

@Ignatz - uh…yeah…that’s right, it’s been a long journey to get here! :slight_smile: Actually I thought of a new way to approach this problem and wanted to try it out - it looked great until I realized that my cubes were rendering inverted, unless they had transparency, which was even MORE weird.

@aciolino - an amazing coincidence, but I have just been wrestling with the identical problem where a cube made of four addRects draws perfectly normally unless you use setContext, then it is a mess.

I resolved it by constantly sorting the sides to draw the furthest first, but there is a problem there.