Z-Order problems with EntityAlpha?!

Blitz3D Forums/Blitz3D Programming/Z-Order problems with EntityAlpha?!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Okay... this is probably partly my fault, and reasonably fixable.

I have a bunch of flattened, wide cylinders suspended in midair, and they are all semi transparent.

When viewed at various camera angles, the drawing order for these objects becomes confused, and they end up looking really weird.

It takes a bit of camera moving to notice, but it's definietly there and a really big graphical problem.

I have tried using Beaker/Fredborg's z-sorting code, but it looks like it solves a different problem from mine.


This is the creation function for the platforms:
b.board=New board
	b\obj=Object_Create()
	;#Region Visual
	b\obj\vis\mesh=CreateCylinder(64)
	ScaleMesh(b\obj\vis\mesh,size,0.05,size)
	EntityPickMode(b\obj\vis\mesh,2)
	
	Texture=CreateTexture(64,64)
	SetBuffer TextureBuffer(Texture)
	For y=0 To 1:For x=0 To 1
		If ( x + y ) Mod 2 = 0 Color 128,32,128 Else Color 64,16,64 
		Rect x*32,y*32,32,32,1
	Next:Next			
	SetBuffer BackBuffer()
	ScaleTexture Texture,0.1,0.1
	TextureBlend Texture,2
	
	EntityTexture(b\obj\vis\mesh,Texture)


(And don't ask about the thousands of linked type instances... I do have a reason for it to be like that, and I've been meaning to do it for ages.)


You can download the program to see it for yourself:
http://crumbsoftware.f2o.org/files/zsortproblem.zip


What is going on here, and how can I fix this?

Is Beaker's zsorting fix actually the fix for this? If so, am I doing it properly by using ZOrder_Init with each individual platform? (It didn't seem to work).

The cylinders need to all be independantly moveable. There will never be an event where one sticks through another, so I guess I could, if I must, use a solution with linepicks :(
Unless someone else already has...