[away3dlite] lights / shaders / filters

10 views
Skip to first unread message

Stephen Hopkins

unread,
Dec 21, 2009, 7:29:03 PM12/21/09
to Away3D.dev
Are there plans to add lights, shaders and filters(mainly fog filter)
to the away3dlite?I am currently using away3d but would like to
migrate to away3dlite if it is faster.

Stephen Hopkins

unread,
Dec 22, 2009, 12:42:21 AM12/22/09
to Away3D.dev
One more question, but not really related. Are there any work around's
to not needing the CORRECT_Z_ORDER option. It seems like any mesh that
has concave features will have z sorting artifacts. Or how should you
model the geometry to avoid these artifacts?

Fabrice3D

unread,
Dec 22, 2009, 5:50:56 AM12/22/09
to away3...@googlegroups.com
Continuous modelling prevents 90% of these artefacts. If you spend extra attention to face areas at location where artefacts are occuring.
You can in most cases get rid of all artefacts and be able keep basic renderer.

This way of working is time consumming in the beginning but becomes a second nature very fast.
This is not only a solution for flash 3d. It's simply a good and clean way to model for any applications.

Fabrice

Rob Bateman

unread,
Dec 22, 2009, 8:17:07 AM12/22/09
to away3...@googlegroups.com
Hey Stephen

short answer - yes! But as with all things in lite, the implementation
will be a stripped down, simplified version

cheers

Rob

--
Rob Bateman
Flash Development & Consultancy

rob.b...@gmail.com
www.infiniteturtles.co.uk
www.away3d.com

Stephen Hopkins

unread,
Dec 22, 2009, 4:44:43 PM12/22/09
to Away3D.dev
oh ok cool. well back to the other question. Not sure what you mean by
continuous modeling. Does this have to do with edge flow? Never heard
of it before, didn't find it on google.

On Dec 22, 5:17 am, Rob Bateman <rob.bate...@gmail.com> wrote:
> Hey Stephen
>
> short answer - yes! But as with all things in lite, the implementation
> will be a stripped down, simplified version
>
> cheers
>
> Rob
>

> On Tuesday, December 22, 2009, Stephen Hopkins <rentakni...@gmail.com> wrote:
> > Are there plans to add lights, shaders and filters(mainly fog filter)
> > to the away3dlite?I am currently using away3d but would like to
> > migrate to away3dlite if it is faster.
>
> --
> Rob Bateman
> Flash Development & Consultancy
>

> rob.bate...@gmail.comwww.infiniteturtles.co.ukwww.away3d.com

Peter Kapelyan

unread,
Dec 22, 2009, 4:51:53 PM12/22/09
to away3...@googlegroups.com
Make sure no polygons intersect others, and vertices are shared among faces.

These are two major things to keep in mind to not only optimize models but also keep them clean looking for
away3d.

-Pete
--
___________________

Actionscript 3.0 Flash 3D Graphics Engine

HTTP://AWAY3D.COM

Stephen Hopkins

unread,
Dec 22, 2009, 5:17:42 PM12/22/09
to Away3D.dev
I think My model is continuous(one piece with extrusions), has no
intersecting faces. I would think that everyone would model like that
for a game or this kind of engine.

I found these tips http://worldfoundry.org/bin/view/WorldFoundry/DocumentationZSort

I'm guessing that the artifacts are there because my triangles aren't
all about the same size. Does the basic renderer use average-z-sorting
of each 3 vertices of a triangle?

HOW TO BUILD YOUR MODELS TO MINIMISE Z-SORTING ARTEFACTS

* Use convex models where possible (avoid concave models).

* Avoid overlapping faces and intersecting polygons.

* If you want to place one model on top of another, it's good
practice to cut out the overlaid portion that is not visible. For
example, if you place a house on top of a landscape, you could cut out
the rectangle at the bottom of the house.

* Avoid triangles that span the extent of the model. For example,
artefacts occur when you have extremes in the size of triangles that
are next to each other ( a long thin triangles surrounded by smaller
ones).

* Manipulate the sort keys for the primitives and the order
tables.

* Generally, the bigger the size of the order tables the better.

* Be aware of overflow of primitives, keeping in mind the extra
primitives accumulated by clipping.

On Dec 22, 1:51 pm, Peter Kapelyan <flashn...@gmail.com> wrote:
> Make sure no polygons intersect others, and vertices are shared among faces.
>
> These are two major things to keep in mind to not only optimize models but
> also keep them clean looking for
> away3d.
>
> -Pete
>

Fabrice3D

unread,
Dec 22, 2009, 5:39:28 PM12/22/09
to away3...@googlegroups.com
this means that each sides of a triangle\face is never broken by a vertex of a surrounding neighbourg face
when well executed, you will have shared coordinates only at the 3 vertexes of a face/triangle.

It might sound obvious and easy, yet only a very small amount of people do so. Because its time consuming and sometimes frustrating
because you often have to redo parts when you apply modifiers such as subdivisors or smoothers or when adding extra geometry.

Fabrice

Fabrice3D

unread,
Dec 22, 2009, 6:21:04 PM12/22/09
to away3...@googlegroups.com
yes these are true, but not continuous

> * If you want to place one model on top of another, it's good
> practice to cut out the overlaid portion that is not visible. For
> example, if you place a house on top of a landscape, you could cut out
> the rectangle at the bottom of the house.

the house should be like if part of the floor, then isolated. The walls vertexes of the house should fit the floor ones.

also other tips regarding sorting issues a bit less common.
try to work in size ranges of 1000/10000 to avoid roundings.
(That's why Prefab warns you when you load a model that is too small.)

Use the Grid class, and apply the grid to your model position and objectspace vertices.
(I hope add this one to Prefab soon). But in meanwhile its in geom package.

here a working file
http://www.closier.nl/playground/grid.swf
what you see here is a non aligned series of meshes on which you can apply a grid to the vertices.
of course, its a good idea to apply weld and render after its been modified. The resulting fx is depending on grid size, model size etc
That's why in this demo some settings completly ruin the model.
But If well applied it also contribute to solve some sorting issues.

Fabrice

Stephen Hopkins

unread,
Dec 22, 2009, 10:03:10 PM12/22/09
to Away3D.dev
hmm. Can't really visualize what you are saying. Is there anywhere I
can see examples of how a triangle is broken by a vertex? I could
upload my modelviewer swf if you guys want to see the thing i'm trying
to fix. Lets you see wireframe/shaded. I will upload it when my ftp
server goes back up. Thanks for all the help so far.

On Dec 22, 3:21 pm, Fabrice3D <fabric...@gmail.com> wrote:
> yes these are true, but not continuous
>
> > * If you want to place one model on top of another, it's good
> > practice to cut out the overlaid portion that is not visible. For
> > example, if you place a house on top of a landscape, you could cut out
> > the rectangle at the bottom of the house.
>
> the house should be like if part of the floor, then isolated. The walls vertexes of the house should fit the floor ones.
>
> also other tips regarding sorting issues a bit less common.
> try to work in size ranges of 1000/10000 to avoid roundings.
> (That's why Prefab warns you when you load a model that is too small.)
>
> Use the Grid class, and apply the grid to your model position and objectspace vertices.
> (I hope add this one to Prefab soon). But in meanwhile its in geom package.
>

> here a working filehttp://www.closier.nl/playground/grid.swf


> what you see here is a non aligned series of meshes on which you can apply a grid to the vertices.
> of course, its a good idea to apply weld and render after its been modified. The resulting fx is depending on grid size, model size etc
> That's why in this demo some settings completly ruin the model.
> But If well applied it also contribute to solve some sorting issues.
>
> Fabrice
>
> On Dec 22, 2009, at 11:17 PM, Stephen Hopkins wrote:
>
> > I think My model is continuous(one piece with extrusions), has no
> > intersecting faces. I would think that everyone would model like that
> > for a game or this kind of engine.
>

> > I found these tipshttp://worldfoundry.org/bin/view/WorldFoundry/DocumentationZSort

Fabrice3D

unread,
Dec 23, 2009, 4:00:10 AM12/23/09
to away3...@googlegroups.com
imagine two neighbourgs triangles sharing same side

tri 1 being abc, and tri 2 being bcd

Say in your editor you need to subdivide tri2 in 2
now you have 3 triangles, first is same, but triangle 2 and 3 have a shared vertex between b and c of the first triangle
this is no longer continuous. Now depending on angle, tri 2 and 3 will generate possible conflict with tri 1.

To respect the rule, keeping this split example, tri 2 should not split along side tri 1 and still share b&c.

Fabrice

Michael Iv

unread,
Dec 23, 2009, 4:27:45 AM12/23/09
to away3...@googlegroups.com
I would suggest you , if you are going to deal with a lot of models , to buy and read the following books concerning game low -poly modeling techniques :


3ds Max Modeling for Games: Insider's Guide to Game Character, Vehicle, and Environment Modeling

http://www.amazon.com/3ds-Max-Modeling-Games-Environment/dp/0240810619




3D Game Environments: Create Professional 3D Game Worlds

http://www.amazon.com/3D-Game-Environments-Create-Professional/dp/0240808959/ref=sr_1_10?ie=UTF8&s=books&qid=1261560319&sr=1-10


I own both of them and although I use them mostly for Unreal Engine Modding they are very essential for studying
proper way to model texture and optimize you models for games .
/////////////////////////////////////////
--
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Flash |Air |Games|OS|
Tel-0526237969
explo...@gmail.com
sup...@neurotech.co.il

Stephen Hopkins

unread,
Dec 23, 2009, 4:30:03 PM12/23/09
to Away3D.dev

Ok.. I uploaded my swf on image shack so you can see my model and the
z sorting issues. Use the mouse + click to rotate the camera, scroll
wheel zooms in and out. The radio buttons do what they say.


Stephen Hopkins

unread,
Dec 23, 2009, 4:32:03 PM12/23/09
to Away3D.dev
eh for some reason It won't let me post the swf link. Is there a
special way you are supposed to do this?

Peter Kapelyan

unread,
Dec 23, 2009, 4:36:22 PM12/23/09
to away3...@googlegroups.com
Maybe try a url shortener? It makes no sense why it shouldn't work.
As well, I can take a look, you can email me directly if you want.

-Peter

Stephen Hopkins

unread,
Dec 23, 2009, 5:02:13 PM12/23/09
to Away3D.dev
http://tinyurl.com/yd9wfy3

Use the mouse + click to rotate the camera, scroll
wheel zooms in and out. The radio buttons do what they say.

Peter Kapelyan

unread,
Dec 23, 2009, 5:16:57 PM12/23/09
to away3...@googlegroups.com
They look great!
 
I think your problems are from the fact that your material seems double sided. If your polygons (or material) was one sided you wouldn't see those glitches on the ship.

-Peter

Stephen Hopkins

unread,
Dec 23, 2009, 6:36:47 PM12/23/09
to Away3D.dev

Thanks

ah I thought it defaulted the doublesided to false, but it said "1" in
the dae file. Well I changed that and some of the artifacts were
removed, but it still has the sorting problem with the back part of
the ship which I think is because I use very long triangles for the
wings. I will try splitting the polygons there so they are more the
same size.

Stephen Hopkins

unread,
Dec 23, 2009, 7:56:13 PM12/23/09
to Away3D.dev
Ok I finally got it 100% artifact free I think. Had to add about 10
more polygons and split the quads along a different diagonal in the
back(including the mirrored ones) but then removed the edge going down
the middle so it is still roughly the same number of polygons.

Well now I know how the stuff has to be modeled. Thanks for the help
everyone.

Reply all
Reply to author
Forward
0 new messages