Square faces, BitmapMaterial error and Mouse Events

2 views
Skip to first unread message

DaveB

unread,
Jun 13, 2010, 10:08:50 AM6/13/10
to Away3D.dev
Hi all,

I am fairly new to the Away 3D engine and just 3D in flash in general.
I do, however, have a fair ammount of experience in making 3D models
outside of Flash.

I am working on a project in which URL's to thumbnails get put in an
array as a bitmapmaterial, and then placed on random faces of an
imported 3ds model exported from Blender. I managed to find out how a
few of these requirements can be met but also ended up having a fair
share of problems that may have to deal with either the limitations of
the engine that require a workaround, or just my n00bness when working
with it.

- The faces are supposed to be square-shaped on this project. Is there
a specific file format that allows these that can be imported into
away3d with square faces. I tried it with a 3ds but those were made
into triangles even when the initial model had only square faces. Does
the engine do this automatically? And if so, is there something that
could be done to get around it?

- I can get the faces of a geometry object (sphere) and give a
bitmapmaterial to every individual face. This, however, throws an
error when I try to do it on an imported mesh. It gives the error
1009, it is said that it occurs with square faces but this same error
gets thrown when I try it on a mesh that had nothing but triangular
faces. Also throwing a material on the object in Blender before
exporting proved inaffective. It has to do with the BitmapMaterial
class seeing as it does not throw an error if I use the
WireColorMaterial class instead to add material to a face >_<

- Also, how can you use the mouse event to click one face, but make
sure no other underlying faces are reacting to this same event as
well?

Any help on any of these points will be greatly appreciated. I really
tried to find a way out of the problems but to no avail.

~Dave

elguapoloco

unread,
Jun 13, 2010, 10:49:05 AM6/13/10
to Away3D.dev
Hi,

Away3D uses Triangles to render geometry. I recommend using Triangles
from the start in Blender to model your objects. On the fly tripple in
Away3D might not work as expected or at all. To test your models, but
also prepare them for Away3D use, look into using PreFab. This is a
gift from god ( aka Fabrice ) and allows you to preview and tweak your
models and even export AS3 classes.

For the sphere thing. I would probably use the Away3D primitive and
build the mosaic in a single bitmap assigned to a BitmapMaterial. You
can then extract the uv coordinates of the click (in the MouseEvent3D)
to determine which image was clicked.

ath.

Jerome.
Reply all
Reply to author
Forward
0 new messages