obj - AWPBvhTriangleMeshShape terrain problem

Software: Away3D 4.x

Luca, Sr. Member
Posted: 01 February 2013 07:55 PM   Total Posts: 230

Hi guys,

Someone can see and eventually correct this…
Here the source:

( the source contains two version of library incuded in the 7z file )

This is important for me… With version 4.1 i can load the right material or/and texture but the physics can’t work…

Thanks in advance smile


loth, Sr. Member
Posted: 04 February 2013 08:46 AM   Total Posts: 236   [ # 1 ]

yes probleme is on obj parser
export with no normal work better but not the good result
try to use different parser you can use prefab for that

you can use this instead of AWPRigidBody
var body : AWPCollisionObject = new AWPCollisionObject(shape, null);
_physics.addCollisionObject(body, 1, -1);



Luca, Sr. Member
Posted: 04 February 2013 09:27 AM   Total Posts: 230   [ # 2 ]

Thx for the response and nice to meet you loth, but use this type of collision object can cause Jitter or not ?

I have found this:
// Large convex mesh and raycast vehicle are not good friends. We had the same issue in the vehicle based game we
// are working on. The easy fix we did was to use btBvhTriangleMeshShape for all our fixed ground parts.
// However, we are still using kinematic rigid bodies for some moving parts, so we are still watching for the problem
// to arise, because we are not sure yet if we can use btBvhTriangleMeshShape for kinematic objects…
// Because the large size of the ground shape will make the convex cast algo used in wheel-cast unprecise, so you will
// see the wheel jitter, the easiest way to get rid of this is to use triangle mesh to represent a large size ground
// shape,for example use 100*100 triangle mesh to replace a large box shape ground object ,this will get rid of this problem

Yes i can try this method, but:
Vertex buffer ( DirectX manual say smile ) is type of FVF ( Flexible Buffer Format ) this means ( VERTEX COORD, UV COORD ) ecc…

But in this case, i speak about Away framework, i think this problem must be corrected.

Yes this can be a good trick wink but the problem remains…
So, i hope, this problem can be fixed in the FINAL release smile and anyway really thanks for the reply smile



loth, Sr. Member
Posted: 04 February 2013 09:43 AM   Total Posts: 236   [ # 3 ]

Hum i have to test on away3d 4.1
but you can use big mesh look

for this demo i use awd and AWPRigidBody

i’m on new version for last away


Image Attachments

Luca, Sr. Member
Posted: 04 February 2013 10:07 AM   Total Posts: 230   [ # 4 ]

I have see all your works VERY NICE MAN !
( i have this demo from GIT HUB smile )
I want to see the new version keep me informed ! wink

I have tested my little and very stupid smile code here ( multiplayer made whit SmartFox Server - max 5 players ):


and now i’m working on a new more serious version smile

i’m here https://www.facebook.com/luca.filippini.902



Léo Santana, Newbie
Posted: 14 July 2013 02:49 AM   Total Posts: 4   [ # 5 ]

Hi guys,

Please help me with this problem:

var mat:ColorMaterial = new ColorMaterial(0x4B871F);
mat.lightPicker = stateLight;
var mesh:Mesh = Mesh(ObjectContainer3D(e.target).getChildAt(0));
mesh.material = mat;
var shape:AWPBvhTriangleMeshShape = new AWPBvhTriangleMeshShape(mesh.geometry);
var body:AWPRigidBody = new AWPRigidBody(shape, mesh, 0);
body.scale = new Vector3D(40, 40, 40);



Image Attachments

Léo Santana, Newbie
Posted: 14 July 2013 03:44 AM   Total Posts: 4   [ # 6 ]

ok solved, I used: mesh.geometry.convertToSeparateBuffers();




Away3D Forum

Member Login