Away3D 4: Is there an easy way to force certain planes to z-sort to the front regardless of z-position?

Software: Away3D 4.x

Dave Cole, Newbie
Posted: 10 February 2012 11:09 PM   Total Posts: 1

Is there a way in Away3D 4 to force a particular ObjectContainer or Plane to z-sort to the frontmost position on the screen, regardless of its position in z-space?

Thanks!
-Dave

   

Avatar
theMightyAtom, Sr. Member
Posted: 11 February 2012 08:09 AM   Total Posts: 669   [ # 1 ]

In a word, No!

In contrast to previous versions of Away3d, where everything happened on the CPU, written in AS3, in Away3D 4.0, the depth is handled automatically on the GPU. Despite this, it should be possible in both DirectX and OpenGL, but is currently not possible through the AGAL API provided for the FLash player.

   

John Brookes, Moderator
Posted: 11 February 2012 01:24 PM   Total Posts: 732   [ # 2 ]

It is possible in a very hacky way.
http://www.shrewballooba.co.uk/infront/

That has this in Enity.pushModelViewProjection

if (this.name == "ontop")//the red cube
{
 
var m:Matrix3D camera.renderToTextureProjection.clone()
  var 
msk:Matrix3D = new  Matrix3D(Vector.<Number>([10,0,0,0,0,10,0,0,0,0,10,0,0,0,0,11]));
  
m.append(msk)
  
mvp.appendm);
   

mikerz, Newbie
Posted: 13 August 2012 07:31 PM   Total Posts: 6   [ # 3 ]

So, it seems like the newer versions won’t work this way—there is no camera.renderToTextureProjection property for example… Any word on implementing the hack in newer versions? What does renderToTextureProjection represent? The current camera transforms don’t seem to work with this code.

   

John Brookes, Moderator
Posted: 13 August 2012 08:52 PM   Total Posts: 732   [ # 4 ]

No idea. was just something random I did while poking AWAY with a stick and never used smile

Does cam.viewProjection not work?
Not upgraded to Gold yet.

   

mikerz, Newbie
Posted: 14 August 2012 08:01 PM   Total Posts: 6   [ # 5 ]

Nope -_-

camera.viewProjection doesn’t work

   

mikerz, Newbie
Posted: 14 August 2012 10:28 PM   Total Posts: 6   [ # 6 ]

Well, no, I didn’t spend enough time on it; actually using the more explicit code I saw elsewhere it seems to sort of work! that’s a big start… just seems to translate things right now

   

Shegl, Sr. Member
Posted: 16 September 2012 08:20 AM   Total Posts: 134   [ # 7 ]

Anyone make work this ? Im trying to z-sort sprite3d but.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X