PDA

View Full Version : Instances with Bullet



Carlo_Jongen
02-03-2014, 01:07 AM
Hi,

Does anyone know if you can use Bullet with instances?
For example, I build a wall of cubes with instances and then I would like to brake the wall with a collision object in Bullet.
I tried it in Bullet but all the cubes behave the same way as if they are all parented to the main cube ( the one that is instanced ). They don't fall apart.
-
Is this even possible cause I can't seam to find how to do this?
-
I've tried to make an array of cubes in Modeler and then use parts in Bullet but Lightwave seams to get stuck because of the amount of cubes ( I need a lot of them ).That is why I thought instancing was the way to go. When I try a smaller amount it works fine but it needs to work with a lot of cubes.

Any suggestions, thanks...

Lewis
02-03-2014, 01:40 AM
nope, they don't work with bullet, actually they do work but as you noticed behave like instances so each one is repeating what main mesh is doing so you can't have brick wall of instances behave as would you expect.

Dodgy
02-03-2014, 04:18 AM
You could create low poly proxies, and on the proxy assign a weight map to a point/poly for the instances to attach to. Run the simulation on the proxy and bob's your uncle...

Carlo_Jongen
02-03-2014, 12:11 PM
Hi Dodgy,

Thanks for the tip. I've tried it and it partially works. So the instanced cubes follows the proxy but only in its position, not in it's rotation. I assume I'm doing something wrong here. With the Rotation tab ( Mode: Target item / Target item: Proxy ) I can't seem to align there rotation to the proxies.

Greets,
Carlo

Dodgy
02-03-2014, 06:37 PM
Try using Poly Mode, and set the rotation to Normals (Not Item) and that should be all you need. I think the instances shouldn't spin in poly mode, whereas they do seem to spin in point mode.

Carlo_Jongen
02-04-2014, 03:58 AM
Hi Dodgy,

I've got it working, this is what I did.

- I made a proxy object, just a square box. Gave the bottom polygon a weight map.
- Used the bullet simulation on the proxy with parts.
- I've instanced the High Res Cube to the proxy.
---> Type: Polygone with Max Polygons checked
---> Assigned the weight map
---> And in the Rotation Map for Alignment I've used Normals like you suggested.

At that point the High Res model sticked to the proxy part with the weight map, but it pointed outside towards the surface normal of the polygon. This resulted in the High Res Cube to follow the outside of the proxy instead of the inside. I then just flipped only the polygon of the proxy that has the weight map assigned. ( If you flip the full proxy model then the Bullet simulation doesn't work. ) After that the High Res Cube follows the position & rotation of the proxies. On top of that you can use all the benefits of the instancing.

If someone of Lightwave is reading this, it would be nice if instances would work straightaway with Bullet. Maybe a good LW12 tip.

Thanks again Dodgy for the tip, cheers…

Dodgy
02-05-2014, 07:12 PM
Oh, you should be able to use the Rotation value in the Instancer panel to swing the hi poly version around to inside the cube, say by setting the Pitch or Bank to 180, or doing the same to the high poly object (if the instances are set to World). Just don't do both instances and the original object as they'll cancel each other out :)