TextureMaterial on a double sided plane bad input size error

Software: Away3D 4.x

frank_, Newbie
Posted: 26 July 2012 06:17 PM   Total Posts: 12

I’m trying to render text in 3D space by creating bitmap textures from external MovieClips. I’m creating a mesh out of these textures using a plane.

Using this bit of code everything seems to work

var text:IBitmapDrawable = new ExtAssets.TextMesh() as IBitmapDrawable;
var 
bmd:BitmapData = new BitmapData(128128true0x000000);
bmd.draw(textnullnullnullnulltrue);
var 
bmt:BitmapTexture = new BitmapTexture(bmd);
    
var 
textMat:TextureMaterial = new TextureMaterial(bmt);
    
    
var 
pTest:PlaneGeometry = new PlaneGeometry(128128);
   
var 
mTest:Mesh = new Mesh(pTesttextMat); 

I’m trying to use this texture on both sides of my plane but I get an error when I set

pTest.doubleSided true

Main Thread (Suspended: RangeError: Error #3669: Bad input size.)

 

   

Richard Olsson, Administrator
Posted: 27 July 2012 09:03 AM   Total Posts: 1192   [ # 1 ]

This seems to be a bug in the UV generation code. Can you please confirm this by pasting the entire call stack (and not just the error message)?

If I’m right, you won’t be able to get this to work until we fix the bug. Can you file a bug report for us at GitHub? The issue tracker is here: http://github.com/away3d/away3d-core-fp11/issues

In the meantime, you can work around the issue in one of two ways. Depending on what kind of UV mapping you want on the “back side” of the plane, it might be enough if you just set the material bothSides property to true.

Otherwise, you will have to create two planes and rotate one 180 degrees. Add one of the plane meshes to the other as a child, and then they will stick together as long as you move the parent one around.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X