Collision without collision solids??

Hello all…

Is there a way to use collision without collision solids??

for example…two egg files each have collision node could we use them without solid (sphere,tube,polygon,…etc) instead of creating another collision node then attach a solid to it??

Thanks in advance

I don’t know what you’re asking. A collision node always contains collision solids. Collision solids include CollisionPolygons, which are the most general kind; maybe you’re asking whether it’s possible to make a polygon-polygon intersection test? This is not possible in Panda’s collision system, but it may be possible with ODE or another system, for some performance cost.

Or maybe you’re asking whether it’s possible to make collision detection with ordinary geometry, which is to say, GeomNodes instead of CollisionNodes? This is answered in the manual, but I don’t think it’s what you’re asking.

David

I was asking about:

if I have a Ralph model and table model…now there is a collision between Ralph(From node) to table(Into node)
where the two models have CollisionNode (the procedure of { Polyset keep descend } )
Is there a way to consider Ralph mesh to be considered as a CollisionSolid so no need to use a CollisionSphere for example and attach it to Ralph to detect collision between them?

I wish this is obvious

Thanks for replying

“Polyset keep descend” makes a CollisionNode that contains CollisionPolygons only, not a CollisionSphere or any other kind of CollisionSolid.

So, you are asking whether it is possible to perform an intersection test between two meshes of CollisionPolygons. Or, in other words, you want to use a CollisionPolygon mesh as a “from” solid.

This is not possible with Panda3D’s collision system, as I said above.

But if your goal is to perform collisions without having to create a CollisionSphere in code, that is possible. You can create a CollisionSphere in your egg file, with something like " { Sphere keep descend }".

David

It is a good idea…It gave good results than I expected…but is there a way to do my idea by editing in the source code

So, now I’m really confused. You want to add the CollisionSphere in the source code, and not in the egg file? I thought that was what you wanted to avoid.

David

No,no…I mean to make the whole mesh (Ralph) to be as a CollisionSolid but as a new feature in panda3d if only I could find the library of the collision in panda3d folder

I hope I were clear
Thanks

Are you wanting to use the actual mesh of two models to collide with each other? I believe only ODE can do this, but even still you would absolutely NOT want to do this, it would be extremely slow to compute.
If you are suggesting adding a new feature to Panda that automatically adds a collision solid to a model without requesting one in the EGG file or your program code, what would you do in the case that you did NOT want a collision solid?

Yes I was thinking of making something like this…I was searching for the library of the collision solids in the folders of the program to see how the collision been detected then try to do the same with the mesh (Ralph) but I don’t know if this is a good idea or not
Thanks

Definately a bad idea.
Best thing is to use simple collision solids like spheres, capsules and planes. Second best, and already a lot slower, are octrees. Real hi-poly collisions are extremely computing intensive and in most cases will let your FPS drop below what you’d call interactive. Also, because of the nature of 3d models the physics collision would react unpredictable. Imagine you have a face on your model turned inside-out or some mostly transparent faces. Also you don’t really want all model parts to react the same: stone-solid, in most cases. (In ODE you can define joints, friction and the like.)

Just forget that collisions with hi-poly meshes are possible at all.

Have a nice day

The problem is that sphere solid parameters are x,y,z not x1,y1,z1,x2,y2,z2 so the three parameters will not give you the flexibility to adjust its dimensions to fit your mesh precisely

In collision tube or polygon you could do that but it doesn’t support the (from) collision

so I tried to find another solution that may be suitable but it seems not to be a good idea

BTW…If someone tried a 3d engine before could tell us how is the collision preformed

Thanks

ODE does!
See full list here: opende.sourceforge.net/wiki/inde … tection%29

Btw, I wouldn’t use Panda’s collision and physics system for such tasks. It’s more intended for area triggers or small “don’t run through walls” functionality. ODE is made for this sort of complex collisions and physics simulations.

I will read the article and try to solve my problem
Thanks