3dsmax: Alternatives to skinOps?

max
python

#1

Hi,

I’m working on generic functionality to read and write weights and I’m finding skinOps terribly slow (+in general).

Does anyone have experience with alternate approaches/languages that they can perhaps share? Or perhaps knowledge or existing library code for this task?

Thanks,
Sune


#2

Welcome to 3dsMax nightmare that is the skin modifier. MaxPlus doesn’t expose anything related to this. AFAIK, you’re only resort is C++ SDK.


#3

Thanks man, it’s been a real treat so far :slight_smile: I’m wondering if stealing the skin weight reading part from our C++ mesh eporter and exposing a few functions to Python might not be the best way to go…


#4

Max does have a skinUtils interface and we utilize that to save skin data to meshes in a scene mesh (stored via object properties). These can be saved to max files and imported easily. From there it’s relatively simple to get the skin data on to your desired mesh. Though, personally, I dislike dealing with max files for pipeline needs.

I made some progress with the c# api, serializing skin modifier data to and from xml, a while ago. The speed was great when it worked, however, I couldn’t get it to work consistently. It looked like the mesh refresh methods behaved… ‘flaky’… at best.
Also I had some complications passing un-manged types, required by the wrapped methods, in managed c#… it got messy. Though if you have good c++ and c# chops you may be able get something working.

But yes it seems for this type of issue, and probably many others, both python and c# aren’t wrapped particularly well and the maxscript options are slow.

As Claudio said, C++ is the best bet, unfortunately.


#5

Writing a skin data parser is relatively easy and the performance is more than usable too. There are two things that will boost performance when getting or setting skin data:

Make sure the weight tool is closed when processing or it updates after every method called.
skinOps.closeWeightTool

Define any interface methods as a local variable before being using in a loop is a big performance boost:
http://docs.autodesk.com/3DSMAX/16/ENU/MAXScript-Help/index.html?url=files/GUID-0030AA3F-47D9-4FDD-8517-5F7902884B37.htm,topicNumber=d30e96434