Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

VP eval / update order? Deformers not updating when running a live link to OSC

VP eval / update order? Deformers not updating when running a live link to OSC

AronDurkin
Enthusiast Enthusiast
929 Views
9 Replies
Message 1 of 10

VP eval / update order? Deformers not updating when running a live link to OSC

AronDurkin
Enthusiast
Enthusiast

Hey Folks

 

I'm trying to drive a character rig through an OSC Python library.

 

The data is coming through fine and I can see the joints moving in realtime in the viewport just fine, but the skinned mesh / blendhspaes on the mesh are not updating live. I can see the values changing in the channel box live but the mesh in the viewport doesn't move until I move it by hand and force an "update".

 

The commands are literally just SetAttr and blendhshape -e -w but they are being called by this OSC library callbacks, i imagine quite a lot of time per frame.

 

I guess I'm asking whats the deal with the evaluation order / VP mesh deformer update stuff and how are others gtting things like live mocap to work in the viewport.

 

cheers

 

 

0 Likes
930 Views
9 Replies
Replies (9)
Message 2 of 10

lee.dunham
Collaborator
Collaborator

Hmm, the setAttr should do the necessary dirtying of the node to force the eval.

I'm not familiar with OSC, I'm assuming you mean OpenSoundController?

Try dirtying the deformer to see if it helps (cheaper than a global refresh).

Not ideal but it might help.

0 Likes
Message 3 of 10

AronDurkin
Enthusiast
Enthusiast

Thanks for the response Lee.

 

Yeah OpenSoundController and SimpleOSC Python libraries. I'm not 100% sure on how to dirty the deformer? key it? key it's inputs?

 

thanks again

0 Likes
Message 4 of 10

AronDurkin
Enthusiast
Enthusiast

hmm I tried making the hwole scene dirty with 

dgdirty -a;

and it still didnt update live 😞

 

I’ve tried maya 2018 / 2019 as well as on multiple machines. Updated GPU drivers. tried some different VP2 settings turned off like consolodate world. Tried legacy viewport. DG, serial and paralel.

 

Also it crashed a fair bit when I send data, booo maybe this aint doable 😞

0 Likes
Message 5 of 10

lee.dunham
Collaborator
Collaborator

Ah, yeah I was going to suggest dgdirty.

Have you tried disabling DG cache? (New feature in 2019).

Also check you have vertex caching disabled in viewport 2.0 settings.

 

0 Likes
Message 6 of 10

AronDurkin
Enthusiast
Enthusiast

yeah sadly those 2 things are also disabled 😞 - I'm starting to think this might be a lost cause 😞

 

thanks for your suggestions so far though!

0 Likes
Message 7 of 10

will.telford
Alumni
Alumni

Hey Aron,

It sounds like you've followed most debugging steps available to you (caching, Evaluation mode, dgDirty etc)

Can you post a simple file and script with steps to reproduce the issue? We'd love to help you solve this.

Thanks!


Senior Product Owner of Rigging at Autodesk
https://twitter.com/wtelford
0 Likes
Message 8 of 10

AronDurkin
Enthusiast
Enthusiast

hey will, thanks for helping me out here. I'm gonna DM you a sample file as it's a little confidential 🙂

0 Likes
Message 9 of 10

will.telford
Alumni
Alumni

Hey Aron,

I had a dev look in to this. Apparently you are spinning up your server in a separate thread, therefore all of your handler callbacks that are executing the maya cmds aren't being called from the main thread either. You'll need to engineer a way to make those calls from the main thread. Hopefully that's the only issue.


Senior Product Owner of Rigging at Autodesk
https://twitter.com/wtelford
0 Likes
Message 10 of 10

AronDurkin
Enthusiast
Enthusiast

ahhh OK, I literally know nothing about threading, it's not me as much as it's whatever is in the OSC libraries I'm using and am nowhere near advanced understand, if you're engineers knows a quick fix then that'd be awesome. i imagine it's a big complex thing though so thanks for looking into it 🙂

 

cheers

 

0 Likes