Home Website Youtube GitHub

Mgear springnode gravity

ok?
but how is this setuped?
i can only connect one transform in “collider”…

edit: oh just saw that you updated the code to have a list of colliders…and ground plane…thank you so much for providing this…

No problem, thought it was a fun little project and I plan to use it myself.

This looks awesome!
Noob alert: How do you compile that? Should I use scons or cMake or?

Maya 2018.6

Thanks in advance

i compiled it with VS2015 express and win10 SDK 10.0.15063

I went through Cult of Rig tutorial: https://www.youtube.com/watch?v=8OcRTtp5Sk8 and compiled that without errors.
I can not load the plugin into Maya though - it’s saying
// Error: file: C:/Program Files/Autodesk/Maya2018/scripts/others/pluginWin.mel line 909: initializePlugin function could not be found in plug-in (SpringBuild) //

so that I added in VS Linker > Command Line > Additional Options

/export:initializePlugin /export:uninitializePlugin

and C/C++ Preprocessor added:
;NT_PLUGIN;REQUIRE_IOSTREAM

but then VS can not compile that giving 3 errors:

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2001	unresolved external symbol initializePlugin	SpringBuild	C:\Users\Krzym\Desktop\Solvers\vs4\SpringBuild\SpringBuild\LINK	1	
Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2001	unresolved external symbol uninitializePlugin	SpringBuild	C:\Users\Krzym\Desktop\Solvers\vs4\SpringBuild\SpringBuild\LINK	1	
Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK1120	2 unresolved externals	SpringBuild	C:\Users\Krzym\Desktop\Solvers\vs4\SpringBuild\x64\Debug\SpringBuild.lib	1	

Thought maybe you will know the answer as I can not google anything helpful.
My setup its VS 15 Win 10 10.0.10586.0

The way I built it was opening a native tools command prompt and running

C:\Python27\Scripts\scons.bat -j8 no-cache=1 x64=1 with-maya=2019 mscver=14.1

1 Like

I can also upstream these features if there’s interest

1 Like

try the sdk version above (10.0.14393). sorry for the wrong sdk version.
and i compiled in release mode…

here my sln…
http://www.soulcage-department.de/Mgear_Solvers_Maya2018_CollisionGravity.zip

(you have to point to the includes and libs on your harddrive…)

4 Likes

Thank you! That was it, tested both ways - on your project and mine and it worked well. Will have to play with it next few days but it’s looking great.
@Miquel any chance to include that to the official release? :slight_smile:

2 Likes

Bumping this thread, but I’d enjoy seeing this spring collision solver compiled for new mgear releases or a 2020 version.

1 Like

i will compile it for maya 2020…

but it also needs some modifications on the component scripts as well to get access to the spring node gravity parameters…
(so all in all, it will be a custom mgear…)

3 Likes

Here is a temporary compile I made for myself (Maya 2020 windows):
https://drive.google.com/file/d/1diDkR6R7HedTmREu_Sr9iOONbyxq67sW/view?usp=sharing

I’m not a programmer so this could be absolutely busted. I think it works. I just slapped the spring code onto the current mgear solver code. The old code was missing the matrixconstraint.

1 Like

@soulcage I should find the time to review it and implemented it in the release version :slight_smile:
I have created a ticket

2 Likes

is there a way to get the gravity added to the spring solver for mGear version 4.0.3? such a nice feature to have! Cheers

Oh sorry, I never updated the solver with the code from @soulcage :sweat_smile:

Did you tried ragdoll?
https://ragdolldynamics.com

I am using it now . The new Markers system is really easy to use and super powerfull. But not free :sweat_smile:

Yes, but just gave it a tiny tryout a few months back when joined the Discord channel. It is pretty awesome, but it will be a nice addition having some gravity in the spring as a vanilla mGear rigging feature.

1 Like

Taking note :wink:

2 Likes

saw this thing on twitter and I’m wondering, how collision is set up? is it already available?

It’s not been implemented officially yet. Collisions are set up as points in worldspace with a radius attribute. You can try and get the compiled version for windows 2020 or recompile yourself and mess with the springnode manually.

1 Like

since this “simple” collision implementation on the spring node could be a bonus, i think its a bit unpractible in production due to the lack of subframe sampling the collisions.

for a joint based collision, maya has already good solutions (nhair curve simulation that drives joints…), also good for mesh collisions…