How to apply a texture inside a CylinderGeometry

Software: Away3D 4.x

dakota, Newbie
Posted: 07 September 2017 07:48 AM   Total Posts: 2

I am using the following code to apply a texture on a CylinderGeometry

_plane = new Mesh(new CylinderGeometry(10010020064,,falsefalse), new TextureMaterial(Cast.bitmapTexture(FloorDiffuse)));
_view.scene.addChild(_plane); 

This code is applying the texture on the outside of the cylinder. Is there any way I can apply the texture to the inside surface of the CylinderGeometry?

 

   

Avatar
Fabrice Closier, Administrator
Posted: 07 September 2017 05:26 PM   Total Posts: 1265   [ # 1 ]

material.bothSides = true; will set material in and out of the geometry

if you want only inside, you need to invert the faces winding
MeshHelper.inverseFaces(_myMesh);

   

dakota, Newbie
Posted: 07 September 2017 06:01 PM   Total Posts: 2   [ # 2 ]

Thanks for the solution.
Why is the image flipped if it is applied on the inside? It looks like I am viewing an image applied on the outside surface from a camera inside.

   

Avatar
Fabrice Closier, Administrator
Posted: 08 September 2017 10:04 AM   Total Posts: 1265   [ # 3 ]

Just like a glass window: if you write something on it on one side, viewed from the other side, the text will be inverted…

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X