[Experimental] CUA/XPS Controllers

Plugins [Experimental] CUA/XPS Controllers

Thanks for flagging. I think I know what's happening. Controllers are getting created before the CUA is, and when I connect them later the orientation is no longer correct.

Let me know if the latest fix makes it better.

Wow that was fast. I replicated the same method and this time everything worked.

Thanks so much. ?
 
Wow that was fast. I replicated the same method and this time everything worked.

Thanks so much. ?
I mostly make these on request from creators and don't actually make much content myself, so if you see more issues please let me know.
 
I think the best idea at the moment is to port anything with a rig as a cua, that works perfectly. Right now the xps is working with some xps models and with some others it still gives the same error before. Which is weird because the rigging is done by the same person and almost identical between models.
Is there anything I can do to help diagnose this?
When I use milns xps loader and then yours, using the armature or root armature it gives the same errors I listed before
!> Controller does not exist for rigidbody unused base meshes\creationclub\bgsfo4060\actors\rottweiller\character
!> Controller does not exist for rigidbody unused rottweiler:0
!> Controller does not exist for rigidbody unused rottweiler:1
!> Controller does not exist for rigidbody unused rottweiler:2
!> Controller does not exist for rigidbody unused rottweiler:3
!> Controller does not exist for rigidbody unused rottweiler:4
[message log now]
System.NullReferenceException: Object reference not set to an instance of an object
at Stopper.CUAControllers.CreateChildObject (UnityEngine.GameObject parent, System.String name) [0x00000] in <filename unknown>:0
at Stopper.CUAControllers.AddController (System.String rigidBodyName) [0x00000] in <filename unknown>:0
System.NullReferenceException: Object reference not set to an instance of an object
at Stopper.CUAControllers.CreateChildObject (UnityEngine.GameObject parent, System.String name) [0x00000] in <filename unknown>:0
at Stopper.CUAControllers.AddController (System.String rigidBodyName) [0x00000] in <filename unknown>:0
System.NullReferenceException: Object reference not set to an instance of an object
at Stopper.CUAControllers.CreateChildObject (UnityEngine.GameObject parent, System.String name) [0x00000] in <filename unknown>:0
at Stopper.CUAControllers.AddController (System.String rigidBodyName) [0x00000] in <filename unknown>:0

The xps file I put here if youd like to double check it works on your end, because then itd be good because I know something is wrong on my end

Edit just did a full test using a daz dog as a CUA and the plugin now just does not work at all. I cant get a single object to work and move at all. I rollback to the last version I had which was 7, and it works for the cua's there. The main problem across all models is that some have bones that are quite small and it appears that colliders are added to each bone, which results in the model constantly colliding with itself, so flies around and explodes.
I will 100% be here to help in any way I can, this is a great idea and feature that vam is really missing out on and nobody else has stepped up to make it viable on this level for a while.
What is your test model? I think that may be the problem too.
 
Last edited:
Plugin broke again.

It fixed my existing scenes but now when you load the controllers and you set any control node from off to on there's a physics explosion or something. Without joints ticked the rigidbody just drops, you can't really move anything. :unsure:
 
I think the best idea at the moment is to port anything with a rig as a cua, that works perfectly. Right now the xps is working with some xps models and with some others it still gives the same error before. Which is weird because the rigging is done by the same person and almost identical between models.
Is there anything I can do to help diagnose this?
When I use milns xps loader and then yours, using the armature or root armature it gives the same errors I listed before
!> Controller does not exist for rigidbody unused base meshes\creationclub\bgsfo4060\actors\rottweiller\character
!> Controller does not exist for rigidbody unused rottweiler:0
!> Controller does not exist for rigidbody unused rottweiler:1
!> Controller does not exist for rigidbody unused rottweiler:2
!> Controller does not exist for rigidbody unused rottweiler:3
!> Controller does not exist for rigidbody unused rottweiler:4
[message log now]
System.NullReferenceException: Object reference not set to an instance of an object
at Stopper.CUAControllers.CreateChildObject (UnityEngine.GameObject parent, System.String name) [0x00000] in <filename unknown>:0
at Stopper.CUAControllers.AddController (System.String rigidBodyName) [0x00000] in <filename unknown>:0
System.NullReferenceException: Object reference not set to an instance of an object
at Stopper.CUAControllers.CreateChildObject (UnityEngine.GameObject parent, System.String name) [0x00000] in <filename unknown>:0
at Stopper.CUAControllers.AddController (System.String rigidBodyName) [0x00000] in <filename unknown>:0
System.NullReferenceException: Object reference not set to an instance of an object
at Stopper.CUAControllers.CreateChildObject (UnityEngine.GameObject parent, System.String name) [0x00000] in <filename unknown>:0
at Stopper.CUAControllers.AddController (System.String rigidBodyName) [0x00000] in <filename unknown>:0

The xps file I put here if youd like to double check it works on your end, because then itd be good because I know something is wrong on my end

Edit just did a full test using a daz dog as a CUA and the plugin now just does not work at all. I cant get a single object to work and move at all. I rollback to the last version I had which was 7, and it works for the cua's there. The main problem across all models is that some have bones that are quite small and it appears that colliders are added to each bone, which results in the model constantly colliding with itself, so flies around and explodes.
I will 100% be here to help in any way I can, this is a great idea and feature that vam is really missing out on and nobody else has stepped up to make it viable on this level for a while.
What is your test model? I think that may be the problem too.
The link you pasted shows up as deleted. An example broken XPS would help though. For XPS testing I use a gorilla from https://hub.virtamate.com/threads/xps-collection-animals-monsters.23912/

The plugin itself doesn't create colliders, but the XPS plugin has a setting for it. Can you try un-checking that to see if it helps? If so, I can add some collision management features. I can add toggles for disabling collision for specific rigidbodies, or disable collision between neighboring joints. Or maybe a button to add a collider to a rigidbody that you can position with collidereditor?
Plugin broke again.

It fixed my existing scenes but now when you load the controllers and you set any control node from off to on there's a physics explosion or something. Without joints ticked the rigidbody just drops, you can't really move anything. :unsure:
Physics explosion is always a danger. Do you have an example scene? I can try playing around with it and seeing what causes it.
 
The link you pasted shows up as deleted. An example broken XPS would help though. For XPS testing I use a gorilla from https://hub.virtamate.com/threads/xps-collection-animals-monsters.23912/

The plugin itself doesn't create colliders, but the XPS plugin has a setting for it. Can you try un-checking that to see if it helps? If so, I can add some collision management features. I can add toggles for disabling collision for specific rigidbodies, or disable collision between neighboring joints. Or maybe a button to add a collider to a rigidbody that you can position with collidereditor?

Physics explosion is always a danger. Do you have an example scene? I can try playing around with it and seeing what causes it.

It happens with every CUA. It doesn't really matter which one you use and what you pick in the controllers plugin. Once you load the controllers and set any node from off to on it breaks. And you can't really move any nodes despite them being on.
 
Ah I'm really sorry i thought that filehost was actually okay. I know this ones fine https://mega.nz/folder/MX9GkQxJ#M5-pvfmsgxcvi35GWQuNQA
So whats included is a CUA with rigging based off daz genesis 8, this one will explode when its spawned. You were right about the xps loader, I feel a bit embarrassed about that. Turning off the auto collider fixed almost all of the models, and the problem of the plugin not creating the rig disappears when you turn off auto collider add, when its on your plugin wont create it. I don't really care about that because I can animate without collision anyway.
The only thing I see thats a problem now is that CUA exploding when the plugin creates the joins. im pretty sure its because some of the bones in the head are way too small.

I've also set up a timeline scene where I had moved one of the limbs on the xps model and saved it, however on reloading the scene the xps model wasnt in pose or able to move at all.
I had timeline running on the default atom person you spawn, added the XPS feet controllers and then moved them, then saved.
I'm about to try with the cua.

Edit: After trying with A CUA it works great! I have figured out the XPS problem. when the xps loader loads the model all the settings are default, and THEN it removes the colliders that it adds by default, then your plugin grabs the xps and adds the joints. The problem is the plugin wont add control nodes to the xps model if the XPS plugin is allowed to auto-add colliders it seems to me. I think from now on I'll just stick to CUA. I will keep trying to break the plugin and see if I can get any bugs to pop up lol, but aside from that its looking very good!
1707613500648.png
 
Last edited:
The link you pasted shows up as deleted. An example broken XPS would help though. For XPS testing I use a gorilla from https://hub.virtamate.com/threads/xps-collection-animals-monsters.23912/

The plugin itself doesn't create colliders, but the XPS plugin has a setting for it. Can you try un-checking that to see if it helps? If so, I can add some collision management features. I can add toggles for disabling collision for specific rigidbodies, or disable collision between neighboring joints. Or maybe a button to add a collider to a rigidbody that you can position with collidereditor?

Physics explosion is always a danger. Do you have an example scene? I can try playing around with it and seeing what causes it.
Granular control over which rigidbodies have collision and which don't would be amazing. I've got a few XPS models that I want to use but I can't because they have things like armor/clothing cooked into the model that inherently want to collide with the skin underneath due to overlapping rigidbodies being created, and as soon as I add the controllers they explode while it tries to sort out these collisions. I can of course make them completely collision free, but then they're not able to interact with other objects in the scene. It would be great if I were able to make some parts collision-enabled while leaving "decorative" parts non-colliding so that they don't interact with each other.

Another ask, if it's at all possible, would be for the CUA controllers to have a configurable default control state for position/rotation, e.g. "On" or "Lock"; maybe a checkbox before controllers/rigidbodies are created named "Set position/rotation to ON for all controllers". For some models they like to sag, spring, or vibrate as soon as the controllers are attached (if they don't outright explode as mentioned above), and it can be difficult to get them back to a default posture for manipulation. It would be great if they started in a state other than "Off" so that they'd try to maintain their default pose, and then I could unlock joints as needed.
 
Hey Stopper, I'd like use this in my latest scene. I've set up some rigged fbx's in c4d and pulled it across to unity but I'm having some issues getting it to work in vam. I'm not sure if I've set up the bones right. I'd like to see how the tentacle thing you used in the example is set up in unity. Is there a place you I can get it to see how it's set up?
 
I'm using version 10 and still having the issue where the CUA is no longer linked to the body node after scene reload. Could I be doing something wrong?
Probably just more bugs on my end, but maybe we can coordinate on Discord sometime.

Hey Stopper, I'd like use this in my latest scene. I've set up some rigged fbx's in c4d and pulled it across to unity but I'm having some issues getting it to work in vam. I'm not sure if I've set up the bones right. I'd like to see how the tentacle thing you used in the example is set up in unity. Is there a place you I can get it to see how it's set up?
The tentacle isn't mine, I think it's this one https://hub.virtamate.com/resources/posable-and-animatable-alien-tentacle.29956/

I don't actually have any experience making/rigging CUAs myself.
 
Stopper updated [Experimental] CUA/XPS Controllers with a new update entry:

[Experimental] Major Rework of Internals

I finally worked through a process to properly add controllers to an existing Atom. Typically, the controller list is baked into its internal state during its first initialization and into the SuperController's internal structures when it is added to the scene. Both of these events are only meant to occur once, and VAM took a lot of convincing to do it again.

For the user, the main benefit is that there is no longer a separate "Controllers" atom. Timeline and other plugins can be added...

Read the rest of this update entry...
 
Seen the update! am testing it right now and looking forward to it working.

Bug found.

Added CUA, added XPS plugin, selected xps, added plugin, created rig. -> Added person, added timeline onto them, added their head + hand and created movement. Added CUA parts to timeline, animated them. Hit play and it works fine. saved the scene, closed vam, opened and the rig is there and still works, however it wont animate, gave this error.

!> Exception caught: System.NullReferenceException: Object reference not set to an instance of an object
at LarrysArms.HairColorChanger.Init () [0x00000] in <filename unknown>:0
!> Timeline: Cannot import controller 'head neck middleControl' from atom 'dog' because this controller doesn't exist.
!> Timeline: Cannot import controller 'leg front left ankleControl' from atom 'dog' because this controller doesn't exist.
!> Timeline: Cannot import controller 'spine middleControl' from atom 'dog' because this controller doesn't exist.

I think this is the same bug as before with loading an xps model. I'm going to export it as a standard CUA instead of a xps file and see how it goes.


Imported into unity with the rig. same error on loading a basic scene. Could you use this CUA and see if its happening on your system stopper?
!> Exception caught: System.NullReferenceException: Object reference not set to an instance of an object
at LarrysArms.HairColorChanger.Init () [0x00000] in <filename unknown>:0
!> Timeline: Cannot import controller 'leg front left toesControl' from atom 'CustomUnityAsset#4' because this controller doesn't exist.
!> Timeline: Cannot import controller 'spine middleControl' from atom 'CustomUnityAsset#4' because this controller doesn't exist

I uploaded it here https://mega.nz/file/4a0kXIQC#sCUkhT3d_WzKgZKj_ZYfpRV_dD7abDI34TPV7GVWGSM
 
Last edited:
Seen the update! am testing it right now and looking forward to it working.

Bug found.

Added CUA, added XPS plugin, selected xps, added plugin, created rig. -> Added person, added timeline onto them, added their head + hand and created movement. Added CUA parts to timeline, animated them. Hit play and it works fine. saved the scene, closed vam, opened and the rig is there and still works, however it wont animate, gave this error.

!> Exception caught: System.NullReferenceException: Object reference not set to an instance of an object
at LarrysArms.HairColorChanger.Init () [0x00000] in <filename unknown>:0
!> Timeline: Cannot import controller 'head neck middleControl' from atom 'dog' because this controller doesn't exist.
!> Timeline: Cannot import controller 'leg front left ankleControl' from atom 'dog' because this controller doesn't exist.
!> Timeline: Cannot import controller 'spine middleControl' from atom 'dog' because this controller doesn't exist.

I think this is the same bug as before with loading an xps model. I'm going to export it as a standard CUA instead of a xps file and see how it goes.


Imported into unity with the rig. same error on loading a basic scene. Could you use this CUA and see if its happening on your system stopper?
!> Exception caught: System.NullReferenceException: Object reference not set to an instance of an object
at LarrysArms.HairColorChanger.Init () [0x00000] in <filename unknown>:0
!> Timeline: Cannot import controller 'leg front left toesControl' from atom 'CustomUnityAsset#4' because this controller doesn't exist.
!> Timeline: Cannot import controller 'spine middleControl' from atom 'CustomUnityAsset#4' because this controller doesn't exist

I uploaded it here https://mega.nz/file/4a0kXIQC#sCUkhT3d_WzKgZKj_ZYfpRV_dD7abDI34TPV7GVWGSM
Hmm.. I'll take a look a bit later, but what might be happening is Timeline being loaded earlier than CUAControllers.

The controllers don't exist until the plugin loads, and that's not fixable. From your description it sounded like the Person's timeline controlled the cua. If the Person was created first, it's plugins will load first and timeline might try to reference nonexistent controllers.

If this is the case, the workaround would be to add timeline to the XPS atom, below the CUAControllers plugin, and manage the added controllers through that. Timeline will auto synchronize animations with the same name across multiple Atoms.
 
Hmm.. I'll take a look a bit later, but what might be happening is Timeline being loaded earlier than CUAControllers.

The controllers don't exist until the plugin loads, and that's not fixable. From your description it sounded like the Person's timeline controlled the cua. If the Person was created first, it's plugins will load first and timeline might try to reference nonexistent controllers.

If this is the case, the workaround would be to add timeline to the XPS atom, below the CUAControllers plugin, and manage the added controllers through that. Timeline will auto synchronize animations with the same name across multiple Atoms.

Interesting. I will give that a try! I might even look into seeing if pairing this with captain varghoss' load order plugin to see if thats possible but I doubt it.
Thanks for the quick reply!

EDIT: I'd just like to clarify with you first. If I have a set of Cuas and they all have rigging on them. lets number them 1~10; Should I be putting timeline on the last one so that your plugin has time to rig the lower numbered ones beforehand?
If that's the case, would it make it easier if I just were to rename the atom with the timeline on it ZCUA so that its always put to the last of the scene to load? This is entirely assuming load order is alphabetical. I'm completely out of the loop on the scripting for unity. I ask because I need to have a few rigged models in the scene


EDIT 2 BUG: Okay so hopefully you haven't read this yet.

I loaded it on the asset and it works fine if timeline is on that asset but a problem with the plugin itself is that it wont remember what its parented to.
So for a test I parented all of the annoying mouth bonest to the lower jaw so they dont jiggle around, saved the scene and reloaded and it had switched back to none/none up the top. This is outside of the timeline stuff. Their actual states were still set to parented for position/rotation its just in this part they had no clue.
Normally I'd just say 'parent it on load' but some cuas' rigging is really complex and its unavoidable. As a test I parented a foot node to another cua gun, and it remembered that on load, it just seems to forget it if its set to itself.
Right now the only work around would be to position an empty node on say the spine middle and parent everything to that empty, then parent that empty to the spine.
1711359610790.png
 
Last edited:
Interesting. I will give that a try! I might even look into seeing if pairing this with captain varghoss' load order plugin to see if thats possible but I doubt it.
Thanks for the quick reply!

EDIT: I'd just like to clarify with you first. If I have a set of Cuas and they all have rigging on them. lets number them 1~10; Should I be putting timeline on the last one so that your plugin has time to rig the lower numbered ones beforehand?
If that's the case, would it make it easier if I just were to rename the atom with the timeline on it ZCUA so that its always put to the last of the scene to load? This is entirely assuming load order is alphabetical. I'm completely out of the loop on the scripting for unity. I ask because I need to have a few rigged models in the scene


EDIT 2 BUG: Okay so hopefully you haven't read this yet.

I loaded it on the asset and it works fine if timeline is on that asset but a problem with the plugin itself is that it wont remember what its parented to.
So for a test I parented all of the annoying mouth bonest to the lower jaw so they dont jiggle around, saved the scene and reloaded and it had switched back to none/none up the top. This is outside of the timeline stuff. Their actual states were still set to parented for position/rotation its just in this part they had no clue.
Normally I'd just say 'parent it on load' but some cuas' rigging is really complex and its unavoidable. As a test I parented a foot node to another cua gun, and it remembered that on load, it just seems to forget it if its set to itself.
Right now the only work around would be to position an empty node on say the spine middle and parent everything to that empty, then parent that empty to the spine.
View attachment 348129
I think the missing parenting to itself is a bug on my part, and a dumb one at that. I'll have a fix out later today.

Load order in VAM is based on creation order, so it'd be whatever CUA/Person was added last. However, I'd probably recommend just having each CUA use its own timeline that manages its controllers.

Edit: It's a trickier bug than I originally thought. Should still be fixable but might not be elegant...
 
Last edited:
I think the missing parenting to itself is a bug on my part, and a dumb one at that. I'll have a fix out later today.

Load order in VAM is based on creation order, so it'd be whatever CUA/Person was added last. However, I'd probably recommend just having each CUA use its own timeline that manages its controllers.

Edit: It's a trickier bug than I originally thought. Should still be fixable but might not be elegant...
Okay cool, creation date I can work with, thanks for your work on this its opening a lot of doors.

I'll do some more play testing today with some rigged things. If it really is just creation date that's not a problem at all. I'll try spawning a person last and see how that goes. I usually tend to stick with one thing having the timeline on it because somehow vam tends to lose sync with them? Even with the things set up so its not supposed to. Anyway that's a bug with timeline.

No rush on the work dude :)
 
Okay cool, creation date I can work with, thanks for your work on this its opening a lot of doors.

I'll do some more play testing today with some rigged things. If it really is just creation date that's not a problem at all. I'll try spawning a person last and see how that goes. I usually tend to stick with one thing having the timeline on it because somehow vam tends to lose sync with them? Even with the things set up so its not supposed to. Anyway that's a bug with timeline.

No rush on the work dude :)
It might not solve your desync issue, but you might as well want to try it and see... In timeline: More -> Options -> Time mode -> choose "Real Time"
 
It might not solve your desync issue, but you might as well want to try it and see... In timeline: More -> Options -> Time mode -> choose "Real Time"
Will def give that a try. I think I have before but it might be better now thanks!


Also Stopper, I just have a side question about how this plugin adds colliders to things. I found a random model and rigged it myself in blender using the same tools and everything as that gorilla one you tried yours with, but for some reason mine doesnt create any colliders in vam.

if you would like to see them this is the basic files, the original fbx with bones/textures AND the assetbundle with it inside.

 
Will def give that a try. I think I have before but it might be better now thanks!


Also Stopper, I just have a side question about how this plugin adds colliders to things. I found a random model and rigged it myself in blender using the same tools and everything as that gorilla one you tried yours with, but for some reason mine doesnt create any colliders in vam.

if you would like to see them this is the basic files, the original fbx with bones/textures AND the assetbundle with it inside.

This plugin doesn't create colliders. They come with CUAs or the XPS Loader can add them.
 
Any update on the state saving bug? I thought id try a new method of using the parenting feature in timeline but the exact same thing happened and exploded the model, well it moves the nodes to weird positions when it reloads. Its a pain cause i made a custom rig, weight painted and added colliders in unity manually.
Its the last bug left in this plugin :(
Just to iterate whats going on; if you parent one node to another node, lets say the shin to the foot, when you save the scene and reload it, it will spaz out and wreck the pose. I've tried putting timeline on the cua but its still the same problem.

Edit: There is an error I forgot.
Circular reference in texture stack
 
Last edited:
I found a bug in the new version V11 and even V10. When I turned on the physics switch of the asset, the entire asset object would fall freely, far away from the position of the control point.
But when I used the old version V2-V5, this problem did not occur. The physical effect was perfectly displayed when the bound object rotated.
Using the new version V11 and V10 (I only have these two new versions) I had to turn off the asset physics option (if turned on, the object coordinates were seriously wrong). When I rotated the bound object, the asset performance was very bad. Unless you actively dragged it, it was like a piece of wood, as if there was no inertia at all. The old version did not have this problem.
What is the reason? Is there a better solution?


I'm using an older version (Old version and 11 version video)
 

Attachments

  • 1717803888000.mp4
    28.5 MB
  • 20240608080703.mp4
    30.1 MB
Back
Top Bottom