GSoC 2020: Soft Body Sim - Discussion and Suggestions

There is already some adaptive subdivision going on. The voxels are subdivided up to a user specified amount (lattice resolution variable), but only if they contain surface faces. The problem here is that no matter how many times we subdivide, the ear will be at the corner of a voxel :frowning:. Subdividing the tets and not the octree cells might yield better results.

The key to resolving these problems is a different embedding strategy, or perhaps allow the user to edit it directly.

2 Likes

Hello, I get this error when I try to build with MSVC2019:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include\type_traits(1110,1): error C2338: You’ve instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the member “type” would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary compatibility (only for uses of aligned_storage with extended alignments). Please define either (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alignment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior. [F:\blender\soc-2020-soft-body\intern\softbody\bf_intern_admmpd.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include\type_traits(1110,1): error C2338: You’ve instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the member “type” would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary compatibility (only for uses of aligned_storage with extended alignments). Please define either (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alignment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior. (ソース ファイルをコンパイルしています F:\blender\blender\extern\softbody\src\admmpd_bvh.cpp) [F:\blender\soc-2020-soft-body\extern\softbody\extern_admmpd.vcxproj]

What happens if you try to build a previous commit (before I merged from master)? E.g. 0b18b204dde020480e5ebde385d6a14186977b0f

Unfortunately buildbot is not live (https://builder.blender.org/admin/#/builders/20) so I can’t even debug this.

I’m not sure if you really want to build it yourself. If your intention is to simply test the branch, here this is a build from 2020-08-25:
https://blender.community/c/graphicall/spbbbc/

Edit:
New link, you search here for soc-2020 soft body branch:

I’ve noticed that loading time of first frame takes longer than other frames in large (and even baked) scene.
Is precomputation done at first frame instead of at hitting bake button?

Yes, there is precomputation being done on frame=1, but this is almost entirely volumetric mesh creation (creating the lattice/tetmesh), and not solver precomputation, which is actually quite fast.

Hey! This looks awesome!

Is this coming to Blender anytime soon? I’d like to test it out, but the download links are dead. I guess the only way is to build from source?

1 Like

You search here for soc-2020 soft body branch:

1 Like

Thanks :slight_smile:
But no, the soft body sim isn’t going to be merged to master as-is. The final report goes into more detail: User:Mattoverby/GSoC2020/mattoverby final report - Blender Developer Wiki

Right now, the interface needs improvement - particularly in creating the volumetric meshes from an input surface mesh.

6 Likes

Hi, all!
@mattoverby I’m wondering here if you are considering continuing this project for the GSOC this year…

5 Likes

Unfortunately I don’t think I will be doing GSOC again (though I did enjoy it). However, if somewhere else were to pick up where I left off (the interface) I would be more than happy to assist.

5 Likes

Hello, I am interested in 2021 GSOC about improving soft body simulation. I quickly read what you made last year. I understand you implement several new solvers for soft-body simulation. I would know what is reusable/doable or not. I haven’t sent apply yet, I would like some advice to make a coherent proposal. There is what I think I to propose :
-Making parameter depending on volume of the object and not the mesh to obtain same simulation when adding a subdivision
-Visualize parameter on vertex like mass, constraint, force
-Visualize intern spring created by bending option and being able to change them or redo this option.
-Improve pin system which isn’t enough user-friendly
-Add hyperelasticity or some cheating way to obtain this

12 Likes

Yes pretty please guys :slight_smile: , hopefully it will make it’s way to master this time and avoid being rejected again.

1 Like

Sure I’m happy to provide some feedback. The main limitation of the current branch is that the user interface needs improvement, specifically setting up simulations with multiple interacting meshes. This is because Blender doesn’t have the mesh type used by soft body solvers: tetrahedral meshes. I had to code in some automatic workaround that don’t always work so great - especially with multiple meshes. I highly recommend the proposal to focus on extending Blender to support tetmeshing. After that, improving the interface to the softbody solver (or new ones) becomes much easier. In any case, if you’re interested in improving the soft body solver you should reach out to Sebastian.

What parameters do you mean? Stiffnesses are independent of volume and mass is already computed from the volume.

The ADMM-PD solver already has hyperelasticity (neo-Hookean). Other models can be added trivially.

1 Like

In the doc it is said, than mass parameter represent the mass value of vertices, I thought mass wasn’t computed from the volume. However, if you subdivide your model and keep same parameter, you will get a different behavior. It’s maybe all about the bending option. I don’t know exactly how it work and i haven’t find complete information about bending. (I’am talking about the soft-body on 2.92 blender version)
Thank for your feedback and agreed I have a coherent project. I will send draft proposal the sooner to get the mentor 's opinion.

Hello. I would like to try this blender branch but I have some errors compiling it. The master brunch compiled fine on my Ubuntu OS. I am sorry if this is a wrong place for asking. And if it is could you suggest where I should do that? I also want to add that the link to precompiled Windows libraries from here https://wiki.blender.org/wiki/User:Mattoverby/GSoC2020/mattoverby_final_report is dead. Have someone compiled the brunch recently?

This is as fine a place as any for reporting errors.

I would like to try this blender branch but I have some errors compiling it.

The branch hasn’t been merged from master since last summer, I suspect it’s related to that? Feel free to email me ([email protected]) with more details. I’ll try and take a closer look this weekend when I have a bit more time.

I also want to add that the link to precompiled Windows libraries from here https://wiki.blender.org/wiki/User:Mattoverby/GSoC2020/mattoverby_final_report is dead.

I’ve noticed that, it seems like the page for precompiled windows binary doesn’t exist anymore. Not sure where it went, but when if it gets hosted again I’ll update the link.

Hi, everyone!
I just see a “Two minute papers” that remembered me of this work done by @mattoverby
I’m not a developer but I would love to know if there is someone interested in implementing this in blender…

3 Likes

Can anyone share a precompiled Windows build? Damn, I thought this was in the main Blender branch already. That’s a bummer. I hoped to use it in my project, which is in quite advanced stage already.

I’m not sure if you are aware of Gsoc-2022. There’s a new soft body project coming.

I’m pretty sure that a lot of compatibility issues will occur in building this 2020 branch… it’s outdated.