ColorMaterial Bug: When alpha<1, Get Wrong Z Buffer

Software: Away3D 4.x

Concept Z, Sr. Member
Posted: 15 July 2011 08:00 AM   Total Posts: 124

_colorMaterial = new ColorMaterial(0xe5e4e2,.6);

DisplayObject3D get chaos Z order.

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Avatar
David Lenaerts, Administrator
Posted: 20 July 2011 02:52 PM   Total Posts: 80   [ # 1 ]

Can you provide a code example? My tests seem to be doing fine :s

 

   

Stephen Hopkins, Sr. Member
Posted: 20 July 2011 11:12 PM   Total Posts: 110   [ # 2 ]

Probably not be related unless there are similar bugs/typos, but I think the ColorTransformMethod is still using the wrong values.

https://github.com/away3d/away3d-core-broomstick/issues/69

You should post a picture of what’s going on.

 

 Signature 

http://www-scf.usc.edu/~shopkins

   

Concept Z, Sr. Member
Posted: 21 July 2011 02:47 AM   Total Posts: 124   [ # 3 ]

Hi, David Lenaerts, sorry for reply late .

there are some screen snapshots with wrong z buffer

 

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Concept Z, Sr. Member
Posted: 21 July 2011 02:48 AM   Total Posts: 124   [ # 4 ]

another picture , sorry , i can only upload one by one

 

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Concept Z, Sr. Member
Posted: 21 July 2011 02:50 AM   Total Posts: 124   [ # 5 ]

And this is the right z buffer with BitmapMaterial.

 

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Avatar
David Lenaerts, Administrator
Posted: 21 July 2011 09:28 AM   Total Posts: 80   [ # 6 ]

Forrest: Ah, that’s not actually the sorting that goes wrong, that’s an inherent problem due to the fact that when using (alpha) blending, you can’t write to the depth buffer for per pixel depth testing. As a result, alpha blended surfaces sometimes suffer from the same z-fighting problems as we used to have in software rendered Away3D 3.6 and older.

The best way to deal with it is merge all the geometries into a single geometry instead of using a Mesh per wall (which, judging by your screenshots, is what you’re doing). That approach is really inefficient, regardless of alpha blending, since it also implies:
a) a view matrix update for every wall
b) a draw call for every 12 polygons or so (very slow!)

Stephen: Ah yes, I’ll fix that asap smile

 

   

Concept Z, Sr. Member
Posted: 21 July 2011 10:02 AM   Total Posts: 124   [ # 7 ]

Really thanks for your soon replay ,David!

Yes, everyday i digged a little more into Away3d 4 for performance tunning…and really need for skills!

By the way , I want to drill a hole on the wall for the windows(and it’s not simple rectangle or regular polygon, in some case it’s curved shape ). In Maya or 3D Max, i can use a closed line shape to project on the wall and trim a hole for windows…

How to achieve such thing using Away3d 4? Would you please give me some tips ?

 

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Avatar
David Lenaerts, Administrator
Posted: 21 July 2011 10:07 AM   Total Posts: 80   [ # 8 ]

Forrest: I would create models in a 3D editor and load it wink Away3D is primarily a rendering engine, not a scene builder, and you always get better results when using proper tools (better looking, performing better, you have easier artistic control, etc). I know Fabrice is eager to work on more modeling utility code, but it’s not there for now.

 

   

Concept Z, Sr. Member
Posted: 21 July 2011 10:23 AM   Total Posts: 124   [ # 9 ]

Really fast reply! Yes, you’re right! Right tools for right things.

But, it’s a inner building path finder application, we use pre-defined point ,only point, to define everything(build the models,describe the way… )all the modules is build by point dynamically…So, we can’t use pre-modeled mesh that can made by 3d modeling software!

It’s really magic and enjoyable to build a building using points , but currently,it’s painful and enjoyable.

So,we desperately need 3d vector drawing tools!

 

 

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X