Plane and multiple materials

Software: Away3D 4.x

diabolhot, Newbie
Posted: 26 June 2012 01:11 PM   Total Posts: 2

Hy,

I don’t understand how i can show two different materials for a plane (one for the back, one for the front) with Away3D 4.0. :(

Could you help me?? smile

   

Avatar
Matse, Sr. Member
Posted: 26 June 2012 07:07 PM   Total Posts: 149   [ # 1 ]

Hi,

You can’t, because a plane is only 2 faces (2 triangles) : each face can only have one material (in fact a mesh or submesh can only have one material, for each different material in a mesh there is a submesh, sorry if I’m unclear)

Your plane is probably 2-sided but that’s still the same faces (same submesh, same mesh, same material).

A simple solution would be to create 2 planes, one for each side : each can have a different material, and just add them to an ObjectContainer3D to manipulate those 2 planes as a single object.

There are plenty of other solutions : you could create dedicated mesh in 3DSmax / Maya / Blender / whatever or use a box primitive instead for example.

   

diabolhot, Newbie
Posted: 27 June 2012 08:38 AM   Total Posts: 2   [ # 2 ]

It seems to me that Away3D 3.0 does it.

I saw some examples like this:

var frontMaterial:BitmapMaterial = new BitmapMaterial(Cast.bitmap(“front.jpg”);
var backMaterial:BitmapMaterial = new BitmapMaterial(Cast.bitmap(“back.jpg”);

var plane:Plane = new Plane({width:200, height:200, material:frontMaterial, back:backMaterial, bothsides:true});

   

Avatar
Matse, Sr. Member
Posted: 27 June 2012 08:47 AM   Total Posts: 149   [ # 3 ]

Away3D 3.X relies on Flash’s display list, Away3D 4.X doesn’t (it relies on Stage3D). There are most probably a lot of things you can do in 3.X that you can’t do the same way in 4.X.
You shouldn’t expect 4.X to work the same as 3.X as, while the API looks similar I think, they are in fact 2 very, very different beasts wink

   

bmanderscheid, Newbie
Posted: 12 December 2012 08:23 PM   Total Posts: 8   [ # 4 ]
Matse - 26 June 2012 07:07 PM

Hi,

A simple solution would be to create 2 planes, one for each side : each can have a different material, and just add them to an ObjectContainer3D to manipulate those 2 planes as a single object.

Could you show an example of this please?
Thanks!

   

bmanderscheid, Newbie
Posted: 12 December 2012 08:24 PM   Total Posts: 8   [ # 5 ]
Matse - 26 June 2012 07:07 PM

A simple solution would be to create 2 planes, one for each side : each can have a different material, and just add them to an ObjectContainer3D to manipulate those 2 planes as a single object.

 

Could you show an example of this please?
Thanks!

   

bmanderscheid, Newbie
Posted: 12 December 2012 08:24 PM   Total Posts: 8   [ # 6 ]

“A simple solution would be to create 2 planes, one for each side : each can have a different material, and just add them to an ObjectContainer3D to manipulate those 2 planes as a single object.”


Could you show an example of this please?
Thanks!

   

bmanderscheid, Newbie
Posted: 12 December 2012 08:26 PM   Total Posts: 8   [ # 7 ]

It kept telling me that there was an error.  SOrry for the multiple posts!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X