Home › Forums › General Questions › Animate Cable in real time
- This topic has 5 replies, 3 voices, and was last updated 1 year, 10 months ago by kdv.
-
AuthorPosts
-
2023-02-02 at 8:55 am #60104David DuperronCustomer
Hi,
I have a scene where the user can manipulate a crane (very similar to the industrial robot V3D example that I started from), but with something more: I need to “animate” the crane hook, and its cable to make it “stick” to the crane tip.
In Blender this is feasible by creating a curve with two hooks that are attached on the crane tip for one and on the hook for the other, and by adding some constraints to the hook (like being always at the vertical of the crane tip).
However, I cannot find the way to export or recreate this behaviour in real time, with the puzzles and supported Blender features.
I found a plugin here () but this creates a 3D line, not exactly what I was looking for (I would prefer to stretch a textured cylinder between two empties for example)
Any help would be appreciated!2023-02-02 at 11:04 am #60108Yuri KovelenovStaffHi David,
Such kind of animation requires inverse-kinematics, which is supported by the engine but unfortunately requires coding. So at the moment, this is limited to baked animation only
2023-02-02 at 2:30 pm #60110David DuperronCustomerOk thank you for your answer! I’ll find another way to represent what I need in that case…
When you say “requires coding”… what does it mean exactly? is it a big amount of coding? where? in the puzzle editor??
Thanks againDavid
2023-02-03 at 7:13 am #60118Yuri KovelenovStaffYou can check out the source code of the example linked above. It uses CCDIKSolver under the hood (this page contains an example which is very similar to what you want to achieve). In case you need help, feel free to create a post on the Jobs forum.
2023-02-03 at 12:49 pm #60121David DuperronCustomerHi Yuri!
Thanks for the answer. Indeed this seems to answer perfectly my needs… however, the html source is not present in the repository (here: https://github.com/Soft8Soft/verge3d-code-examples). Has the file been removed? I found some workarounds in the meantime, which involve vertical scaling of a simple cylinder, to match the required length.
But now I am struggling with the constraints (for some reason they do not work the same way within Blender and in the exported GLTF… are there some kind of limitations or cavehats with the constraints in V3D puzzles?
ThanksDavid
2023-02-03 at 1:50 pm #60123kdvParticipantDepends on what constraints you are trying to use. Show you animation in Blender
the html source is not present in the repository
take the one from three.js. they are the same
https://github.com/mrdoob/three.js/blob/master/examples/webgl_animation_skinning_ik.htmlPuzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
-
AuthorPosts
- You must be logged in to reply to this topic.