MegaShapes Multi Material

multimat1
The Multi Material Layer allows you to do a loft with a cross section spline along a path spline like a simple loft but will use the ID values in the cross section spline to define regions of different materials.

Simple Loft General Params

Main Multi Mat Params

Name

Name of the layer.

Enabled

Un checking this will remove this layer from the loft object and hide most of the inspector for it.

Color

Color to tint the inspector for this layer, makes finding the layer you want easier on complex loft objects.

Lock

Sometimes you will want to have the loft object update in realtime but maybe not all the layers actually change, if you check the Lock option then during a rebuild the layer will not recalculate its contribution to the mesh but will just use the last lot of vertices it built so greatly speeding up the mesh creation for entire object. So useful if you have a complex race track loft object and just want to deform a crash barrier layer from it, so you would lock all the layers except for the one to change, update that then lock it again.

Material

The material to use to render the faces built by this layer. Unused.

Path

The path along which to loft the cross section shape.

Curve


If the selected path contains more than one curve a slider will appear allowing you to select which curve to use.

Start

The start position along the path shape to start building the layer, 0 is the start 1 is the end, values outside this range will either loop for closed shapes or extrapolate past the ends on open shapes.

Length

The length of the loft along the path, 1 is a full length of the path loft, the length value is added to the start value to find the actual end value, so if this is outside the rang 0 to 1 then the layer will either loop or extrapolate past the ends of the path.

Dist

This is how far to step along the path before building a new line of vertices, the smaller this value is the more vertices are produced and the smoother the end result.

Offset

The loft can be offset from the path by changing these values. Also there is an option to control the offset along the length of the loft from curves for the X, Y and Z directions.

Use X Offset

Check to use a curve to define the amount of x offset from the path along the length of the path shape.

Offset X

The curve to describe the amount of x offset.

Use Y Offset

Check to use a curve to define the amount of y offset from the path along the length of the path shape.

Offset Y

The curve to describe the amount of y offset.

Use Z Offset

Check to use a curve to define the amount of z offset from the path along the length of the path shape.

Offset Z

The curve to describe the amount of z offset.

Frame Method

In some cases you can get unwanted twists in the loft if the path spline loops on multi axis, you can sometimes remove those by changing the Up value for the loft, but if not you change to a new Frame method here which will remove the twists but may mean closed splines may not match at the ends, in that case using the twist curve can fix that.

Use Twist

Tell the system to use the twist curve below as well as any twist values defined on the splines themselves, with this off the system will ignore knot twist angles.

Twist

The amount of twist to be applied, the value will be multiplied by the curve below.

Twist Crv

The amount of twist to apply along the length of the path spline.

Add Material

When your cross section spline has multiple IDs you can add materials here which you can then match up to the id in the knot values. To change a knot id select the spline in the editor, then in the inspector open the spline data then the knot section and you can then set the ids for each knot.

Materials

This will show all the materials that are currently applied to the loft.

Open Cross Params

Open the Cross Section params.

Open Conform Params

Open the conform params.

Materials

Material Params
When you click the Add Material button a new entry will appear here and you can then define the UV mapping, the vertex count, and color blending for that material.

Enabled

Says whether to include this material in the loft, with this off no polygons will be added to the loft for any section that uses the ID below.

ID

The knot ID that will use this material.

Material

The material to use for the loft.

Cross Dist

The distance to use to make the next vertex at along the cross section, lower values will result in a smoother mesh and more vertices.

Include Knots

If the Cross Dist value is quite large you can lose some of the detail in a cross section, if you check this option then the cross section will include all knots on the shape in the cross section regardless of cross dist, this is also handy to make sharp edges for say a wall.

UV Offset

The Offset into the texture map to start the mapping from.

UV Scale

The Scaling of the UV coords, smaller values will zoom in on the texture map, values greater than 1 will start to tile the texture, negative values will flip the texture.

Swap UV

Will swap the u and v parts of the mapping.

Physical UV

If this is on then the actual vertex values will be used for the mapping, this can make it easier for some mapping cases it will also mean that the uv mapping will keep the scale of the texture map constant, so if you expand a loft the texel size will remain constant.

Calc Y

With Calc Y on the system will calculate the Y UV value based on the settings for the UV x value, this makes it easier to control UVs on lofts where the length may change.

Cross Params

Cross Section Params
The params that control the cross section of the loft, such as the shape to use, and scaling options.

Section

The shape to use as the cross section.

Curve


If the selected path contains more than one curve a slider will appear allowing you to select which curve to use.

Cross Start

The start position along the section to shape to start the loft from, 0 is the start of the shape 1 is the end, values outside 0 to 1 will either loop or extrapolate the shape.

Cross Len

How far along from the start to build the layer to.

Cross Rotate

You may want to rotate the cross section before it is used in the layer creation, you can define any rotation you want here.

Cross Scale

You can also scale the cross section before it is used.

Pivot

The local offsets of the knots can also be changed before the shape is used in a layer, useful to line up sub curves in a shape.

Use Scale Curve

The amount of scaling of the cross section can also be curve driven for the length of the layer, check this to allow use of a curve to drive the scaling.

Scale

The curve to define the scale along the length of the loft layer.

Offset

The scale curve can be quickly offset along the path by adjusting this value, useful for simulating say a ball being squeezed along a bulging pipe.

Separate Scale

You may want to have a separate scale curve driving the X and Y scaling, check this to enable a separate scaling curve for the Y axis.

Use Scale Curve Y

Turn on the use of the second scale curve for the Y Axis.

Scale Y

The curve for scaling the Y Axis

Offset

The offset along the layer path for this Y Axis scale curve.

Conform Params

Conform Options
Params that control the conforming of the loft layer to a selected object.

Conform

Says whether this layer will be conformed or not.

Target

The collider to do raycast against.

Amount

How much of the conform will be added, if 0 then no conform at all will be applied, if 1 then the loft will conform totally the collider.

Ray Start Off

How far above the loft the rays start, 0 will usually to fine.

Conform Offset

When the loft is conformed totally you may get some poke through of the collider object, changing this value will move the loft of the conform object.

Ray Dist

How far the rays will be cast, if you are not getting a correct deform it may be your distance is not enough.

Video Showing how to use the Multi Mat Loft Layer

This video guides you through creating a race track using the Multi Material Layer.
Multi Layer Video

You must be logged in to post a comment.