MeshSyncServer
A component to sync meshes/models editing in DCC tools into Unity in real time.
This sync process is done via TCP/IP, allowing developers to use DCC tools in different machines, and
this connection can be configured in the server/port settings of
the MeshSync DCC Plugin
installed in the appropriate DCC tool.
Properties
Auto Start
Values Description On automatically start the server using the specified port. Off start/stop the server manually by clicking the Start/Stop button. Caveat: in a public network, other users will have access to MeshSync as well when the server is running. For example: they may view our Unity screen.
Root Object
Designate a GameObject as the root for objects generated by the sync process.
If empty, the objects will be created in the root.Sync Visibility, Sync Transform, etc.
Settings for enabling/disabling the sync of the applicable properties, which can be used to confirm specific results.
For example, unchecking Sync Transform will let us confirm the physics simulation behavior in Play mode accurately.- Update Mesh Colliders
If enabled and the mesh is updated, MeshCollider properties will be updated as well.
Disabling Sync Meshes brings better performance, and is recommended if syncing meshes is not necessary, for example, when editing only the pose/animation.
- Update Mesh Colliders
Animation Interpolation: sets the animation interpolation method.
Values Description Smooth smoothly interpolate animation curves. Linear do linear interpolation between neighboring animation keys. Constant disable interpolation. For use cases in film productions, "Constant" may be preferable to match the number of animation samples to the target framerate on the DCC side.
Keyframe Reduction: performs keyframe reduction when importing animations.
- Threshold: the error tolerance.
Higher threshold means less number of keys and higher errors, and vice versa. - Erase Flat Curves: delete curves that have no change (flat).
- Threshold: the error tolerance.
Z-Up Correction
Specifies how to convert Z-Up to Y-Up for data from DCC tools which have Z-Up coordinate system (3ds Max, Blender, etc).Values Description Flip YZ converts all vertices of Transform and Mesh to Y-Up. Rotate X converts the root object's Transform to a Y-Up by
applying a -90 X axis rotation to the root object,
leaving the mesh in Z-Up."Flip YZ" works better in most cases.
For reference, Unity's standard FBX Importer does the equivalent of "Rotate X".Sync Material List
When enabled, changing an object's material in the Scene view will update the material list (see below), and other objects which use the previous material will be updated to use the new material.Progressive Display
Values Description On scene updates will be reflected while receiving data in real-time. Off updates will be reflected after all of the scene data is received. Material List
Changing a material in this list will update objects using the previous material to use the new material.Saving and loading materials lists can be done with Import List and Export List buttons.
Animation Tweak : various animation adjustments.
Override Frame Rate
Changes the frame rate while keeping the key time or the animation length.Tips: playing a 24 FPS animation without interpolation when targetting 60 FPS will cause jittery movements.
Changing the animation to 120 FPS is one possible approach to mitigate it.Time Scale
- Scale: applies time scaling.
For example, applying 0.5 will double the speed. - Offset: adds an offset for the specified seconds.
For example, applying a scale of -1 and an offset of -5 to a 5 second animation will result in reverse playback.
- Scale: applies time scaling.
- Drop Keyframes: drops keyframes.
If we apply Step=2 to an animation with 30 keystrokes, then the odd frames will be removed and the animation will become 15 frames.
Similarly, if Step=3, then the animation will become 10 frames.
Export Assets
Export meshes/materials into asset files, in order to reuse them in other scenes or projects.
Normally, meshes/materials synced using MeshSync only exist in the active scene.
Tips
When there is a MeshSyncServer object in the scene in Unity, we can:
view Unity's Game view in the browser by typing MeshSyncServer's IP address and port in the URL box (the default is 127.0.0.1:8080).
send a message from a message form in the browser to Unity's console.
Caveats
Necessary MeshSync assets are automatically created in StreamingAssets/MeshSyncServerRoot. These files should be left as they are.
Although this package is designed to be used in the Editor, model syncing will still work in runtime as well, except for the animations.
For performance reasons, make sure that syncing is not executed in the final build, unless it is required.