Game Development Community

t2dShape3D - DEPTH BUFFER bug

by Lukas Macura · in iTorque 2D · 08/13/2009 (11:12 pm) · 8 replies

We find that in TGB is t2DShape3D which allows use 3D models in TGB, but on iPhone there is problem with depth buffer (z-buffer). Bug is only on iPhone, on PC is ok:

http://www.go2.cz/iTGB/iTGB_bug.jpg - screenshots
http://www.go2.cz/iTGB/reinstatedsoldier.zip - DTS (soldier model)

It's probably same problem as submit Dave - http://www.garagegames.com/community/forums/viewthread/85425

In iPhoneOGLVideo.mm is #DEFINE USE_DEPTH_BUFFER, but if this set from 0 to 1, nothing is rendered.

#1
08/14/2009 (9:34 pm)
yeah, if you place a rotating 3d object in your scene, the rearmost texture seems to pop up in front of the whole scene, this happened to one of my prototypes. generally, it only occurred when the 3d object has an element of concavity in it. the bug did not occur on simple boxes.
#2
08/14/2009 (10:53 pm)
as seen here:



i recompiled for the actual hardware, with same results.

EDIT: And again, using your .dts with comparisons to itgb and simulator

#3
08/17/2009 (5:25 am)
I have the same problem!
garagegame should fix it!
#4
08/17/2009 (9:35 am)
or just completely remove the DTS support from iTGB, as iTGE is the 3D engine ...
3D model support never was fully implemented nor fully supported even for TGB
#5
08/17/2009 (3:04 pm)
the DTS implementation can actually be pretty useful, if used correctly. like limiting rotation to 45-90 degrees, and simplifying models. the perfect example would be konami's portrait of ruin. 2-dimensional gameplay, with 3D background elements create an amazing gameplay experience.

palgn.com.au/media/pics_inside/art_6374_id_2_mw_520.jpeg
#6
08/28/2009 (3:33 am)
We want use 3D model instead of animated sprite in few games and it will really help save a lot of video ram and solve problem with long animation. Only depth buffer problem don't allow us to use it. Is there any chance for fix?
#7
12/23/2009 (1:47 am)
I have the same problem!Is there any chance for fix?
#8
12/23/2009 (4:44 am)
Unlikely as it was mentioned that TSShapes will be removed

They already on the desktop always were troublemakers and on the iphone with its significantly reduced z buffer precision and other specialities to the GPU, they are even worse.

Should you want to use them, you might have to go deep into the code and rework their handling and especially setup your game right so they don't fight, don't put stuff on top of each other if a 3D shape is involved but so that the 2D is clearly before and behind it for example. This basically would require a setting that allows you to define the depth difference steps for layers to be >= the depth of your deepest 3d model