mcjSuperLathe v 0.7

for DS 1,2,3,4

Version History

Mar 1, 2019, 4:16 AM Safer :refuses to build a morph on subdivided surfaces which rendered scene files un-loadable

2012 Jun 25 06:48 v0.07 the DS3/DS4 script has d-Form handling functionality

2012 Jun 21 06:41 v0.06 For DS1 and 2 ( briefly tested on DS1.8) and important patch to the DS3/4 version

2012 Jun 19 23:50 v0.06 launched, manual for v0.05 archived and downloadable, started rewriting the manual for v0.06

2012 Jun 15 13:23 v0.05 corrected case where the used did not install the presets folder, default curve now usable

2012 Jun 22:36 v0.05 fixed bend deformation issue introduced in v0.04

2012 Jun 15:04 v0.04 fixed selection type issue introduced in v0.03, increased occasions when the gizmo gets auto-updated

2012 Jun 14:52 v0.03 added mechanism to enforce top-down rule for Scale/Shear/Twist/Press effects

2012 Jun 13:03 v0.02 all deformers now use the getMeasured() function to get interpolated data, faster with 0.1% precision

2012 Jun 10 01:18 v0.01 added the curve presets folder: "scripts\mcasual\mcjSuperLathe_presets"

2012 Jun 9 23:58 v 0.00 initial release

Installation

You will find the zip package in the attachments section at the bottom of this page.

it's a zipped Scripts folder, unzip it in your Daz Studio content folder

typically, this means c:\program files\daz\studio\content.

Once this is done, the script will appear in the Studio / Scripts / mCasual folder

Instructions

Select an object in the scene

the script works best with very tessellated geometry

for our example we'll create a primitives-cylinder, 8 sides, 32 segments

select the cylinder and start the script

In the scene a translucent panel should appear to the left of the cylinder

we'll call this panel "the gizmo"

It serves as the deformation axis for the different deformations

The curve shown in the script's graphical area and drawn in cyan on the gizmo

will be any curve you wish, and it will control the deformations.

Using D-Forms in conjunction with mcjSuperLathe ( new in version 0.07 )

If you select a Daz Studio D-Form, mcjSuperLathe's deformers will be modulated by this D-Form's field.

For example, if the D-Form field encompasses the upper half of an object, only the upper half of this object

will be affected my deformers you create using mcjSuperLathe.

All objects that are part of the D-Form ( which were selected when the D-Form was created or were later added to it )

will be subjected to mcjSuperLathe's deformers.

You could, for example select the legs hip and abdomen nodes of a figure's skirt, create a D-Form,

then move the D-Form field do that it only encompass the front of the dress.

Select this D-Form, launch mcjSuperLathe and use it to add wrinkles to the skirt.

some examples of a D-Form field being used by mcjSuperLathe

The Scale Deformer

In the "Deformer" section, select the deformer Type named "Scale".

Also in the "Deformer" section, from the "Place Gizmo" list, select the "Front Right" option

the gizmo is now in front of the object and oriented to deform the object laterally

Press the "Create Morph" Button, a few seconds later the deformation is applied to the object

this deformation is in fact a new morph

lets go in the parameters tab

the new morph has a name related to the settings used for its creation

you'll probably want to turn it down to 0 % if you intend to add other deformations

you can also use the "zero morphs" button for this.

the magnify parameter

by default, the "Magnify" parameter of the deformer is set to 1

here is the result of using the same curve, but with "Magnify" = 2

the profile of the object now perfectly fits the profile of the curve

so far the "Domain" parameter of the deformer was set to "Symmetric"

lets change it to "Radial"

well yes the effect was felt radially ( all around ) but maybe not as expected

you can clearly see that the effect is centered around the white line of the gizmo

in the "Place Gizmo" list, select "Y-Radial" option

the gizmo ( shown in transparency) moved to the center of the object

and when we apply the Scale/Radial effect, we now get:

here is the Scale/Symmetric effect using .... a 32x32x32 cube

The Twist Deformer

here i changed the Deform type to "Twist" and ....

i also changed the number of "turns" from 1 to 16.

On the left you can see the non-deformed object which was created using mcjPrimMaker

Note: in mcjSuperLathe V 0.06, rotations of the gizmo are ignored

you should probably use the "X-Radial", "Y-Radial" and "Z-Radial" gizmo placement.

The Shear Deformer

The Shear deformer pushes the object's vertices according to the curve you draw

here the deformer's domain was set to "Positive"

Shear with "Domain" set to "Symmetric"

Shear with Domain set to Radial ( the gizmo was centered on the object )

The Press Deformer

The press deformer is kind of brutal, it presses the vertices of the object against walls having the shape of your drawn curve.

a bit like a centrifuge come to think of it.

here a Press deformer was applied to a cylinder

the gizmo was centered on the object, using the "Y-Radial" placer

The Bend Deformer

The bend deformer was a lot of work to program.

it takes the object and stretches it along the path of your drawn curve

example, i create a 4-sided, 256-segments tube, made using mcjPrimMaker and i bent it along a guitar shaped curve.

as you can see on the left, the original object was 1 meter long, and had to be streched t0, maybe 3 meters to fit this curve

note that the "Bend Adjust" parameter was set to "None"

if we set "Bend adjust" to ... ... ... ... oops this option is broken ... it will be back in version 0.07

The AxiScale Deformer

this deformer acts around the white-line/axis of the gizmo

you could call it the "cam" or "gear" deformer

here i started with a daz studio primitive, a 256-sided 1- segment cylinder, 1 meter tall, 1 meter diameter

i set the "Teeth" parameter to 8 ( so we'll have 32 faces per tooth )

magnify was set to 2 and does have an effect

here are other shapes you can obtain using AxiScale

the clover is easy to figure but the heart ?...

... well it was actually this simple curve with a 1-tooth setting

The Cutout and Thick-Cutout Modeler ( aka cookie maker )

This is not a deformer, just like the Lathe it creates a brand new object/prop from a closed curve.

select an object at random ( this requirement may be removed in the future

the selected object wont be affected

launch the script

create a closed curve

in the "Export" section of mcjSuperlathe, check-mark, or not, the "thick cutout" check-box

increase the "num segments" slider if you want rounder cutouts

click on the "Save cutout" button

select a location and name for your new .object

Now you can use Daz Studio's "File/Import/Wavefront" menu to load the object,

Using the "poser units" setting, the object will be 1 meter thick

The polygon formed by your curve can not self-intersect,

otherwise the resulting object will be defective.

a curve like this will not work

which made it difficult but not impossible to obtain this cutout

Drawing your own curves

The Blackboard

The large graphical area is called the blackboard.

The 5 blue dots are called the knots, they control the shape of the curve.

The red dot is the currently selected knot.

The yellow dots show the subdivisions used when exporting a shape as an .obj.

The knots list-box

This list-box in the upper-right corner of the UI contains the list of the positions of the knots that define the curve.

The position of the currently selected knot (red dot) is highlighted in orange.

The lower left corner of the blackboard is at ( -0.5, 0 ) and the upper right corner is at ( 0.5, 1.0 )

When your curve contains many knots, this list-box is a practical way to select a knot,

You can then use the "move selected" mouse-mode to move it around.

The mouse-mode selector

The first tool in the "Curve edition toolbox" is the "mouse-mode" selector.

It lets you specify how the mouse clicks are interpreted

By default the mouse-mode is "Move Nearest"

If you left-click anywhere on the blackboard, the nearest knot will jump to this position

and mcjSuperLathe will rebuild the smooth curve.

The moved node automatically becomes the selected node.

"Select Nearest" will select the nearest node without moving it.

The Action Selector

Just below the mouse-mode selector is the actions selector.

it immediately performes the selected action

Action : Insert after selected

The currently selected object is highlighted in the Knots-List and marked with a red dot in the blackboard

the new knot will be inserted between this knot and the following one.

Action : Delete selected

The currently selected object is highlighted in the Knots-List and marked with a red dot in the blackboard

The first and last knots cant be deleted.

Action : Harden/Soften knot

The segment of the curve between the current knot and the following one will be a straight line instead of a spline.

This option is not correctly implemented in V0.06

Action : "Load Backdrop" and "Grid Backdrop"

By default the "blackboard" area uses a simple black backdrop with a graticule.

Using the "Load Backdrop" button of the "Curve Edition Toolbox", you can apply an image as the backdrop.

The "Grid Backdrop" button returns you to the black backdrop.

You may want to use a paint program to center the reference image, reduce its brightness and contrast and make it square.

Action : "Add as Preset",

Action : "Load Preset",

Action : "Load curve"

Action: "Save Curve"

You can use the "Load curve" and "Save Curve" buttons to save and load your curves anywhere on your disks.

The "Add as Preset" and "Load Preset" buttons also save/load the curve,

but in a very specific folder named "mcjSuperLathe_presets".

If mcjSuperLathe was installed properly, this folder is located in the same folder as the script itself.

The "Closed Curve" check-box

The "Closed Curve" check-box will weld the first and last knots of the curve together.

This will help you create ring objects.

This mode is only accessible for the "bend" deformer and the cutout builder

The "Weld top row" and "Weld bot row" check-boxes

This will add curvature to the curve's extremities, as if the curve continued running through a mirror image of itself.

Exporting curves as wavefront objects (.obj )

The "num. sides" slider lets you specify how many sides the lathed object will have.

i found out that 32 sides gives a very smooth appearance.

The subdivisions" slider sets the number of times the curve is subdivided between the control knots .

The yellow dots along the curve shown on the blackboard represent those subdivisions.

So a high number of subd's like 8 gives us a very smooth result while a value of 1 gives us a rough (but lightweight) result.

examples

on the left : num. sides= 8 and subdivisions = 1

on the left : num. sides= 32 and subdivisions = 8

If you click the "Save Obj" button, mcjSuperLathe, builds the object, and writes it in an .obj file.

This .obj file can then be imported back into Daz Studio ( File/Import/Wavefront Object (.obj;.obz)

The number of polygons (faces) of the resulting object is given by

number of faces = ( number of knots - 1 ) × number of subdivisions  ×  number of sides

For comparison, the Daz Aiko3 figure is 74000 faces

Exporting curves as SecondLife sculpties

The "Save sculpty" button lets you export the object as a 64x64 pixels image that SecondLife can read,

meaning, yes, that your creations can be tele-transported into SecondLife verse :)

and since the proof is in the pudding,

here's our bottle in the demo area of the world famous "help Island" of the SecondLife Universe!!

For best results, save your sculpty using a loss-less image format like bmp, tga or png ( not jpg ).

This little 64x64 pixels image when uploaded to SecondLife for $10L, then applied to a "prim" becomes the bottle you saw on help island.

More Examples

using the shear deformer to create a doorway

bottles created by deforming a "thick tube" created by mcjPrimMaker

Thick cutout, the image from the gizmo was used to create the image on the cutout object

the gizmo is a bit like a lathe's chisel, outside its blade, the object is unmodified

starting with objects more sophisticated than a tube gives more interesting results

License

//===================================================================

// by mCasual/Jacques

//===================================================================

// Copyright (c) <2012> <mCasual/Jacques>

// Permission is hereby granted, free of charge, to any person

// obtaining a copy of this software and associated documentation

// files (the "Software"), use the software and copy the source code.

//

// We do not allow selling or reselling of the unmodified software.

//

// The above copyright notice and this permission notice shall be

// included in all copies or substantial portions of the Software.

//

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES

// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND

// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT

// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,

// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR

// OTHER DEALINGS IN THE SOFTWARE.

//===================================================================