Any Example of quad output in Away3dLite?

15 views
Skip to first unread message

themightyatom

unread,
Dec 15, 2009, 5:00:35 PM12/15/09
to Away3D.dev
I read in another post that Lite supports quad output, but I don't
seem to be able to push the right button.
http://groups.google.com/group/away3d-dev/browse_thread/thread/c280e3842030b77f/608dc684d59cc67d?lnk=raot

Anyone know the secret?

Cheers,

PS

Henry Tseng

unread,
Dec 16, 2009, 9:57:25 AM12/16/09
to away3...@googlegroups.com
We're having trouble with z-sorting on our project too.  Does anyone know any solutions or work-arounds for getting geometry to layer correctly? 

Henry

Cauê Waneck

unread,
Dec 16, 2009, 10:32:54 AM12/16/09
to away3...@googlegroups.com
Hey, I don't understand if you want to know how to create quad faces, or if you're having trouble with z-sorting on them. Could you be a little more specific on the z-sorting issue?

About quads, you can take a look at the pimitives' 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 triangle, now you have to :

push the three indices values into _indices :
_indices.push(a, b, c);
then push the value 3 into _faceLengths to indicate this face has 3 indices:
_faceLengths.push(3);

if instead you want to create it 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!

Cheers
Cauê

2009/12/16 Henry Tseng <henr...@gmail.com>

Henry Tseng

unread,
Dec 16, 2009, 12:11:40 PM12/16/09
to away3...@googlegroups.com
We're loading an MD2 file and we're having trouble with planes that are too close to each other.  We're seeing flickering triangles using center, front, or back z-sorting. 

Henry Tseng

unread,
Dec 16, 2009, 12:13:49 PM12/16/09
to away3...@googlegroups.com
I'm also using Away3dLite. 

Cauê Waneck

unread,
Dec 16, 2009, 8:07:33 PM12/16/09
to away3...@googlegroups.com
Are the planes facing an opposite direction? If they are, setting bothSides = false should be enough.
Could you take a screen shot of what you're seeing?

Henry Tseng

unread,
Dec 17, 2009, 3:29:34 PM12/17/09
to away3...@googlegroups.com
Cauê,

Thanks for getting back to me so quickly:

http://clients.dreamlitestudios.com/pepsi/island_test/test-island.html

Henry

themightyatom

unread,
Dec 18, 2009, 3:38:39 AM12/18/09
to Away3D.dev
Thanks Caué

I was naively hoping there was a quad method that took regular
regtangular sides and automatically created quads (i.e an inteligent
wireframe material) as described here: http://samplerinfo.com/?p=10
I can definately use the descibed method, just need a bit of pre-
processing.

Cheers!

PS

On Dec 16, 4:32 pm, Cauê Waneck <wan...@gmail.com> wrote:
> Hey, I don't understand if you want to know how to create quad faces, or if
> you're having trouble with z-sorting on them. Could you be a little more
> specific on the z-sorting issue?
>
> About quads, you can take a look at the pimitives' 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 triangle, now you have to :
>
> push the three indices values into _indices :
> _indices.push(a, b, c);
> then push the value 3 into _faceLengths to indicate this face has 3 indices:
> _faceLengths.push(3);
>
> if instead you want to create it 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!
>
> Cheers
> Cauê
>

> 2009/12/16 Henry Tseng <henry...@gmail.com>


>
> > We're having trouble with z-sorting on our project too.  Does anyone know
> > any solutions or work-arounds for getting geometry to layer correctly?
>
> > Henry
>
> > On Tue, Dec 15, 2009 at 5:00 PM, themightyatom <pe...@stromberglarsen.dk>wrote:
>
> >> I read in another post that Lite supports quad output, but I don't
> >> seem to be able to push the right button.
>

> >>http://groups.google.com/group/away3d-dev/browse_thread/thread/c280e3...

katopz

unread,
Dec 18, 2009, 3:56:24 AM12/18/09
to away3...@googlegroups.com
wow, it's really close plane, i think you need layer to separated that, try see ExLayer.as for more

http://away3d.googlecode.com/svn/trunk/fp10/Examples/Away3DLite/as/src/ExLayer.as

or maybe canvas in branches if you feel brave ;)
http://away3d.googlecode.com/svn/branches/lite/src/ExCanvas.as

hth

2009/12/18 Henry Tseng <henr...@gmail.com>



--
katopz
http://www.sleepydesign.com

Alex Rico

unread,
Dec 18, 2009, 12:20:19 PM12/18/09
to away3...@googlegroups.com
I'm having this same problem and i think the ExLayer.as class will be useful to solve it but i couldn't see ExCanvas class becouse "canvas" property doesn't exist in Sphere class.

Thanks.

Alex


2009/12/18 katopz <kat...@gmail.com>

katopz

unread,
Dec 18, 2009, 12:41:08 PM12/18/09
to away3...@googlegroups.com
Hey Alex

plz try that in "branches" here http://away3d.googlecode.com/svn/branches/lite/
here's for sample for canvas http://away3d.googlecode.com/svn/branches/lite/bin/ExCanvas.swf

hth

2009/12/19 Alex Rico <misan...@gmail.com>



--
katopz
http://www.sleepydesign.com

Reply all
Reply to author
Forward
0 new messages