vcg-uvic / viper

Open-source code for VIPER -- Volume Invariant Position-based Elastic Rods
Apache License 2.0
902 stars 105 forks source link

I was doing this in 2002 when I was 20yo! (pics) #5

Open m-7761 opened 4 years ago

m-7761 commented 4 years ago

I built a system like this in 6 months when I was 20, I taught myself C++ at the same time, with a background in architecture/engineering CAD. I had some interesting talks with people who were surprised at my results. I can upload pictures if anyone is interested. I always wanted to return to it later in life.

I built models (spring networks) for every class of muscle/ligament/cartilage structure in the human body; some of these aren't rope-like. I'm writing to ask how your system deals with configurations that are a little more complicated? Or can it at this stage?

drebain commented 4 years ago

VIPER is particularly well suited to fiber-like structures for which it can model bending, twisting, and volume preserving effects with far fewer primitives than other approaches. While it can model things that are not strictly rope-like (see the octopus), there might be more efficient choices or extensions for structures that are sheet or blob-like. This is definitely an open area of research for people looking to do more complex body simulations.

m-7761 commented 4 years ago

Do you mean sheets like flat sheath like muscles? Some videos show your VIPER modeling pectoral muscles for example. Are the rope-like elements connected/constrained laterally in this case? Or do they roll over each other?

A simple kind of muscle is two tendons that have a flat muscle that connects them down their length instead of at the ends. Is this example sheet or blob like? What about a Y shaped connection like biceps?

drebain commented 4 years ago

In the case of the pectoral muscles VIPER still works well as the muscle's internal structure is still a bundle of fibers, which can be bound together with additional lateral constraints that mimic the real structures that hold them together. In this way, I think any kind of muscle should be possible to simulate with reasonable efficiency, including y-shapes, which can be modeled as separate fibers that are only joined in some places, or even a single fiber with an explicit branch.

My knowledge is more on the geometry/computation side than the biology side, but my understanding is that for flat shapes without an oriented internal fiber structure such as cartilage, the isotropic bending dynamics would be less suited to VIPER, which might require a finer discretization to behave properly in this case.

m-7761 commented 4 years ago

In the project I did the muscle (etc.) cross-sections were more or less a function of the insertion shape that was drawn onto the 3D model that could be a bone or another muscle (etc.) The gist of it is they had a shape and a volume but I can't recall if that changed the underlying dynamics except for purposes of where muscles touched. It was more geared toward solving for the shape given a configuration and interactions was secondary.

When structures needed more flexibility I would model them as separate structures and use blending just to look nice, like in your screens. You can actually get away with a lot if you can attach the fibers to other fibers. That might make VIPER act like a generic spring-network? But it can cover a lot more muscle types if it works.

The goal was real-time but in 2002 doing one character in real-time wouldn't leave much for anything else. But it was closer to real-time than offline.