Couple of questions about <Collide>

  1. Seems that “Box” collide has bug. I attached simple egg file. If you look at the collision solid in pview (shift+c), then you can see that CS is shifted, but if you replace Box with another solid like Sphere or Tube, then CS will be in the expected position.

  2. Is there any way to control size and orientation of collision solid (Box, Sphere, Tube) in the egg file?
    untitled.egg.7z (625 Bytes)

  1. Can’t say, the box collision solid was added in the dev branch, don’t have one installed atm.

  2. I was thinking you could do it with a but when I tested it it looks like the transform is ignored (at least in pview) :open_mouth:

I thought to convert collisions parameters from Blender to the entries, but seems I can’t get quite control over the result

It sounds like a great idea to export Blender’s collision solids automatically in YABEE. :slight_smile: It’s a bit finicky to get the parameters right, as you noticed, since each solid has its own way of determining its shape based on the .egg geometry (for a box, it’s the bounding box of all the primitives under that group).

  1. Yes, smells like a bug. Might just be a bug in the viz code though. I’ll look into it.

  2. It’s basically an AABB, so it should be possible by changing the transform of either the parent group (not 100% sure). To tell if it works, though, I guess you need the visualisation to work properly. :slight_smile:

I’ve tried to export collision solids, but Blender calculate it by another way and to make the same form as in Blender I should get direct control over the collision solid parameters.
Panda include in CS all vertices, but Blender seems doing the next chain: firstly making AABB in model space and then, based on this AABB, making other collisions form, which not beyond of max dimension of those AABB. Also CS in Blender seems axis aligned, though in Panda, for example capsule tries to become minimal form around vertices independently from axis.

I don’t want to act as if I know anything, but are you sure you want to make it easy for your users to export collision solids (cs) that are in most of the cases wrong?

If you have a unit size box then Blender will (from what you say) make a collision sphere with a 0.5 unit radius and Panda would make the sphere radius (1*3^0.5)/2~=0.87.
In the first case you have the corners of the cube outside the cs in the other a lot of empty space inside the cs - both wrong if you wanted a collision with a box.

Wouldn’t it be better to export only explicit cs? Maybe Blender has some way to make custom shaped helpers/empties/dummies that could represent accurately panda collision solids? The if someone really wants a sphere collision for a box geom then he can have one.

There are a lot of topics here asking about textures on blender exported models, and if you give people the option to export auto-generated solids that don’t fit the models with one click then there will be 300 more topics :wink:

Anyway, I for one never needed to export anything other then polysets, and the few times I needed something else the egg format would be of no use (attach solids to animated bones).

Sorry if it’s no help and/or oftopic.

I am not added it in current YABEE, I just asked about possibility to get control over the collision solids in the EGG to be able to create it as closer as possible with the Blender’s native collisions. If it not possible, then I should not to integrate it.

Initially I planned to play with converting Bullet physics from Blender to Panda in my Blender4Panda project. When I looked at Bullet reference, then saw that it can use CS from the EGG and thought why not to use it.

So currently I trying to save all physics parameters, include collision forms in the own scene description file.

OK, fix pushed. The bug was that Panda wasn’t respecting the properly when assembling a box solid based on .egg geometry. The collision cube should now appear in the right position.