1. ## Mesh collisions

I want to use a physics library to stack some objects (3DS models) but I can't make them from primitives, this is how they look:

The objects will never have more than 16 vertices with 16 faces, so it's fairly simple geometry. I'm pretty familiar with ODE and I can't see a way this could be done. Would I be able to use Newton for this?

:cat:

2. ## Mesh collisions

Don't you think that ODE's trimesh could do that for you?
I haven't used ode or newton much though i must regret

3. ## Mesh collisions

Originally Posted by JSoftware
Don't you think that ODE's trimesh could do that for you?
I haven't used ode or newton much though i must regret
Well it needs to be trimesh to trimesh collisions and I'm not sure ODE supports that. I have to admit though it's been a while since I used it.

:roll:

4. ## Mesh collisions

You do have complex shapes there, but in ODE it's not a requirement to have one geomper body, in my app I have one body to handle physics and n number of geoms to define the shape, usually boxes from one of your shape you can define it out of 4 boxes (to make the square with the hollow middle).

OK it's not pixel perfect but it's fast enough got most applications.

5. ## Mesh collisions

Thanks

I've had a look at Newton and it seems that I can make a composite collision out of 4 convex hulls, so I've split each model into 4 parts and I'm going to give it a go. I'll let you know how it goes :wink:

6. ## Mesh collisions

Ok I'm loading 4 3DS model parts to make the compound collision. I'm using GLScene so I need to get the vertex data from TGLFreeforms

[pascal]
var CompoundCollision : PNewtonCollision;
Collisions: array[0..3] of PNewtonCollision;
Freeforms: array[0..3] of TGLFreeform;
.
.
.
.
.

Collisions[0] := NewtonCreateConvexHull(NewtonWorld,8,@Freeforms[0].MeshObjects.Items[0].Vertices,3*SizeOf(Single),nil);
Collisions[1] := NewtonCreateConvexHull(NewtonWorld,8,@Freeforms[1].MeshObjects.Items[0].Vertices,3*SizeOf(Single),nil);
Collisions[2] := NewtonCreateConvexHull(NewtonWorld,8,@Freeforms[2].MeshObjects.Items[0].Vertices,3*SizeOf(Single),nil);
Collisions[3] := NewtonCreateConvexHull(NewtonWorld,8,@Freeforms[3].MeshObjects.Items[0].Vertices,3*SizeOf(Single),nil);
end;
CompoundCollision := NewtonCreateCompoundCollision (NewtonWorld,4,@Collisions[0]);
[/pascal]

I'm getting an access violation in Newton.dll when the object collides with a box and I think the above code is causing it. Any GLScene/Newton experts with an answer? :lol:

7. ## Mesh collisions

yes this can be done with newton. you can use the collision system without using the dynamics

8. ## Mesh collisions

Sorry for bringing up this old topic.

I'm trying to use NewtonCreateConvexHull but I also getting an access violation in Newton.dll.

I can create a convex hull, it moves but when it hits anything it just gives an access violation.

Anyway I'm doing something wrong and need a bit of help.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•