Prim Composer - FAQ
Last Edited: 2008-09-20
Creating Prims
Prims are created in 3ds Max using the normal Create Panel. Select the Create Panel and in the Geometry category select “Prim Composer” from the menubox.
This opens the Prim Composer creation rollout with buttons for creating each of the types of prims supported by Second Life: Box, Cylinder, Prism, Sphere, Torus, Tube, Ring, and Sculpt. Pressing these buttons will open type-specific rollouts for creating each type of prim.
After pressing one of these buttons, you can adjust parameters specific to the prim type and then click in one of the viewports to create the prim.
Units Setup and Homegrid
To make things easier, set your 3ds Max unit and grid settings to meters since that is the unit of measurement in SL.
From the main menu at the top of 3ds Max:
- Customize -> Units Setup
- Customize -> Grid and Snap Settings.. -> Homegrid
In Units Setup, change the Unit Scale to Metric and select Meters from the menubox. In Homegrid, set Grid Spacing to something like 1.0 meter. You can play around with homegrid. Good values for Grid Spacing will depend on what you are building and how big it is. If you’re building small, then you might want a smaller spacing. Building big, a larger spacing.
Editing Prims
After you have created one or more prims, you can edit them as you would any other 3ds Max scene object. Select a prim and activate the Modify Panel to see the edit rollouts for that particular prim. Prim parameters, such as path cut, twist, taper, and hollow, are the same as in SL.
You can also move, rotate, and scale prims using the standard 3ds Max gizmos. If you have a group of prims selected and you scale the group, the scaling will be limited by the largest or smallest prim in the group.
It is always safe to scale prims proportionately in all dimensions simultaneously. However, care should be taken when scaling in a single dimension as this can produce results that will not export to SL. If you scale in one or two dimensions, you need to be sure that you are scaling the prim within its local coordinate system to avoid problems.
There is also a small quirk to be aware of. If you scale prims and one of the prims exceeds the minimum or maximum size, Prim Composer will prevent the prims from scaling further. However, the viewport doesn’t always update immediately. Move the mouse over the gizmo or move the viewport to force a refresh.
Instancing
3ds Max’s instancing mechanism is fully supported. You can create instances of both regular prims and sculpts. One huge benefit to creating instances is that it reduces the number of sculptmaps that will be uploaded to SL. Five identical copies of the same sculpt will result in five sculptmaps being uploaded to SL at a cost of L$50. Five instances of the same sculpt will result in only one sculptmap being uploaded to SL at a cost of L$10. Thus, instanced sculpts are a great way to reduce texture upload costs.
Creating and Editing Sculpts
Creating a sculpt is a little bit different in Prim Composer compared to Second Life. In the creation rollout, a sculptmap is displayed with a Change button under it and radio buttons for the topology. By default, it creates a sculptie shaped like a sphere. To create a different shape, press Change and then select a sculptmap from disk. Prim Composer comes with some pre-made sculptmaps to get you started. Look in the “sculptmaps” folder of the downloaded zip file.
When you click in a viewport, it creates a 3ds Max EditableMesh using the sculptmap and topology selected. Once created, the topology (sphere, plane, etc.) of the mesh cannot be changed. You can edit the mesh at the vertex level or add modifiers that move vertices around. You can also convert it to EditablePoly.
In the edit rollout of a sculpt, there is another topology radio button that lets you select the export topology of the sculpt. This lets you create a sculpt with one topology and then export it in a different topology. However, changing the topology here will not change the topology of the mesh in 3ds Max. It affects the exported sculptmap only.
Menu
Prim Composer also adds a new menu to the top of 3ds Max. From here, you can access common functions within Prim Composer, such as export and preferences.
SculptGenMax
Although Prim Composer mostly replaces SculptGenMax, you can still access it via the menu. However, do not use SculptGenMax unless you know that you need it. It is provided for use by advanced users only.
Groups and Linksets
Hierarchical groups within 3ds Max are fully supported. In 3ds Max, you create a group by selecting several prims, then clicking the 3ds Max “Group” menu at the top. Groups can contain prims as well as other groups. Groups can be nested to any depth; however, the nesting of groups is not exported to SL. Only bottom-level groups are exported.
When a group contains only prims and no subgroups, it is exported as an SL linkset. Its prims will be automatically linked when they are imported to SL. The last prim that is selected in 3ds Max before they are grouped will become the root prim of the linkset in SL.
If a prim is in a group, but that group also contains subgroups, the prim will not be linked in SL. This is potentially confusing because the prim is grouped in 3ds Max, but unlinked when it is exported to SL. For this reason, it is good practice to keep groups homogeneous. If a group contains prims, it should contain only prims so that it will be exported as a linkset. Prim Composer doesn’t enforce this convention, but it will warn you during export if a prim has been “orphaned” because it is in a heterogenous group.
Texturing and Baking
For information about texturing and baking in Prim Composer, please use these links:
Exporting Prims
After you have created a number of prims and modified them to your satisfaction, you can export them using the Prim Composer menu. Select the prims and/or groups that you want to export or use Export>All to export the entire scene.
When exporting, Prim Composer ignores any scene objects that were not created by it. The export dialog shows how many prims will be exported (linked and unlinked) as well as the number of linksets to be exported.
Prims are exported into a project folder that contains an xml file and a sculptmaps subfolder (if one or more of the prims are sculpts). The location of the project folder and its name can be set in the export dialog via the Save to Folder and Project Name fields. The Save To Folder is the directory in which the project folder will be created. The Project Name is the name of the project folder and is also used to name the xml file within it.
The dialog is closed by pressing either Cancel or Export and a report is generated at the end to summarize the results of the export.
Using Maxport to Import Prims into Second Life
The final step is to import the project into Second Life. Prim Composer includes a command line program for this purpose called Maxport. Maxport uses libsecondlife to login to Second Life as your avatar, upload sculptmaps, and create/link the prims that are described in the project xml file. By default, it logs into SL in the last location of the avatar and creates the prims 2m above the avatar’s head. Because it is using your avatar, you will need to logout of SL before running Maxport.
When running Maxport, you will need to tell it the name of your avatar, your password, and the path to the project xml file. The password is not stored or transmitted in any way except directly to the SL servers for the purpose of logging in and performing the import. But if you are uncomfortable about this, don’t use it. For your safety, never enter your password into a program that you don’t trust. Liferain.com is the only official source for Maxport. If you got it from somewhere else, don’t use it.
Maxport is a command line utility and does not have a user-friendly interface. It is fully documented here, but I understand that it will be intimidating to many people. A video tutorial will be coming in the near future and future versions will have a more user-friendly graphical interface.
Importing to OpenSim
Maxport works with OpenSim (yes!). If you are unfamiliar with OpenSim, I give a brief introduction in my March Status.
Installation of OpenSim is beyond the scope of this project and this document. Don’t ask me about it. Works with OpenSim version 0.5.8 and 0.5.9. Probably works with trunk.
In OpenSim, if you can’t find the imported prims, look above the avatar at a height of 128m. Use the –rz option to force Maxport to rez at a lower height. This used to happen all the time, but Beta 2 mostly eliminates the problem.
If you are using OpenSim with SQLite as the database, you may need to use the –delay option to slow down the import, since SQLite is quite a bit slower than both SL and OpenSim+MySQL. Use “–delay 10″ to start with and adjust up or down as necessary. Delay defaults to 1 and higher values make it slower.
Compatibility with similar tools
Two related tools for 3ds Max are SculptGenMax RC4 and SLPrims.
SculptGenMax is my previous tool for working with sculpties in 3ds Max. RC4 is not compatible with Prim Composer, but sculpts created with it can coexist in the same scene file with Prim Composer. Prim Composer includes a newer version of SculptGenMax to replace RC4. The new SculptGenMax is basically the same as RC4, but with some compatibility fixes. If you have sculpts in your scene that were created with RC4, they will be okay, but Prim Composer will not export them.
SLPrims is a tool for creating non-sculptie prims in 3ds Max. It is a port of Jeffrey Gomez’ Python script for Blender. Prim Composer is built on top of SLPrims, but is not compatible with it. SLPrims can co-exist in the same scene file with Prim Composer, but Prim Composer will not export prims created with SLPrims.
Limitations
Many of these are planned or under development, but are not yet implemented.
- SL-specific physical properties such as temp-on-rez, phantom, physics, and material can be set in 3ds Max, but do not export.
- SL limits the distance between linked prims. Prim Composer currently performs no checks to verify that a linkset in 3ds Max is within the link distance allowed by SL.
- Other SL-specific properties such as flex and light cannot be set in 3ds Max.
- The tiny sculptie feature of SculptGenMax is not supported in Prim Composer. You can still use SculptGenMax to create tiny sculpties, but they will not be exported properly by Prim Composer. Workaround: use SculptGenMax to generate tiny sculptmaps, then save them to disk and upload them manually to SL as before.
- You can’t change the center of a sculptie. For example, you might want to make a door sculptie that pivots on its edge to make scripting the open/close rotation easier. Not yet supported.
- Known Issue (3ds Max): Mental Ray has a problem baking with the mr Photographic Exposure Control. Use the Logarithmic Exposure Control instead. (see issue report).
- Known Issue (3ds Max): Do not scale instanced prims greater than 10m or less than 0.01m. If you do, they will all revert to the same scale and position. This warning only applies to instances and only when you scale them out of the 0.01m-10m range. (see bug report).
- Known Issue (Maxport): TGA textures are not uploaded properly to SL/OpenSim. 24-bit textures get converted to 32-bit, giving them an alpha layer. It doesn’t affect the way that the textures look, but they are treated like alpha textures by the viewer and “fight” with other alpha textures to be on top. Recommend using PNG textures instead.





