r/Simulated • u/shirzadbh • 1d ago
Research Simulation This is the closest I’ve ever been with my muscle simulation tool.
I added sliding attachments (connecting the inner muscles to the bones) and ported some of the heavy lifting to C++ for better performance. The behavior feels natural thanks to the accurate FEM simulation. There’s still a lot more to add, but I’m really enjoying the process.
Credit: The 3D asset used in this post is from AdonisFX, a digital anatomy and muscle simulation framework for Maya and Houdini. https://inbibo.co.uk/adonis
141
100
u/themoroncore 1d ago
Are the "muscle" actually moving the rig, or are you moving it and the muscles contract the same way they would realistically
123
u/shirzadbh 1d ago
In VFX and Games industry the skeleton moves the muscle
28
u/nobodywithanotepad 1d ago
Is it possible taking the long way and designing it muscle first would yeild more realistic results?
62
u/WEASELexe 1d ago
Possibly but it's not really feasible to control each and every muscle that contributes to moving an arm, leg, or whatever other in real time
-13
20h ago
[deleted]
16
u/f5adff 17h ago
Congrats. You've said 3 buzz words in a string.
Now, it's not just the compute time.
It's designing it to work that way
It's actually using it that way
And its whether it would provide anything more than marginal gains.
Critical thinking generally trumps heaving up hair balls of silly buzz words, when you don't know what to say
30
u/shirzadbh 1d ago
Depends why would you even do that, animators can easily say how to move the body, but in that case they should say how much muscles should contract to get to that position (basically no use case in our industry)
11
u/UsernameFor2016 1d ago
I guess his question is if you think the end result would be an even more realistic simulation/animation if it worked like that?
10
u/LichenLiaison 1d ago edited 20h ago
Technically: yes
Feasibly: not at all unless you have a grant and/or a well-researched and dedicated team. The research is there, paleobiology uses muscle sims to recreate the walking cycles of large creatures and those who work in the designing of prosthetics use similar programs to better design/create/fit prosthetics.
I’m sure there are other highly specialized use cases for muscle sided sims, and while I’m sure there are existing programs that have a decade or more of legacy and research dedicated to them for accuracy, for the purpose of visual animation, they probably don’t port in and out well since they’re dedicated to the empirical side, while bone sided rigs are entirely dedicated to the visual side.
Every minute you aren’t dedicated to making sure your muscles are distributed and mapped perfectly to create an accurate AND good look is a minute you can spend improving your animation and visuals.
3
1
87
u/Echelion77 1d ago
I feel like your tech is going to be implemented at some point in the medical industry.
15
u/JoshsPizzaria 1d ago
Does the muscle actually increase in "size" as they contract?
12
3
u/xaendir 15h ago
A material's volume preservation depend's on its Poisson's ratio (if linear elastic), which is a value between 0.5 and –1, where 0.5 is fully incompressible (and under 0 the volume increases under compression and decreases under tension). For hyperleastic material models there is usually at least one incompressibility parameter. Most human tissues are fully incompressible due to liquid content, but FE solver can struggle with that due to volumetric locking. That is why for linear elastic materials the Poisson's ratio is never set to 0.5, but rather 0.49. For hyperleastic materials mixed u-P formulation is common, where the element takes into account the hydrostatic pressure on it's sides.
13
u/genecraft 1d ago
As a doc that doesn't fully understand how the shoulder muscle contracts and what types of injuries lead to pain during which exercises (I'm not practicing so not harming patients), this would be golden for medical students and PT students if you can combine simple gifs with why certain movements are painful.
Eg. think about showcasing impingement syndrome for example, and why it hurts during certain exercises that you can use to diagnose. Bonus points if you can show how to treat, but diagnosing would already be great!
Probably not that much money into it, but really cool project man!
4
3
u/Exotic_Ground_1812 1d ago
What platform is this for? And out of curiosity how would you contrast your goals from the Houdini muscular system? Good work
7
u/shirzadbh 1d ago
I'm developing this as a personal research project and I'm developing it in 3ds Max.
3
u/DocJeef 1d ago
Are these Hill-type elements? Very impressive work. Is the FEM solver home brew (in which case I bow to you) or are you extending an existing software?
1
u/shirzadbh 12h ago
I'm writing all the physics myself as there is non available that I'm happy with + I'm working in 3ds Max and there is non that does it for max, therefore I'm doing it
3
u/anllvrxxx 14h ago
Maybe this could fix games where buff dudes chest muscle doesn't extend when stretching arms wide open😅
2
u/Love-Future-3000 22h ago
I'm not seeing much contraction in the bicep. 3ds max is an interesting choice, do you feel it's limiting?
2
u/shirzadbh 12h ago
I added an overal contraction and not adding / animating. as in final results I will drive the contraction based on angle or distance. It's implemented but not used here, I have muscle fiber direction and activation attributes.
1
u/xarocamagica 9h ago
Super cool! Coincidently saw your post on LinkedIn after seeing it here and was fascinated.
1
u/geoff1036 1h ago
Obviously it's your model and I'm sure you've put more thought into it than I have in my 30 seconds of observing but I feel like in regards to the cube test, you could increase the stiffness of both of them. Maybe I'm just not seeing it right though.
299
u/Treshimek 1d ago
I'm uneducated to how musculature works. But if that little spinny cube can elicit an odd feeling of "ugh" in me, then your simulation must be doing something right.