Extensions:Uni-Verse/Verse4Max
目次
Introduction
This plug-in makes it possible for Autodesk's 3ds Max to exchange data with a Verse server in real-time.
Overview
The design of the plug-in tries to be as close to what Max users are used to as possible. The main interface to the plug-in is a roll-up in the "Utilities" panel of Max. From there you connect to servers and get information about your connections and the servers. Apart from this roll-up, you shouldn't notice any major differences from how you would normally use Max, unless you want to. There are two modes of operation for the plug-in, automatic or manual. In automatic mode everything is done under the hood, invisible to the user. This is easier for the user but isn't as flexible as the manual mode. In the manual mode, nothing is done without the user first saying so. The current implementation only supports the automatic mode. If not otherwise noted, the rest of this document will describe the automatic mode.
Connecting
To get started you need to connect to a Verse server somewhere. You do this through the "Utilities" panel called "Verse". It looks something like this:
In it you enter the server address or name, optionally followed by a colon and a port number, to connect to and your username and password for that server. The plug-in will remember the last address and username you used. You also have the option to select what mode you want to use. This selection is currently disabled since the manual mode isn't working yet. When you have entered the necessary data you press the "Connect" button to try to contact the server. The status field at the bottom of the roll-up should tell you what is going on. When it has managed to log in to the server it should say "Connected". If you have chosen automatic mode and there are objects on the server, they should start to appear in the scene after this. You are now ready to share data through Verse.
Manipulating geometric objects
When you create a new object in Max, the plug-in will sense this and create a proper Verse object out of it. That is, an Object Node linked to a Geometry Node by a link called "geometry". It will also name the Object Node the same as the Max object and keep the names in sync. If someone else creates a proper Verse object on the server, the plug-in will insert a node of type "VerseObject" into the scene in Max and keep its geometry in sync with the geometry on the server. The "VerseObject" node type is one of the few visible additions by the plug-in. It represents geometric objects where new geometry has come from the Verse server. Regular objects in Max, including modifiers that had been added to the object, will be converted to VerseObjects when someone changes them on the server, like this:
Also, if you add a material to an object in Max the plug-in will create and link a Material Node to the object in Verse, and vice versa. The plug-in currently doesn't handle the Verse's fragment trees yet, so you only get empty/default materials.
Handling other Verse object types
The plug-in also has support for some types of non-geometric objects that Verse has, namely light sources and cameras:
Light sources
When you create some kind of light source in Max the plug-in creates an Object Node in Verse and keeps the light intensity and position in sync between Verse and Max. The light source in Verse will always be a point source, no matter what kind of light source you create in Max, and the plug-in will always create light sources of type "Omni" in Max.
Cameras
If you create a camera in Max, the plug-in will create a camera object in Verse. The attributes that are supported are ortho mode, FOV, focus distance, near and far clipping distances only. All other attributes will be ignored and left at their default values, if available.
How different objects are handled
Geometric Objects
Structure
The plug-in creates proper Verse geometric objects on the server and only imports those that it can understand. Currently this means an Object Node linked to a Geometry Node with a link called "geometry". It does not yet properly support hierarchies of Object Nodes or multiple Object Nodes linked to the same Geometry Node. One Material Node linked to the Object Node is also supported, but if there are more than one only the first is used.
Geometry updates
If you create an object in Max it will remain a normal Max object as long as possible. This means that you can use all the features of Max's construction history for that object until someone else modifies that object on the Verse server. When this happens, the object's construction history will be collapsed to a single VerseObject with the geometry as seen on the server. This will not happen while the user is editing that object, though. During editing all changes to the edited object coming from the server is ignored. In the current implementation the user has to not change the object for a fixed amount of time before it's construction history can be collapsed. When the object times out, the geometry on the server will contain both the changes made in Max and those made by other users since the last change in Max. This means that Max will override changes made to the same object by others while it is actively being manipulated. The plug-in also throttles the changes sent to the server so that Max will stay responsive and so that the network isn't flooded with updates.
Materials
Material Nodes will be created and linked to the Object Node with a link called "material" when the user adds a material to an object in Max. Material Nodes created on the server will currently map to a standard material with default values in Max.
Light sources
The simplest light source in Verse is just an Object Node with a non-zero "light intensity" attribute. This is fully supported in the current plug-in and generates an "Omni" light source in Max. The plug-in does not handle more advanced types of Verse light sources, like one with geometry. It will simply behave as one without geometry.
Cameras
A camera in Verse is an Object node with a Tag Group called "camera". Inside this Tag Group the camera stores attributes that describe it. The Tags used by the plug-in are field_of_view, focus_distance, clip_near, clip_far, and orthogonal. The type of camera created in Max is one called "Free".