Rendering 2d text in a scene

Software: Away3D 4.x

wagster, Member
Posted: 23 October 2011 10:09 PM   Total Posts: 68

I have to add some signs to a scene.  I’m basically just creating a MovieClip, drawing it onto a BitmapMaterial and setting that on a Sprite3D.  As you can see from the attached, the results do not compare well to text rendered in the normal display list.

I know text in Stage3D is a tricky issue, but is there any way to get a better result than this?

 

   

oulaboula, Newbie
Posted: 24 October 2011 08:09 PM   Total Posts: 15   [ # 1 ]

hi, maybe like they do in starling framework , with bitmaping the font ?

(don’t tested yet)

   

tcorbet, Jr. Member
Posted: 24 October 2011 08:43 PM   Total Posts: 31   [ # 2 ]

Bunko, which is a complete Workbench and Runtime to let you create robust 3D Text, has a simple configuration option at Runtime which lets you determine how much SubGeometry you want to create.  There is a Top, Bottom, Outsides and Insides.

If you limit the result to the Top, you have a perfectly triangulated 2D plane that is the faithful equivalent of whatever font face, style and weight you want.  Moreover, since the GlyphMesh extends away3d.entities.Mesh, that plane will behave properly with regards to the materials, lights and perspective of the rest of your scene.

It is, admittedly, something of an overkill—as a representative average, each character might have a triangle count between 20 and 100—but it would provide the result that I think you are seeking of having text that complements your application.

That said, I believe the suggestion to use Starling for 2D content is probably the right one, if it is not really interactive content that participates as a 3D object.

   

oulaboula, Newbie
Posted: 24 October 2011 09:27 PM   Total Posts: 15   [ # 3 ]

where is bunko ? wink

   

wagster, Member
Posted: 24 October 2011 10:18 PM   Total Posts: 68   [ # 4 ]

Thanks - I spent this evening going down a different route entirely.  At no point will I need the signs to be behind a 3D object, so I have added a layer on top of the View3D and I’m overlaying the signs as regular Sprites.  I’m having a few issues getting the 3D coords—> 2D coords to work properly, but the text is looking nice and it’s reasonably lightweight.  (Plus I don’t need to learn Starling or Bunko!)

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X