-
Notifications
You must be signed in to change notification settings - Fork 18
Axial Limitation Tracking Constraint
The angular transformation on the ctc is actually setting the plane on which the rotations will happen (XY of the final coordinate system), however the vector formed by the mod3 skeleton determines the point that the rotating system tracks. If the point isn't on the plane however, the system will be tracking on one additional axis. it's hard to explain but if you only apply the rotation on the ctc without editing the mod3 it's very easy to tell what's happening if you know this in advance.
In this sense one simply has to set the x basis vector of the ctc node to point to the next bone in the chain, it rotates around the z basis vector of the ctc node orientation, and you give it a range by rotating it around different values of the z
Start with a 2 bone chain where the child is above the parent on the Z axis and matches on the other two dimensions
[]
Start with the two node chain where the base node has the -90,YY,90 transform (YY defines the angular limits of the rotation around our axis, values of 0 and 180 make it so it can only rotate in one direction (clockwise or anticlockwise), 90 means it can do a full turn in either direction, values around 45 are recommended to avoid some degenerate behavior though, 90° can have issues reorienting itself at times.
[]
Translate (it's important to TRANSLATE, NOT ROTATE the parent, TRANSLATE the children instead) the child bone such that it aligns with the axis of rotation.
[]
Notice how the parent is still in an untransformed coordinate basis
[]
[]
[]
Identify a rotation such that it transform the vertical children setup into this new setup.
[]
In this cause it's a 90° rotation on the Y axis. HOWEVER don't save the mod3 like this we just want the value we'll revert it We just want to identify
which is the equivalent Angular transform that corresponds to our previous translation
[]
[]
We revert the MOD3 to just be a translation but on the CTC
[]
We apply this transformation.
We can get the final rotation matrix we'll be using on the ctc by running this command while selecting the rotated frame:
bpy.context.active_object.matrix_world
In our example we'd get this (the rotation matrix for the 90 degree rotation on the Y axis)
>>> bpy.context.active_object.matrix_world
Matrix(((0, -1, 0, 0),
(1, 0, 0, 0.19413000345230103),
(0, 0, 1, 51.91337966918945),
(0, 0, 0, 1)))
We ignore the translation component (the last column) leaving us with
Matrix(((0, -1, 0, 0),
(1, 0, 0, 0),
(0, 0, 1, 0),
(0, 0, 0, 1)))
Remember in the ctc it's defined by columns so in this case it'd be 0,1,0,0], [1,0,0,0], [0,0,1,0], [0,0,0,1, alternatively, using this code:
import struct
def serializeMatrix(m):
m = m.copy()
m[0][3] = 0
m[1][3] = 0
m[2][3] = 0
b = struct.pack("ffffffffffffffff", *[m[i][j] for j in range(4) for i in range(4)])
print(''.join(map(lambda x: "%02x"%x,b)))
sm = lambda : serializeMatrix(bpy.context.active_object.matrix_world)
and calling
sm()
we get
>>> sm()
6e21a2330400803f0000000000000000040080bf6e21a233000000000000000000000000000000000000803f000000000000000000000000000000000000803f
and can just copy paste that directly to the ctc to the node's transform matrix.
Developments within the CTC toolbox allow this process to be helped along with GUI operations, this considerably simplify the above process. This operations are the alignment and projective alignment operators on the ctc frames.
General Tutorials
Animation Tutorials
Audio Tutorials
File & In Game IDs
- Accessory and Specialized Tool IDs (Asset)
- Armor IDs (Asset)
- Decorations IDs
- EFX IDs
- Endemic Critter IDs (Asset)
- Face IDs (Asset)
- Furniture IDs (Asset)
- Gimmick IDs (Asset)
- Hairstyle IDs (Asset)
- Item IDs
- LMT IDs
- Material IDs
- Medal IDs
- Model Bone Function IDs
- Monster IDs
- Monster Shell IDs (A-P)
- Monster Shell IDs (Q-Z)
- NPC IDs (Asset)
- NPC Base Model (Asset)
- Palico Equipment IDs (Asset)
- Pendant IDs (Asset)
- Poogie Clothes IDs
- Quest IDs
- Skill IDs
- Stage IDs (Asset)
- Player Weapon Action IDs
- Weapon IDs (Asset)
- Weapon ID Dump (GS,SnS,DB)
- Weapon ID Dump (LS,Ham,HH)
- Weapon ID Dump (Lan,GL)
- Weapon ID Dump (SA,CB)
- Weapon ID Dump (Bow,HBG,LBG)
Model Tutorials
- Quick Guide to Importing Models (Blender 2.79)
- Walkthrough of a Weapon Import
- Basics of Exporting Into the .mod3 Format
- How To Fix UVs Sharing a Seam
- How To Separate Mesh Parts in Blender
- Rotating, Moving and Resizing in Blender
- How to Split a Single Mesh Outfit into Player Equippable Parts
- Jigglebone Chains (.ctc) and Colliders (.ccl)
- Axial CTC Rotations
- Editing Hair Models and Materials
- Useful Blender Scripts
- [external page] How to Make All Polygons Into Triangles (Required for MHW models)
- [external page] How to Convert Triangles Back Into Quads
- [external page] How to Change The View-port clipping Parameters For Large Models
- [external page] How to Set Origin to Vertex in Edit Mode
- [external page] Shortcut to repeat the last operation in Blender
- [external page] Transferring Rig Weights From One Mesh To Another
- [external page] How to Copy Paint Weights From One Object to Another
- [external page] How to Remove All Zero-Weight Vertex Groups
- [external page] How to Weight Paint Against Current Pose
- [external page] Making a Hair Rig
- [external page] Physics Transfer
EFX Tutorials
FSM Editing
MRL3 Tutorials
NPC Editing
Plugins and Memory Editing
Monster AI Editing
General Texture Tutorials
- Obtaining, Converting and Replacing Textures
- Textures with Paint NET
- How To Open DDS Files
- Editing Textures
- Understanding Alpha Channels
- Exporting Textures with Transparency
- How To Achieve Glass Texture
- How to create Crystal materials with Alpha Textures
- Working Around the Mip Map Loading Bug
- [external page] Extracting a UV Layout
Specific Texture Tutorials
Asterisk's Plugin Notes
Miscellaneous Tutorials
Outdated Tutorials
- How to Make an NPC Skin Material Support Skin Color Customization
- Plugin Comparison
- A Theoretical Proposal on Skeleton Extension
- Monster Hunter World Save Editor Tutorial
- Making Copies of a Save Slot
- Making a Green Screen
- Notes on CTC Physics Jiggle Files
- Opening MRL3 file with a template
- Transferring MRL3 Files Between Models
- Expanding mrl3 Reference List
- How to Edit Eye Color in mrl3 Files