Drawing a beveled Cube

Software: Away3D 3.x

Hikkyu, Newbie
Posted: 25 January 2015 02:08 PM   Total Posts: 11

Hello smile

I wish I create a beveled cube with clickable automatically rotating faces.

I tried to create a cube with BitmapData for each side but the result was horrible and rotation crashed :(

I would like to know what’s the better way to draw something like this, i’he tried to add bevel filter to the cube but it wasn’t the result expected, and roundedCube to :/

Thank you in advance for your answers smile

(sorry for my bad english, i’m a french student and i realy try to work as well i can)

   

Hikkyu, Newbie
Posted: 10 February 2015 11:48 PM   Total Posts: 11   [ # 1 ]

Hi everyone smile

I finally draw my beveled cube but i have a problem (again) and i hope some one can help me this time :

On a beveled cube, there are triangles instead of corners. I used RegularPolygonGeometry to draw them.

My problem : when one of the principal face is in front of the camera, the triangles disapeared.

How can i fix this problem?

THank you for reading my post smile

 

File Attachments
Cube.swf  (File Size: 232KB - Downloads: 190)
   

Avatar
Fabrice Closier, Administrator
Posted: 11 February 2015 10:33 AM   Total Posts: 1265   [ # 2 ]

Just looked and I have no clue about what exactly the/your problem is…
Do you mean that the triangles at corners become so thin because of their angle with cam that they desapear?? Or do you mean there should be triangles at corners of the main cube to close the shape?

Expliques en francais si tu veux…

 

   

O_MEGA, Newbie
Posted: 11 February 2015 11:50 AM   Total Posts: 26   [ # 3 ]

Could U please post your code here ?

 

   

Hikkyu, Newbie
Posted: 11 February 2015 06:58 PM   Total Posts: 11   [ # 4 ]

Hi smile

here, an example for a triangle (my post is too long, i can’t show you everything ) :

/*** triangles top ***/
 
texture = new TextureMaterial(Cast.bitmapTexture(Ttriangle)); 
 
texture.bothSides true;
 var 
poly:RegularPolygonGeometry = new RegularPolygonGeometry((size_sub_faces*0.867)/1.40,3);
 
//var poly:RegularPolygonGeometry = new RegularPolygonGeometry((69.820685)/1.40,3);
 
var triangle1:Mesh = new Mesh (polytexture);
 
triangle1.x=340;//
 
triangle1.y=340;//
 
triangle1.z=-340;//
 
triangle1.rotationX=90;
 
triangle1.rotationY=125;
 
triangle1.rotationZ=45

FR :
Pour le problème, si l’on regarde mon cube et celui de l’exemple (dans mon premier message) on remarque que les triangles disparaissent lorsque l’on clic sur l’une des faces, alors qu’ils devraient encore être visible. Je ne sait absolument pas comment règler ce soucis :/

Le code complet concernant la modélisation est join à ce message

EN :
For the problem, if you look at my cube and the example (in my first post) we note that triangles disappear when you click on one of the sides, while they should still be visible. I absolutely do not know how set this worries :/ The complete code for modelling is join to this message


Thank you for you’re response, and i really hope that some one can help me

(and one more time, sorry for my bad english, i write as well i can)

 

File Attachments
Cube.as  (File Size: 13KB - Downloads: 257)
   

Avatar
Fabrice Closier, Administrator
Posted: 11 February 2015 09:01 PM   Total Posts: 1265   [ # 5 ]

Doit etre mon grand age… je vois pas de triangles disparaitre! Qu’ils deviennent si plats qu’ils ont tendance a devenir optiquement comme une ligne suivant l’angle d’observation ok, mais ca vient de leur epaisseur inexistante. Sur mon ecran rien ne disparait en tout cas. Fais un screenshot avec une fleche pour pointer le probleme…

 

   

Hikkyu, Newbie
Posted: 11 February 2015 10:59 PM   Total Posts: 11   [ # 6 ]

FR :
Tu viens justement de voir le problème, normalement, les triangles devraient être encore visible, je ne sais pas comment palier à ce problème d’épaisseur.

Je les ai sorti de la figure pour pouvoir mieux distinguer le problème mais même correctement disposés, on ne les distingue plus lorsque l’on clique sur l’une des faces alors que l’on devrait encore les voir (cf l’exemple)

Même de faces, les coins biseautés d’un cube sont visibles, ce qui n’est pas le cas du miens u_u

EN :
You just come to see the problem, normally, the triangles should still be visible, I do not know how overcome this problem of thickness.

I pulled them from the figure in order to better distinguish the problem but even properly arranged, we do most distinguishes them when you click on one of the faces while we should still see them (see the example)

Even faces, corners beveled in a cube are visible, mine does not u_u

 

   

Hikkyu, Newbie
Posted: 12 February 2015 07:29 PM   Total Posts: 11   [ # 7 ]

here, an example of the result expected : example beveled cube

If you clic on a cube faces, you can easly (i hope) see my problem if you compare my animation and the link’s picture ^^

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X