Second Life Max Prims 26/27

UPDATE: the latest is now 0.9.27. Follow forum link to download the latest.

At last. Here is a version that might be worth trying.

I’ve tested it with a few objects, and as you can see, it works to a large extent:

Smoke Test

The smoke test finally created 6 objects. And then I tried it with a larger set of objects.

Here is the larger test case in max.
Larger set in Max

And here they are in Second Life:

First big test in SL

First Observations:

  • Looks like native Max positioning and rotation work like a charm.
  • There seems to be a disagreement about what “twist” means between the prims and SL.
  • Everything else looks like it works in SL. At least that this panel tests.


Install and use with Max 6-9

  • Copy all the files from the zip to maxscriptsstartup and restart max.
  • Find the SLPrim object under the creation panel pull-down under “Second Life”.
  • To create a prim, select the SLPrim object and then click and drag in the viewport. Probably the top viewport is best. Right click to stop creating objects.
  • Use the modifier panel to modify the objects as you would expect.
  • Modifiers may be added, smooth and normals maybe interesting. See below in workarounds.
  • You may save and reopen max files with SLPrims in them. As long as you have the SLPrim maxscript file in startup, these files should open and render the objects. If the maxscript file is missing, you will see errors about the objects.
  • To export the primitives to a text file, in the utilities panel choose MaxScript and then Second Life Export from the pull-down.
  • You may export all or only selected objects. All objects that are not SLPrims are ignored with no error.
  • Import as with any other prims of these types. See the Second Life forums for instructions about finding the importer and using it.

Caveats:
There are some caveats for max however:

  1. This was developed under max6 and tested with max7. It won’t work in max5 or earlier since it depends on a feature of being able to shorten an array by assigning array.count = value. Max5 and earlier do not support this.
  2. Positioning, rotation, copying and instances should all work in max in the native manner with these primitives.
  3. Do not use max scaling since the exporter takes no account of the scale of the object.
  4. Set your custom units to meters before you start building any objects. That way the size in the panel for meters will be the same size as objects inside max.
  5. You are free to use any other max objects in the scene that you like. But of course they are ignored when the objects are exported.
  6. You should build your scene well above [0,0,0] since the importer object will build all objects relative to that point. The importer cube object ends up at [0,0,0] so any object there will cover it up.
  7. I have not tested building objects that are farther than 10m in extent. The “point” dummy was sized to 20m[sic] to provide a 10m box as a guideline. The point object’s box is apparently 1/2 the size of the point itself.
  8. If you have too many objects for a reasonable import, you can export selected. Grouping of SLPrims should work fine. I’ve not tested this yet, but the exporter should look through all grouping and linking to find the SLPrims to export them.
  9. You are free to apply modifiers to the SLPrim objects. Of course any shape or texture modifiers won’t be exported. It may be interesting to apply smooth or normal modifiers to the objects since at this point they don’t work exactly as you expect.

Release Notes:
The prims mostly work at this stage, but there are a few known problems:

  1. Sphere – with cut the second end does not render. See workaround (1).
  2. Torus, ring, tube – inside flap is visible when you cut, and causes wrinkle in surface. See workaround (2).
  3. Torus, ring, tube – one cut end is not smooth. See workaround (2).
  4. Taper x,y – reversed for Torus,Ring,Tube. Gee is it like this in SL?? Or the original prims? Not sure.
  5. Twist looks wrong based on testing with SL. Looks like a basic misunderstanding about what twist means. Might be a radians / degrees mismatch since max uses degrees and Blender uses radians. Twist is 0.0 to 1.0
  6. Torus,ring,tube – profile cuts don’t render correctly in max. The cut faces are left out on one side of the cut.
  7. SLPrims are very slow. 30 objects bogs down max quite a lot. This is surprising since once the objects are created, the script is not needed again. Meshes are created and are cached until any parameters are changed. I have built primitive objects in this way without noticing this issue. Investigation is required.
  8. Entering or changing the “description” is very slow. Each character typed causes a repaint of the object. Not sure how to fix this. Cut and paste of all text at once might be a workaround.

Workarounds:

  1. To render missing faces in the max viewports, force 2 sided in either of two ways: (a) Make a two sided material and apply to the primitive. (b) Configure the viewport to “Force 2 sided”.
  2. To show a smoother primitive in the max viewports apply a smooth modifier, choose “auto smooth” and set the angle for the appropriate rendering. You may have to change the angle when cut or profile cut is changed.

Download SLPrims 0.9.26

Download Examples for Max7

I’ve created a Forum for discussion and download of SLPrims.

I hope you find this useful. Any feedback or comments are welcome in the forum.

Cheers,
Windyweather VanAlten