Text Disappearing with Frustum

Software: Away3D 3.x

trist, Newbie
Posted: 02 August 2011 03:12 PM   Total Posts: 3

Hi,
I have a problem relating to v3.6
I’ve used Frustum culling because the floor plane kept disappearing at certain points. Problem I have now is that the text objects “break up”.

[Basically I have a simple rotating map, a plane with a bitmap material as the map. The text fields are points on the map that follow the camera rotation so they always look at the camera.]

Any ideas how I can have the text show up all the time and the floor plane?

Many thanks
Trist

 

   

Stephen Hopkins, Sr. Member
Posted: 03 August 2011 11:23 AM   Total Posts: 110   [ # 1 ]

Try setting all the text.ownCanvas = true. Could be a z sorting issue

edit: If that fails, should be able to use Sprite3D’s or one of its variants for your text labels.

 

 Signature 

http://www-scf.usc.edu/~shopkins

   

trist, Newbie
Posted: 03 August 2011 04:30 PM   Total Posts: 3   [ # 2 ]

Hi Stephen,
Thanks for reply. Sadly ownCanvas had no effect.

What’s involved in using Sprite3D? Does it involve adding a TextField to a Sprite3D object?

 

   

trist, Newbie
Posted: 03 August 2011 06:48 PM   Total Posts: 3   [ # 3 ]

Just looking at this again, what you said about z-ordering might be effecting something else.

The words float above the plane (which I’ve made translucent). The plane is at y=0 the words are y=30+. The plane doesn’t move, only the (hover) camera. The renderer seems to think at certain points the words are below the plane - they are rendered above an below.

The green arrows in the attached image show correctly rendered words, the red arrows point out words which the renderer thinks are below plane.

I’m guessing I must have taken the wrong approach but don’t know how. Can anybody give me any guidance as to what is causing this?

 

   

Stephen Hopkins, Sr. Member
Posted: 03 August 2011 09:41 PM   Total Posts: 110   [ # 4 ]

Set everything to ownCanvas = true, and try changing the .screenOffset properties so all the text’s have higher index than the plane. It should either by screenOffsetY or screenOffsetZ, this part of away3d changed since I used it so I’m not too sure how it works, sorry.

To use Sprite3D, I think you will either draw text onto a bitmapdata, or use the movieclip sprite and put text in it.

 

 Signature 

http://www-scf.usc.edu/~shopkins

   

trist, Newbie
Posted: 04 August 2011 08:59 AM   Total Posts: 3   [ # 5 ]

Making progress! Adjusted the screenZOffset for the plane (just before each render call) to be a really high value, this has sorted out the issue where the text labels appear to be below the plane. As we never see the underneath of the plane the z-order underneath doesn’t matter.

The only issue I’m left with is the text breaking up, it seems to happen when it’s near the edge of the screen. Any thoughts?

EDIT
Used

plane.pushBack true 

instead of

plane.screenZOffset 1000 

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X