Hi!
I’m novice in flash 3d technologies, and I’ve have the problem which I can’t solve by myself.
I develop card game with away3d
At first time I tried to make cards with usual colored textures (sprites and shadows are OK), but edges of objects are awful (pic. 1).
Then I tried to set minimap property to true. Edges became better, but card image became blured (pic. 2).
Then i tried try to use two objects: first with minimap=true (for card’s backgrounds) and second with minimap=false (for card’s images).
To realize it I create this class:
public class Card3D extends ObjectContainer3D
private var _face:Mesh;
private var _faceBase:Mesh;
private var _back:Mesh;
private var _backBase:Mesh;
public function Card3D()
{
_face = getMesh(“cardFace_sq”, false);
_faceBase = getMesh(“cardFace_base”, true);
_back = getMesh(“cardBack”, false);
_backBase = getMesh(“cardBack_base”, true);
_back.rotationZ = 180;
_backBase.rotationZ = 180;
addChildren(_face, _faceBase, _back, _backBase);
}
private static function getMesh(value:String, minimap:Boolean):Mesh
{
var result:Mesh = new Mesh(new PlaneGeometry(96, 154, 20, 20), getMaterial(value, minimap));
result.castsShadows = true;
return result;
}
But there is strange effect here… When picture rendered, it ignore layout of objects in space and shows them as they added on scene (as usual DisplayObjects on usual scene!). On pic.3 u see that first card is above the second, but coordinates of second card
is closer to camera (as you see on picture 4 (side view)).
So, I have two questions about this expirience:
1) Are there any ways to improve textures quality without using two planes?
2) Why two planes have this strange effect (on pic. 3). Are there any ways to fix this behavior? Or maybe this using of ObjectContainter3D is incorrect?
Code samples and images are in attach.
I will be grateful for any help you can provide.