shteeve3d / blender-wiggle-2 Goto Github PK
View Code? Open in Web Editor NEWRewrite of blender-wiggle with new features and physics
License: GNU General Public License v3.0
Rewrite of blender-wiggle with new features and physics
License: GNU General Public License v3.0
Currently if i bake an animation, as a new NLA track and then delete it, the Wiggle addon refuses to do anything unless i undo, which i can't.
Therefore i request, please add a way so that i can force wiggle 2 to continue simulating
I've been playing around with wiggle bones for a bit and one thing I can't wrap my head around is how constraints behave with wiggle bones.
The armature on the left has a chain of copy rotation constraints linked to its parent, while the one on the right has the constraints baked into the same animation and behaves like I would expect. Even when stiffness is turned up too high for any visible effect the weird transforms still occur.
Blend file for good measure (4.1)
bendy_bone_constraints.zip
Hi, can you add a loop physics feature? When working for game animations, many times we've got to create cyclic animations, idle, walk, run and so It goes, having the physics reset everytime the loop restarts has proven quite troublesome in these situations. Instead we could have an option to carry the bone's info from the last frame (speed, position, rotation, etc) back onto the first frame so it remains cyclic.
Thanks in advance,
Arthur.
when i try to bake my wiggle physics, my animation without the wiggle baked "bakes" into the rig (basically the animation saves into the rig without any keyframes, not even deleting the action helps), i didnt have this issue before
Hello, is this addon ready to use in Blender 4.2?
Sometimes simulation just doesn't happen, keyframes get created when baking but both in viewport and after the bake there is no animation. Sometimes if I create a different rig and give it wiggle the previous skeleton will react and get simulated, but it's very random and most of the time it will stay stiff.
It feels similar to the fix introduced in 2.2.1, but I still can't get it to simulate some of the times after changing values.
had to extract to install.
Hi, I absolutely love this addon, especially the pre roll and collisions. It really makes life easier. The only thing that I noticed is that when I Bake Wiggle, the bones don't behave as they do in real time simulation. I've tried different with different quality settings and so far the only thing that seemed to somewhat fix the problem was to change the frame rate in the output panel before Baking Wiggle. (It seems that if I use 15fps in real time and 30 fps in baked it looks somewhat similar. but if I use 15 or 30 on both baked and real time the bones move a lot less in baked version.) Perhaps there are some simulation time settings that I have missed but so far i haven't found the solution yet.
I'm using Blender 3.2.2 and Wiggle 2.2.
The woman in the screenshot in moving left.
Tx again for the addon.
For the vast majority of my time using it, the Bake Wiggle option doesn't show up whenever I use the addon. There's some rare occasions where it pops up and i'm not sure what causes it to show up.
Hi, Currently using a rig for an online game and i am unsure why the volume bones do not get the physics.
In the previous version of the wiggle bones i used the volume bones ( butt bone / pelvis /pecs ) to create physics or the animation.
In this version once using the same method of applying the Add on to the volume bone. Nothing happens.
Any ideas?
edit: https://gyazo.com/96f63736fd107dfb222c028fc1838338 here is a short gif which shows the right pec whilst using the wiggle 2.0 not moving whilst the left pec moving with the previous version .
So i made a wiggle bones IK Rig, but i cant bake the wiggle since it will ruin the IK animations. Is there a way to render the realtime wiggle bones instead of baking them, or atleast a fix to my problem?
When I animate the last bone in a bone chain, although the shaking effect works normally, there is a strange display Bug where the display of this bone becomes smaller and smaller, other bones do not have this problem, only the last bone does this
When you enable collision and set it to an object with flipped normals from the solidifier modifier, the bones will immediately fly off to hug the mesh.
Is there any way to prevent this? This type of solidifier is often used for cel shading and it would be cool if theres a way to get collision with meshes that use it.
Example Video: https://imgur.com/a/VK4ELq1
The addon enables in blender 3.6.1 and works well, I had a few problems. Great addon!
The add-on crashes blender when rendering, after a frame or two, the render has no problem after I disable the add-on
Both 3.6 and 3.3 versions of blender have problems, and I’m about to cry-I tried wiggle1, and once I checked it, although there was a cloth simulation or hair simulation effect I wanted, the rendering still didn’t work. I tried wiggle2. As soon as I checked it, the hair and cloth were torn. No matter how I adjusted the parameters, I couldn’t achieve “one button” effect of hair simulation and cloth simulation.
Blender switches to a non-English version, and my plug-in will cause abnormal pulling …
1.Hair simulation, whether all the tips are checked or the head and tail are hooked, is a very small effect. I don’t know how to adjust the value next, and the changes and effects are very poor. I am going to cry. So is the skirt simulation.
2.Breast jitter, directly hooked up has no effect at all.
3.collision. The collided object must also make a low-resolution model before the plug-in can operate normally, right?
4.baking? : does wiggle2 have to be played every frame and baked to be effective, and it has no effect if it is frame optimized or rendered without baking? And plug-in bar, can’t set the frame step size like gesture-animation? Posture-animation baking, check the visual frame insertion, baking has no effect at all.
Tried both versions on Blender 3.1.0 and 3.6.2. Attempting to click the Bake Wiggle button gives the following:
`Python: Traceback (most recent call last):
File "[filepath]/wiggle_2.py", line 718, in execute
context.object.animation_data.action.name = 'WiggleAction'
AttributeError: 'NoneType' object has no attribute 'action'
location: :-1
`
First off: Forgive me, I'm a GH newbie..
I couldn't find the ZIP so I assumed I had to use the Code>Download ZIP to get the addon.
I tried importing into Blender and it seemed successful - only it doesn't show in the Addons list.
Did I do everything right and it just didn't want to load?
I'm using 3.4 currently.
I have an asset with some wiggle bones set up, but if i append it to another scene and enable the addon from the animation tab i find the settings already enabled on the bones i set up but the physics refuse to work
Bones sometimes stick to the target mesh when using a collection for collisions.
When I try to install the .zip in bLender 4.0.1, it says, that Wiggle 2 was successfully installed, but the Addon does not show up in the Addon list.
I am pretty sure it's an error.
When the sync mode on the viewport is 'frame drop', the behavior is shaking. It took me a while to find the cause. I can't reproduce it in a new project, but reproduce 100% in a working project with a complex rig.
Blender version: 4.0.2
I was having some serious framerate drops in the viewport from 60FPS to 5FPS in a very small scene with only a half dozen very low-poly colliding meshes and I eventually narrowed it down to using the "collection" type of collision. I went digging in the code for it, commenting things out until the performance drop stopped, and it's this code that's causing the issue:
Lines 474 to 486 in b95c560
It's specifically this line:
b.wiggle_collider_collection = bpy.data.collections.get(b.wiggle_collider_collection.name)
which, if I comment it out, the performance issues disappear, and the collision still works fine.
tbh I'm not sure what it's supposed to be doing. The only case in which this line is run is when b.wiggle_collider_collection
is not None
, and it re-sets it to - as far as I can tell - the same collection that it was already pointing to.
I have no idea why this is slowing things down so much but it doesn't seem to be doing anything useful, but I don't know the Blender API too well so maybe this is working around some issue that I'm unaware of...?
More generally this block of code is strange. The collision_col
property is never used outside of this code, and every case other than the first if
has no effect (they use bpy.data.collections/objects.get
but don't assign the result anywhere). It seems like this was added in this commit and was never changed afterwards. Temporary code that never got removed?
I'm currently doing some animation with NLA strips and multiple scenes using a single character rig. In the scene I created this character in, Wiggle 2 works just fine. In another scene I linked the character rig into, Wiggle 2 does not drive any bone movement. I have a pretty messy NLA timeline, but this directly shouldn't be the issue since it works just fine played back in the first scene.
Here's my blend file, if this helps: https://drive.google.com/file/d/1sRFMap6N9tiCPK6YEi5WY4V9E7esoDz3/view?usp=sharing
I'm using Blender 3.5.1.
I have a chain of wiggle bones, about 9 long, and for some reason when I add the damped track to the end, it seems to only affect the tip + the previous bone in the chain by a small amount, or the entire chain contorts in a rather weird way, while the end bone with the constraint on it stretches in a way to try to reach the target.
I've tried altering the gravity, weight, stiffness, dampening, as well as using an empty as the target or a bone in the same armature.
Having the end bone weigh more than the rest of the chain seemed to affect the chain in a positive way in regards to the damped tracking (still not working as intended), but would result in undesired movement when the influence was turned off (not in a bug way, just undesired).
The settings from Mass - Gravity, are 1.0 / 22.0 / 0 / 15 / 0.7
The end bone, has a stiffness of 222, and the bone before it, has 111.
When importing a model using a library override the bones in question will have buggy physics that seem to be "leftover" from the importing process. If you turn on wiggle physics in the scene with the buggy model, the two physics calculations will mix, and the end result will be a bone or bone chain with little physics action actually being visible
When a wiggle bone's Track To constraint is set to 0, the bone will still track along the non-up axis to the track object's starting position. It gets worse with bones, if you select a bone on the same armature as a tracking object, the wiggle bone scaling and rotation will be out of whack.
Hello, i have just downloaded your addon and it looks very complete and well designed. I am unfortunately facing a problem with the back spines of my model. The video is pretty self explanatory. How do i stop that weird bouncing effect i get when turning on gravity?
kinda a weird bug, running wiggle 2.2 (also happens in 2.2.1) on 3.4.1
when i watch in the viewport or do a viewport render animation it wiggles fine but when i use the actual render button the bones dont wiggle
i have tried C.scene.wiggle.is_rendering = False as well as C.scene.wiggle.is_rendering = True as well as setting both during render
i need to be able to render in render mode because viewport mode randomly decided it wanted to crash so i have to render from command line which doesnt support viewport mode (and also doesnt do physics, i checked)
Hi. When I make a simple Wiggle bone setup and Run the time line, and try to shake the armature with G(Move) and shake with mouse it flickers back to initial position. It works in 3.4 and is broken in 3.6 and 4.X
Not sure if the root of the issue is caused by the plugin. Yet I've noticed that after the baking of wiggle animations, all other last bones of the skeleton (the ends of each hierarchy, that aren't enabled for wiggle at all) are getting some jittering. Apparently, the jittering is caused by the appearance of some additional keyframes on the same frames that the original frames: https://drive.google.com/file/d/1D43ARMAitOgXYQhZpuvbWzkU6anavX9U/view?usp=sharing
By the link, you can see the X rotation of the leg after the wiggle baking. It had some animation baked on it before. Then I baked a physics for a ponytail (the part of the skeleton, that isn't related to this bone at all). This particular bone wasn't selected and didn't have wiggle enabled. Yet it was affected by the baking process.
Also, wiggled bones are baked nice and clean, but baking "destroyed" many other bones in the skeleton. I wonder if it is possible to bake selected bones only? (basically, select all wiggle-enabled bones and bake selected instead of baking all).
Blender version: 4.0.2
I'm making some wiggly cartoony antennae and I want the bompers on the end to collide with each other.
It seems like the collision implementation doesn't take other bones' wiggles into account, so the bompers collide with a "ghost" of the other mesh, which is where it would be if it weren't wiggling. I added a debug print after this line:
print(b.name + " colliding with " + co.name)
and it prints this to the system console:
Antenna.R.002 colliding with Bomper.L
Antenna.R.002 colliding with Bomper.L
Antenna.R.002 colliding with Bomper.L
Antenna.L.002 colliding with Bomper.R
Antenna.L.002 colliding with Bomper.R
Antenna.L.002 colliding with Bomper.R
Antenna.L.002 colliding with Bomper.R
Antenna.L.002 colliding with Bomper.R
Antenna.L.002 colliding with Bomper.R
Antenna.L.002 colliding with Bomper.R
Antenna.L.002 colliding with Bomper.R
so they really are colliding with the meshes.
I'm not new to programming but new to the blender API so I'm unsure if this is an issue of unpredictable physics update ordering or if this is a shortcoming of the addon code.
Small blend file demonstrating the issue: https://blendswap.com/blend/31356
also I know you're deep in production right now but I also wanted to thank you for making such a great addon!
For the last few days I have been dealing with a lot of weird crashes and bugs at the end of a render that I couldn't pinpoint until I removed this addon. I don't know if its incompatible with hair particles but at first when I had used a larger tile set the render would crash at the end of the first frame, lowering it would result in a crash at the end of the 2nd frame and now completely removing the addon results in no crashes.
This was the error I was getting
Error : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF7753EA16F
Module : blender.exe
Thread : 00000674
Some kind of memory issue. Happened with CPU and GPU rendering.
Bones don't collide with collision objects, but pass through them in a single frame
I've been trying to fix this for awhile, but I honestly have no clue what's causing it. The left hair keeps freaking out when enabled, but if i enable the other hair, its fine. Any clue why this is happening?
Using Blender 3.5.1
I saw the same issue already created but the text has been deleted or something.
When I try to install the addon no error happens, but the addon doesnt show up in the list and is not activated.
I have installed and enable the add-on on Blender 3.5. Even though it's enabled, the option to enable wiggle bones doesn't show up in the scene, armature or bone menu. I don't know if this is or isn't supposed to work with 3.5.
After baking bone physics to an action, is it possible to restore the Wiggle settings used for a bone?
On Blender 3.6, I've baked physics for some bones then re-enabled Wiggle on the scene. The bones no longer have the settings I've set before the bake.
Hello there!
I have a character rig wherein everything works perfectly fine with the viewport preview, but when baking the wiggle, a handful of bone chains don't actually have their wiggle baked.
-They have the keyframes created, but it's all just the static positions.
-Oddly enough, the problem bone chains all belong to the same character element- that being the braids
-Said bone chains have the same settings at the coat, which is baking correctly
-Muting all other bones and baking has the same result
-Removing wiggle from all other bones and baking has the same result
-I had an issue before with the ears not wiggling properly due to forgotten Constraints, but it also affected the viewport preview
-The braid bones have no Constraints or other features
-No errors appear in the console, as far as I can tell
Hi, developer! I wanna to make a pose that the bone copy rotation from my control bone first. Then behave the physics effect as wiggle bone addon does.
test_rotate_constriants_mixmode.blend.zip
Just delete .zip
and open it.
I have 2 Armature:
C
saves many control bones, like the rigify armature
phy.001
: proxy physics bone, just saves physics bones, just to make physics effect.
the code below just to make the rotation of each bones from phy.001
linked to the C
's bones' rotation. But in the drivers, I need to use self
key formula: (self.rotation_quaternion.xyz+Transform)/2
, the var Transform
is from C
key point 2: rotation_quaternion.w.expression = "Transform"
You can check the .blend file to test it!
import bpy
#original idea by Nolca
#parameter list
isQuaternion=True
isDelDriver=False
# delete all drivers on physics Bone
act_obj_name='phy.001'
src_obj_name='C'
act=bpy.data.objects[act_obj_name].pose.bones
src_obj=bpy.data.objects[src_obj_name]
root_world_bonename='Bone'
# I want to make the root bone rotate and follow my Control armature in object mode
#act=bpy.context.selected_pose_bones_from_active_object
src=src_obj.pose.bones
mode_str='quaternion' if isQuaternion else 'euler'
rot_str='QUATERNION' if isQuaternion else 'XYZ'
# QUATERNION XYZ AXIS_ANGLE
axis='xyzw'
for bone in src:
bone.rotation_mode=rot_str
for abone in act:
abone.rotation_mode=rot_str
# QUATERNION XYZ AXIS_ANGLE
abone.driver_remove('rotation_'+mode_str)
if isDelDriver:
continue
len=4 if isQuaternion else 3
dri = [abone.driver_add('rotation_'+mode_str, i) for i in range(len)]
i=3 if isQuaternion else 0
for dr_ in dri:
dr=dr_.driver
try:
transf=dr.variables['Transform']
except:
transf = dr.variables.new()
transf.name = 'Transform'
transf.type = 'TRANSFORMS'
target = transf.targets[0]
target.id=src_obj
target.rotation_mode=rot_str.upper()
target.bone_target = abone.name
target.transform_type = 'ROT_'+axis[i].upper()
target.transform_space='LOCAL_SPACE'
if abone.name==root_world_bonename:
target.transform_space='WORLD_SPACE'
# WORLD_SPACE LOCAL_SPACE TRANSFORM_SPACE
dr.use_self=True
if (i!=(3 if isQuaternion else 1)):
dr.expression = "(self.rotation_"+mode_str+'.'+axis[i]+"+Transform)/2"
else:
dr.expression = "Transform"
# dr.expression = "copysign(1,Transform)*max(abs(Transform),0.1)"
# It's hard to solve the sign change while crossing the axis, which cause the bone position suddenly changes
i=(i+1)%4
# https://docs.blender.org/api/3.5/bpy.types.DriverTarget.html#bpy.types.DriverTarget.transform_space
I'm looking forward that you can refer to it, or directly incorporate the code into the project, or consider adding similar functions in the future. :)
You can also check my blog, I've tried many different approaches: https://www.cnblogs.com/nolca/p/17473214.html
(I'm sorry but it's not written in English, and it's a bit messy)
Would be a neat option to implement, now I have to reclutter my outliner into using a single collection for all my meshes in the meantime.
I setup the Stiff value but when I change it keeps going back to the original value.
Feature request:
1 Add the collision volume of the bone like vrm physics and self-collision between bones.
2 Support adding multiple colliders or collision collections
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.