User:Patchouli Woollahra/Lightwave Sculptie Rendering

From Second Life Wiki
Jump to navigation Jump to search

Requirements

Any version of Lightwave with:

gradient maps as a map type
native UV mapping support
Surface Baking implemented

is immediately usable to pull this off.

Modeler steps

In Modeler, create at least one UVmap on a new object instance. rez out a square (or squaroid) plane with 8x8 segments, flat, and enable 'Make UVs' as an option when building the square. if the Make UVs fubar, just do a planar map on one of the major axis using the normal 'Make UVs' command instead. Don't bother to resurface the prim: Sculpties only have one UVmapped surface to work with Shift the plane away from the Y-axis and then, using the Bend tool and starting from the line representing the Y-axis in the X-Z plane, slowly curl the plane into a open-ended cylinder

(this is a shortcoming of this lame workaround: it doesn't account for SL's tendency to cap the prim formation when it's done)

Save a copy and then do any future sculptie work on a spare copy of this geometry. Alternatively, create new endomorphs everytime you wish to work on a new sculptie in the same object file.

Layout Steps

Positioning

Rez out a null in the exact centre of a fresh scene file. I usually call mine "SculptieRef" but you can call it anything you like as long as you can remember it.
Load up the cylinder/plane/whatever you built up in the end. position it in such a way that none of the points on the sculptie object cross any of the XY, YZ or XZ planes in world.
This step is important as Lightwave unfortunately does not have a way of surfacing a object based on distance AND direction from any object right out of the box.

Surfacing

Go into the Surface Editor and create the following three layers in the surface for the object:

Set the surface of the sculptie to 100% luminosity, 0% diffuse, 0% specularity. Use pure black (0,0,0 RGB) for the surface as a base.
Gradient, X Distance To Object, specify the 'sculptieref' null as the reference point, and set the gradient up with pure black at 0m and R:255 red at the other end of the gradient (your preference for what size you want to work on the sculptie at will determine this comfy region. Set this layer to blend in 'Add' mode.
Gradient, Y-Distance To Object, same null as reference point, gradient with pure black at 0m and pure green (0,255,0) at the other end of the gradient, across the same distance as the first gradient. Set this layer to blend in 'Add' mode.
Gradient, Z-Distance To Object, same null again as reference point, gradient as with the last two except using Pure blue (0,0,255) on the far end of the gradient, additive blend as well.
Add a 'Surface Baker' shader to the sculptie surface as well. Configure it to bake out only the color, and only to a 64pixel-wide square, in order to save time when rendering the sculpture map.

What the four layer surface I specified above attempts to create an approximate RGB blend in the manner that Sculpties require to define their shape. The baker is added in as a final step to capture the resulting fake sculpture map that will be generated by the multilayer surface.

Exporting the map from LW

Ensure that you're rendering on only one thread (LW hates multithreaded renders unfortunately) and rendering as small a frame as possible (The render is irrelevant when generating sculptie maps). As part of the render process, the system will save out the baked map to the location and filename as specified in Surface Baker.
Take the resulting output from Surface Baker and upload it into Second Life as per a normal image file, apply as a sculpture map to a sculptie. Serve with scripts/bling/physics as required by your build.
Occasionally, you may find that a sculpture map generated by this method accidentally produces a sculptie that is turned inside out... if this occurs, flip the sculpture map in a image editor and use that instead.