Hi Ralph

Yip, it was unreliable, mixing front and back up completely.

Thanks a lot for this, I will give it a go and search through the old
topics.

Cheers

Ralph B wrote:
> I haven't re-checked this for CS4/FP10, but I understand from the
> reasons that Li mentions below, bothsides=false is not always
> reliable.  If you want the text to be fully rendered when viewed from
> the front and invisible when viewed from the rear, you can make both
> sides visible, then hide the whole text object if it is facing away
> from the camera with an algorithm like this:
>
> function hideReversedTextObject(obj, camPos){
>    // Does a crude backface culling
>    var v1:Number3D = new Number3D();
>    var v2:Number3D = new Number3D();
>    var ang;
>
>    v1 = obj.inverseSceneTransform.forward; // Vector facing away from
> object
>    // Note: use inverseSceneTransform.forward (not
> sceneTransform.forward) to get
>    // the vector that is normal to the plane of the object
> (textfield).
>
>    v2.sub( obj.scenePosition, camPos ); // vector to camera
>
>    ang = Util3.degrees(v2.getAngle(v1)); // Angle between vector to
> camera and vector facing away from the object.
>    obj.visible = (ang < 90);
> }
>
> Also, if you look for topic "What is the latest/best/simplest 3d text
> method to use?" in the groups I had posted a step-by-step technique
> for using TextField3D in CS3, following Li's guidance.
>
> Ralph
>
>
> On Nov 8, 9:02 pm, GBear <[email protected]> wrote:
> > Thanks Li, I'll give that a go and let you know how it comes out.
> >
> > Cheers
> >
> > Li wrote:
> > > Hey GBear,
> >
> > > Textfield3D has bothsides = true by default, that is, backface culling is
> > > disabled for text. You can enable it however by setting it to false. This
> > > might cause some problems because of the way vector fonts are arbitrarily
> > > designed; some glyphs are designed clockwise while others are designed 
> > > anti
> > > clockwise. This orientation in the definition is crucial for back face
> > > culling to be implemented properly. There is no convention in font design
> > > and I haven't yet produced a solution to counter this.
> >
> > > The back property is not applicable for textfield3d.
> >
> > > I would try using TextField3D with the font you have in mind and 
> > > bothsides =
> > > false and see how many glyphs pop out. It depends on the font really... If
> > > you're not ok with that I would go for the Swf.as alternative. Break some
> > > text in the Flash IDE and import it in Away3D as a Sprite via Swf.as. 
> > > There
> > > is a slight chance that by doing this (I still haven't tested it enough)
> > > Flash will resolve the arbitrary font definitions to its own terms and 
> > > hence
> > > produce more coherent material for the engine.
> >
> > > hth
> > > Li
> >
> >

Reply via email to