ubisoft / mixer

Add-on for real-time collaboration in Blender.
https://ubisoft-mixer.readthedocs.io/
GNU General Public License v3.0
1.32k stars 77 forks source link

Support for mesh modifiers #10

Closed lyuma closed 3 years ago

lyuma commented 3 years ago

We have meshes which use modifiers for a non-destructive workflow. For example: Subdivision Surface; Mirror modifiers, Boolean Modifier, or Armature modifier (part of proposal #11 ).

I would expect the original mesh to be synced, as well as the list of modifiers and properties.

For the basic implementation--syncing modifiers--this could be done using messages for ADD_MODIFIER / MODIFIER_UPDATE and REMOVE_MODIFIER and a dictionary of modifier type and some properties, as well as the order of the modifier in the Blender modifier stack.

Celeborn2BeAlive commented 3 years ago

Hi @lyuma, thanks for your interest for Mixer. Modifiers should be supported in September 2020, right now several developers of our team are on vacation (including myself) so developments are a bit slower. Thanks for the proposal for these new message types, but we don't need new specialized messages anymore. Indeed, we implemented a generic mechanism that should support, in the end, all Blender data types (with some special cases, but hopefully not too much). So modifiers, armatures (#11), but also animations actions and keyframes (#12) will be supported without the need to add specific message types.

If you want more information about this system, you can start by reading https://github.com/ubisoft/mixer/blob/master/doc/synchronization.md that gives an overview of our two synchronization mechanisms and what we want to achieve. The generic sync mechanism is implemented in the package https://github.com/ubisoft/mixer/tree/master/mixer/blender_data You can search in the whole codebase references to functions from this packages, but I'm correct they should all be in:

As a user, to enable the generic synchronization mode, you need to check the "Experimental sync" checkbox in the room interface. Right now we have enabled sync of Lights, Cameras, Scenes, VSE and Metaballs with this mode. Other objects are still synced with our old mode (so both mode are mixed together when you check the option). If you want to try to enable more things to be synced (like Modifiers for example), you need to do it in the code. For that @feeefeee can give you more detailed information since he is the main developer of the blender_data package.

feeefeee commented 3 years ago

Considering your (and several others) interest in modifiers, I have "unlocked" modifiers and contraints synchronization in the 205-object-modifiers-and-constraints branch.

But this branch has several regressions:

To use it, you must have "Experimental sync" selected on all Mixer instances. We only tested a few modifiers (including Mirror, Subdivision Surface and Array), the only constraint tested is Limit Scale but I am confident for others. Addition, removal, reordering, renaming and visibility changes are supposed to work. Modifiers requiring an image (displace) will probably not work until images are better supported

Known issues:

This branch will not be merged into Master until the rename bug is fixed, which requires much more work, but I will try to merge master updates into it from time to time.

Try it if you want, but remind that is it is very experimental. The commit is rather simple (c60f870f752e7b01ef75b6987fbc61231c9e7a13).

Your feedback is very welcome. If you have precise problems, please post new issues, it will be easier to track.

Celeborn2BeAlive commented 3 years ago

@lyuma You can download an archive of the "dev modifiers version" here https://gitlab.com/ubisoft-animation-studio/mixer/-/jobs/703226702/artifacts/download that can be installed directly into Blender.

Celeborn2BeAlive commented 3 years ago

Closing this issue because we are moving discussions to https://gitlab.com/ubisoft-animation-studio/mixer.

Modifiers support is currently implemented in branch https://gitlab.com/ubisoft-animation-studio/mixer/-/tree/205-object-modifiers-and-constraints and you can find development releases here https://gitlab.com/ubisoft-animation-studio/mixer/-/releases

@lyuma If you want to continue this discussion, please open a new issue on Gitlab, thanks !