Hi Reinorvak,

Thanks for the info! The reason I am considering using quads for *certain*
pieces of geometry is that they end up being half the number of faces. For
example a primitive cube created with quads can have a minimum of 6 faces.
But away3Dlite's cube primitive automatically triangulates each face so that
there is a minimum of 12 faces.

In the specific case of away3Dlite and primitives, I *think* away3Dlite
really only does 3 things (although they are 3 incredibly useful things!):

1. Draws the faces in 2d with correct perspective to emulate 3d (using
Flash's built in 3d tools).
2. Figures out the uv data so that we can put bitmaps on the primitives.
3. Figures out what is in front of what with respect to the camera (z
sorting, culling).

If I am correct, I don't see any advantage to triangles in this specific
particular instance. In fact, drawing 12 faces instead of 6 should be
slower. Again, please correct me if I am wrong :) I am no expert.. just
trying to figure this all out.

Best,
Shawn



On Mon, May 17, 2010 at 8:28 AM, Reinorvak <[email protected]>wrote:

> Where as its true that triangles speed up the process for lighting and
> shading, there is a 2nd reason why most to all games use triangles,
> which I believe Away3D overlooks being a flash program. I'm not sure
> if Flash can render quads easier then triangles, but for the most part
> the triangle is selected because its the simplest amount of
> information to push over to the graphics card, and what most graphic
> cards are built to handle.
>
> At least for any game that involves a large amount of 3D objects, all
> models created should be triangulated. Also if  you want to obtain any
> curved surfaces you'd need triangles, I don't believe Quads can do
> this as effectively.
>
> Again, I don't know if flash compensates for the quads being in a
> different type of system, but for any game built entirely for 3D,
> triangles are the geometry you want.
>
> On May 16, 6:35 pm, Shawn <[email protected]> wrote:
> > I meant backface culling.. not light culling
> >
> > On May 16, 3:27 pm, Shawn <[email protected]> wrote:
> >
> > > It is my understanding that the main advantage of triangular faces, as
> > > opposed to quad faces, is that tri's ensure planarity  so that things
> > > like shading and lighting can be calculated properly (Please correct
> > > me if I am wrong). But since lite does not have shading or lighting,
> > > is there any speed advantage to using quads? Would I be screwing up
> > > other existing away3Dlite such as light culling and z-sorting?
> >
> > > Also, are quad faces still an option with lite? I read in this post:
> > > <http://groups.google.com/group/away3d-dev/msg/dc6ab0c9a98504d9> that
> > > quad faces could be created in Away3DLite by doing the following:
> >
> > >     "About quads, you can take a look at the primitives'
> > >     buildPrimitive() function. You just need to push
> > >     the 4 faces' indices into the _indices vector,
> > >     and then flag those values as a quad by pushing
> > >     into _faceLengths the value 4.
> >
> > >     e.g., if you want to create a face from a quad :
> >
> > >     push the four indices values into _indices :
> > >     _indices.push(a, b, c, d);
> >
> > >     then push the value 4 into _faceLengths
> > >     to flag it as a quad:
> > >     _faceLengths.push(4);
> >
> > >     don't forget you must call buildFaces()
> > >     afterwards to create the faces from
> > >     the data you've entered!"
> >
> > > But I can't figure out how to implement this technique in the
> > > primitives' buildPrimitive(). I am using the latest trunk revision,
> > > Revision 2520 of away3DLite.
> >
> > > Thanks in advance,
> > > Shawn
>



-- 
Shawn McInerney
MooseMouse Media, Inc.
http://moosemouse.com
[email protected]

Reply via email to