bone rigging FAQ

gordonbaty

New member
I've been keeping notes on what works and what doesn't for bone rigging and exporting it for Shockwave (W3D). Maybe people will find this useful, and if you can add it to please do. I'll probably get around to making a UV mapping FAQ at some point too, although it seems to be less complicated than bones.

NOTES
-- the key to making rigged W3D files in LW is understanding what is supported by the W3D file format versus features other features of Lightwave
-- subdivision modelling will be frozen as a simple non-subd mesh on export to SW3D - it's better to start with a non-subd mesh
-- Bones affect points based on weight maps only (turn off and don't use any LW features for bone influencing that aren't related to weight maps)
-- A point can only be affected by one bone. In the weight map this has to be 100% influence.
-- There must be one unique weight map per bone
-- Bones are usually seen drawn out in a skeleton shape, but I've found better results by placing the bones at the joint positions and laying them parallel to the ground (thanks Petterms for that idea) then using them as rotation levers
-- The rest position and rotation of the bones is defined by their position and rotation on frame 0 by the W3D exporter. The LW options for setting position and rotation are not the same and shouldn't be used.
-- IK doesn't export to W3D and needs to be baked as keyframe animation (which requires a plugin)
-- morph targets aren't supported by W3D
-- I find it easier to create bones in Layout, but if you need to reference the bone positions in modeler you'll need a plugin to import the bones as skelegons into the object file.


WORKFLOW
1. Modeler

-- Create 1 Weight Map of 0% or 100% for EVERY bone you will have (use the Bone Weights button if creating all from scratch)
-- Ensure all Weight Maps have the IDENTICAL name as their Bone
-- Delete any Weight Maps or bones that are not in use
-- Set Weight Maps to 0% (cull) for any bones that will not influence the mesh
-- Check Weight Maps for overlaps (open Vertex Maps panel and select multiple maps to see overlaps)

NB If the model is built in NURBs then you need to Freeze the model before working on weight maps (or just don't use NURBs...)

NB The last few weight maps on the list (alphabetically) may not export to W3D. Put in a few dummy weight maps at the end of the list to safeguard your necessary weightmaps (eg, 'xdummy1', 'xdummy2' etc.)

3. Bones creation in Layout

-- in Modeller do Send Model to Layout, and switch to Layout
-- Subpatch models: Click on the model (not a bone) and get Properties (p) -> choose Subdivision = Last (... or get strange deformations) + set SubPatch level to 2 (for display and render)
-- Create the bones. Place base at joint and lie horizontally or vertically.
-- Ensure the bones have the same names as the weightmaps (this way the weightmaps are automatically assigned to the right bone without you having to set them manually)
-- Do Utilities > Cmd history and enter the following commands

SelectAllBones
BoneWeightMapOnly
BoneNormalization
BoneStrengthMultiply

-- Double check that this has resulted in the following in Properties (p) for all bones:
Y Faster Bones - no effect?
Y Bone active (else won't deform mesh)
Y Use weight map only
N Weight normalization
N Multiply strength by rest length
N (...everything else...)

-- plus ensure Current Bone and Bone Weight Map are correctly matched
-- Check that Parent in Place (Edit/General options) is set to Yes and Ctrl-click in schematic view to create the parenting hierarchy
-- Do Setup > Modify > Orientation > Remove Pivot Rest Position (removes rest positions for all bones, which are not used by W3D export but will incur deformations if left in place)

Troubleshooting:
-- wierd 'spikes' when you move bones - there's a problem with the weight maps. If the spike tip stays static, there's a point with weight map 0%, else there's an overlap.
-- if model mesh is not deforming when bones move then try saving and reloading the scene - if that doesn't work try turning Weight Normalization on, then off again
-- quit Layout, reload and export as W3D cures strange deformations in export
-- check model (not bone) properties (p) set to Subdivision Order = Last if using subpatches
-- check correct weight map to bone pairings
-- check parentage is correct in bone hierarchy
-- check bone rotation / position is correct on frame 0
-- do Remove Pivot Rest Position and Remove RPR if you edited the initial bone positions on frame 0 and the mesh is deforming as a result
-- in Layout you can view all weight maps at once: give each bone a different colour, and choose weight maps in the drop-down above the viewport with no name
-- remember that the last few weight maps may not be exported - add some 'xxxdummy' weight maps

4. Posing
-- START A NEW FILE (keep the basic rig as an untouched source file)
-- make keyframes 10 or more clicks apart in in the timebar
-- do not make a pose at frame 0, as this is used as the rest position for the bones
-- use rotation only (haven't confirmed but I think translation moves don't export to W3D)
-- note that LW does H then P then B rotations in that order
-- export the model/rig as one W3D, animations as separate W3D

Lastly thanks to folks on the Lightwave/Shockwave forum who've helped me with a lot of this: petterms, mdoyle, Sam Horton :bowdown:
 

MentalFish

LScript minion
Always glad to be of help :)

Lately I have had success in having multiple bones and multiple and overlapping weightmaps pr point. I think I have to withdraw the statement that we have to assign only one weight pr vertex, and only one bone pr weight and so on. I am using multi bone/overlapping weightmaps, to deform the shape of a car without any issues...

If a rig does not work and you get weird deformation errors, keeping the weightmap clean makes it easier to fix, so the rule can still be: "if all else fails, then..."

:)
 

mdoyle

New member
Nice post. Glad to be of help and its a good read.

I have tried multiple weights with overlapping maps and it has work before but sometimes I just wonder if its by chance. Its something I have never fully tested.
 
Top Bottom