Creating a door: scale vertex group independently

Dear masters,

I would like to create a dynamic door that is able to resize but keep the height of the top and bottom bar, same for the width of the left and right bar.

What I have done so far (in Blender) is to create six vertex group (H_TOP, H_MID, H_BOT & L_LEFT, L_MID, L_RIGHT) and associate them with six bones in one or two armatures.

If I have two armatures (and consequently) two modifiers, I am be able to scale only H_MID (only z direction in blender) and L_MID (only y direction in blender) and get the expected result. The problem is that if I export the file to Babylon, there are two separated skeletons (two modifiers), but the door can have only one, and I can only H_MID or L_MID (depends on the order of the modifiers)

If I try to merge the two armatures into one (and consequently only on modifier) the weight seem to be normalised (even though they display 1,1,1,1) and the door gets distorted.

Thank you per advance,

Pinging @Vinc3r or @gryff who master Blender the most

Thank you @Deltakosh, the idea is to have a (dynamic) door.

I have done it in Blender because I know a it little and there is an exporter for Babylon but I can try to adapt to other program if necessary…

Nope blender is perfectly fine :wink: I let the experts chime in

I’m not use to animations, but maybe you can try shapkeys instead of armatures?

Here a very quick test:

By playing with animations it may be possible to activate only horizontal or vertical movement.

With armatures I can’t succeed to not deform my object in a wrong way.

.blend (2.8) & .glb (138.5 KB)

@Vinc3r exactly what I am looking for.

Actually I am trying to create a CAD-like (of course very basic) and without any animation. Do we have any performance penalty with animation or no at all? And how do I get the new bounding box of the animated object (it doesn’t seem to change)?

Thank you,

I suppose if you have a lot of elements animated, this could impact performances. But in your case if I well understand you just want to change an object value in a frame-time, so even if its impact framerate you just have to show a wainting screen.

About the bounding box I can"t help you too much 'cause I’m not sure how to “play” with them, but check & try by looking into the API: Mesh - Babylon.js Documentation (I think this refreshBoundingInfo(true) is what you want, if I’m refering to this closed issue)

1 Like

Perfect! Thank you for your time, @Vinc3r @Deltakosh. I found very welcomed as a beginner on the forum. Wish you all the best.