Blender soft body physics for Daz characters
Hi, I've been playing around with Blender soft body, and I think I've found a way to make parts of the mesh soft body. My method is using "proxy" parts, like I copy parts of the mesh ( breasts and butt ) and then make those soft body, and then use surface deform modifier on main mesh to project those soft body parts on main mesh. It works quite well, and I didn't notice any big problems, but has anybody else tried this method or has better ideas how to use soft body physics for Daz characters? That's kind of my holy grail in 3D, to have a soft body capable character for animation.
Unfortunately by forum rules, I think I can't add any screenshots because soft body areas I'm talking about are sensitive.... or is it allowed to show screenshot if I remove all the textures etc. and just show smooth shaded models?
Comments
You can use vertex groups/weight maps (same thing) to control which parts of the mesh are affected by a physics simulation and how much.
Yeah, that's true, but then you have to simulate the whole body mesh, which is pretty slow at least with my computer.... or at least I have to set whole mesh (including eyes etc. ) as a goal or mesh will "melt" down and eyes will fall down. When I use a proxy object, I only have to simulate that part instead of full body.
The Blender community has put some effort into this, for 'research purposes'. There are addons for it. Put 'Blender jiggle physics' into a search engine.
Setting the whole mesh (minus the softbody bits) as the "goal" is what I meant, yeah.
Honestly, I think the softbody system is meant for cubes of jello and the like. I'm not sure about using it for anatomical purposes, but I've seen videos of people using the cloth sim to make pillows a lot lately. That would probably be faster, since cloth is meant to have pieces of it excluded from simulation (where it's pinned to something else).
Haha, my experiments are for "research purposes" only of course But I think jiggle is a bit different animal than soft body. I mean, as I understand it, jiggle is like when character moves the jiggle parts move etc, but soft body reacts to collision objects also
I have to test that cloth method also. I assume it's also has some sort of proxy and surface deform combo.
@Mendoman Personally I find spring bones much easier for secondary animation. Then I agree you don't have collision features with them, but the actual soft body implementation doesn't seem that manageable to me for character animation. Plus there are issues preserving volumes. If you can elaborate your proxy technique it would be very interesting to me.
https://blender.stackexchange.com/questions/117463/soft-body-preserve-volume-when-deformed
https://developer.blender.org/D4471
Well, my soft body experiments worked pretty nicely for animation, but just like you said, I couldn't make it keep it's volume, so I think jiggle bones is much better alternative currently. That being said, I did some research for other options too, and this looks promising ( cloth simulation with air pressure )
https://dev-files.blender.org/file/data/mraysc2y6n4scc25f4c6/PHID-FILE-xia5qltdjbmfjzaiakie/recording.mp4
More discussion about this feature from https://developer.blender.org/T30941
But my proxy idea worked like this.
1) In edit mode of the character mesh, I select for example breast area, and then make a vertex group of that area.
2) Then I select that new vertex group, and make a copy of it to a different mesh.If I remember correctly, I think I increased it's size a little, so it's always on top of character mesh
3) Then to that new breast area mesh I set that softbody effect.
3) I kept all the original mesh vertex groups etc. in the new mesh, and added 2 new groups that contained all the vertices: goal and springs. Goal's vertex weight I set to 1 for outer areas and something like 0.97 to inner areas. For Springs I set outer edges to 0 and inner area to 1. I didn't really "paint" weights, I just used edit mode and set the weights there.
4) Soft body settings was like this, and playing with mass in soft body settings one could tweak the bouncing etc.
5) Finally I added surface deform modifier to character mesh, and chose that new breast mesh as target and and breastarea vertex group as vertex group, and finally bind it. I think there was some problems with subsurface modifier in the new mesh. I think I moved subsurface in the bottom or deleted it before I got bind to work.
Since that new mesh was a copy of the original character mesh, I didn't have to do any rigging etc. and that new soft body mesh moved nicely with character when posed and had collision effects. It's actually quite quick for animation ( I could just set blender animation to run and move collision items in real time ), since it was only that new mesh (proxy) that got animated, and not entire character mesh, but like I said, I couldn't get it to keep it's volume ( heh, well it's not even closed mesh ) so I think I'll later try one of those cloth simulations with air pressure. I was thinking that I could make a closed mesh like a ico sphere ( I think I read somewhere that triangles react better for animation since they don't slump in as easily ), and bind it to jiggle bone, and then set character mesh's surface deform to that closed ico sphere. I have no idea if that works, but when I have time I'll try that one next.
@Mendoman Thank you for sharing this. I believe the idea of using proxies is good for general performances. Also the idea of parenting a proxy to a spring bone sounds good to add collision effects. I find a little odd to use soft body with a surface, may be a soft body sphere used as mesh deform would work better.
Yeah, I find that, for the sort of thing you're trying to achieve, cloth is actually much easier to work with than softbodies. I would try the following:
1) Create a vertex group to pin the whole body, then selectively erase the parts that you want to jiggle.
2) Crank up the vertex mass to something like 10kg
3) Crank up the pressure. Start with 1000 or so, then work your way up.
On my system, cloth simulation is actually really fast (often almost realtime).
This is the youtube SFW version, they have NSFW versions on their twitter, by far the best simulation for this kind of thing I've seen with blender.
It is hard to follow a video entirely in japanese language but as far as I can understand they're basically introducing extra layers to the blender soft body to generate a inner volume. Same as explained at stackexcange. Then I understand that bouncing breasts may catch more attention than a mesh cylinder.
https://blender.stackexchange.com/questions/117463/soft-body-preserve-volume-when-deformed
Yes, and each layer is set to be less soft the smaller and more toward the centre of the sphere. Multiple people over the last years on youtube and twitter have said they will translate the video but I don't think its happened yet, any takers here on the forums that know Japanese? lol.
I actually played with cloth and pressure simulation a bit today, and it seems to work quite well. With enough pressure mesh keeps its volume quite nicely. In my test I set vertex mass to 400kg ( so that there's some bouncing when I move the mesh ), tension to 2000 ( so that mesh keeps it's form ) and pressure to 2000 ( to keep the volume ). I played around with other settings too, but those 3 seem to be the main components. For simulation I just created a vertex group to pin the back area at place. I had to set those simulation values really high, since with lower tension values mesh started to slump down and deform, and didn't keep it's form and higher pressure made it "balloon" and strected the mesh. With high tension I needed higher mass also. I'm sure there's some perfect settings, but these worked with this little experiment decently.
My mesh from front and back, and cloth sim settings
I quickly tested how it reacts to moving the mesh around, and there's bouncing and and it reacts to velocity. Sim seems to be really fast, just like Padone said. Here's some pics how gravity affects the mesh. Damping values influence how jiggly/soft the mesh is.
Next I tested a little with collision object, and that too seemed to work pretty well. Also mesh kept it's volume quite well.
Next I suppose I have to test if I can transfer this to Genesis figure. I think genesis figure needs to have real silicon boobs in DS, and then simulation in Blender sets them look more natural. I think my earlier mesh deform/proxy will work for this. Basically I was thinking that I I'll copy part of the original Genesis mesh, and then "close" it. Then set that to cloth and set mesh deform modifier to original genesis mesh to follow that new mesh. That way I get to keep drivers etc that genesis mesh has ( like move shoulder etc. changes the mesh ) and I can pinpoint the mesh deform to a vertex group that I want ( faster sim ). I don't have much more time today to play with this, but if somebody else wants to try it, this seems like a better solution than real soft body modifier in my opinion.
EDIT: Added a zip file as an attachment that contains the .blend file. I still use 2.9 beta ( too lazy to upgrade ) but I suppose normal 2.9 should be able to open it just fine. Just press play and it should be ready to test.
@Mendomen Please note that for simulations to work fine you need real size assets. If your goal is to simulate the human body and your grid size is at one meter as default, then your example is oversized and the simulation parameters will not apply to a real case scenario.
Real size assets are also needed when playing with lights and cameras for falloff and perspective, and even materials since some pbr attributes as sss may rely on proper measurements.
@Padone Good point, I'm sure real genesis figure will have totally different simulation parameters. This was just a test case to test if cloth simulation can handle "soft body" physics, and it was easier to test with a simple object what those parameters actually do. I still think that for genesis figure it's mainly about finding the correct mass/tension/pressure settings to make it look "real".
As reported in the youtube page, we can download an english guide on the author's site. Very well done I have to say. There's also a scene example that seems to work fine in blender 2.90. It plays real time for me on my ryzen pc.
https://ux.getuploader.com/nando/download/25
https://ux.getuploader.com/nando/download/37
Hmmm, that blender scene is quite interesting. Maybe something like that could be used for genesis characters too. I tried to study that html instruction but couldn't quite figure it out ( english is not my native language ). I assume they just select part of the mesh and scale/extrude it smaller and smaller, but how did they made those edges between different layers? Did they extruded first and then deleted faces...I don't really know. Well, anyways, good find.
Hah, actually looking that blender file I got another "great" idea What if we created a liquid sim inside genesis body? I haven't played with mantaflow for ages, but I think we could create a liquid container and fill it with liquid. It "should" keep it's volume and if mantaflow has gotten better over the years, it might be able to simulate small liquid sims quite fast.
@Padone wow I missed that, great find!
@Mendoman great work too!
Between you two, Thomas and his light speed work on the Diffeo plugin I wouldn't be surprised if this is a new commit by tomorrow :p haha