Render Mesh On Top Of Everything Else

Software: Away3D 4.x

geekay, Jr. Member
Posted: 27 March 2013 04:50 AM   Total Posts: 40

Is there any way to render a mesh on top of everything else?

Thanks!

   

geekay, Jr. Member
Posted: 07 April 2013 01:51 AM   Total Posts: 40   [ # 1 ]

still looking for help… is there any way to do this, either with shaders or otherwise?

   

geekay, Jr. Member
Posted: 10 April 2013 06:15 AM   Total Posts: 40   [ # 2 ]

Does anybody know how to do this? I still need help!

   

Avatar
theMightyAtom, Sr. Member
Posted: 10 April 2013 08:25 AM   Total Posts: 669   [ # 3 ]

This has been asked a few times, in different ways.
I believe the answer is that is can’t be done through AGAL, but can otherwise be done directly in DirectX or OpenGL (i.e. NOT in Flash!)

You will see forum questions about ignoring z-index, etc.
Depending on your actual situation, there may be a workaround.
For example in a static scene you could render the scene out, and use that as a background to the object you want to place over.

There may be other workarounds. Try to describe your situation, preferably with a link to an example or screenshot.

Good Luck!

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 10 April 2013 10:19 AM   Total Posts: 166   [ # 4 ]

How about this?

http://wonderfl.net/c/cfRC

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make multiple View3D.

View3D’s
- use common stage3DProxy.
- shareContext=true.
- In some cases, share camera3D and others.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   

Avatar
theMightyAtom, Sr. Member
Posted: 10 April 2013 12:50 PM   Total Posts: 669   [ # 5 ]

You’re right smile
I forked that example and made the sphere solid, offset the squares just to check. http://wonderfl.net/c/v1ee

It is indeed using multiple view3D’s.
It’s news to me that this has been solved. You have the perfect working example code there to figure it out wink

This would not have been practical for the way I wanted to use it last time, which was for the object to jump to the top of the “displayList” (I know, I know, its not really a displayList!) on Mouse over.

Thanks for the heads up,

Good Luck!

 

   

geekay, Jr. Member
Posted: 12 April 2013 11:41 PM   Total Posts: 40   [ # 6 ]

I split everything up with the proxy (which is what I was doing before, I have starling running on top of everything), however it is still culling out the other view3d instances.

Is there a chance I can screen share with either of you gentlemen and show you the issue?

Thanks!

   

geekay, Jr. Member
Posted: 16 April 2013 08:13 PM   Total Posts: 40   [ # 7 ]

When I am using the proxy, it still is culling out the other object that should be on top.

Can anyone help me with this issue?

   

beers, Member
Posted: 11 May 2013 02:49 AM   Total Posts: 53   [ # 8 ]

Hi - I’m having the exact same issue. I’ve got the stage3dproxy setup, and have 2 view3d’s layered on top of eachother. (followed the starling-away3d tutorial exactly - except im not using starling, just 2 away3d view3D’s)

All that works great. I can see the objects on the top layer, and i can see all the objects on the bottom layer. Just like in the demo above.

The problem is the top layer seems to be re-using the ‘depth’ of the bottom layer, so the objects in the top layer are being occluded by objects in the bottom layer. I fully expected everything in the top layer to appear ‘in front’ or ‘on top’ of anything in the bottom layer but thats not what im seeing.

Using the new 4.1 beta of away3d.

Any insight into this would be greatly appreciated smile

beers

   

beers, Member
Posted: 11 May 2013 04:49 AM   Total Posts: 53   [ # 9 ]

Ok here’s the solution. If you use the ‘manual’ method of rendering from the starling-away3d tutorial, and you’re using multiple view3Ds on top of each other, you need to use a clearDepthBuffer() call as follows or else the layered view3d will use the previous layers depthBuffer.

stage3dProxy.clear();
viewA.render();
stage3dproxy.clearDepthBuffer();
viewB.render();
stage3dProxy.present();

Problem solved!

beers

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X