Calculate digitigrade-male transformation of Harmony:||

Author: Ann Lichtfeuer
Published at: Mon, March 2, 2026

Preface

Harmony:|| is constructed from female digitigrade wolfy anatomy. But…I have to make digitigrade male structure. Additionally, I want to take it easy! I don’t like iterations!

Then, I’ll tackle to this problem, from basic algebra.

Before Calculation…

To begin with, structural state of Harmony:|| is female digitigrade state S(d,f)S_{\text{(d,f)}}. I made “MUKIMUKI Comfy(Muscular Blobcat with a blanket)”.

MUKIMUKI Comfy

WTF

It has male plantigrade structural state S(p,m)S_{\text{(p,m)}}. And, I made plantigrade female transform file including plantigrade female state S(p,f)S_{\text{(p,f)}} while making it. I would like to reuse those.

Concept of Calculate S(d,m)S_{\text{(d,m)}}

I already have state matrices S(d,f)S_{\text{(d,f)}}, S(p,f)S_{\text{(p,f)}} and S(p,m)S_{\text{(p,m)}}. Those matrices are conceptually expressed by

S(d,f)T(d,f)to(p,f)=S(p,f)S(p,f)T(p,f)to(p,m)=S(p,m)\begin{align*} S_{\text{(d,f)}} T_{\text{(d,f)to(p,f)}} &= S_{\text{(p,f)}}\\ S_{\text{(p,f)}} T_{\text{(p,f)to(p,m)}} &= S_{\text{(p,m)}} \end{align*}

where TT is transform matrix.

T((d,f)to(p,f))

T((p,f)to(p,m))

(method1)

(method 2)

S(d,f)

S(p,f)

S(p,m)

S(d,m)

S(d,f)S_{\text{(d,f)}} is identity matrix II, and I can calculate transform matrix directly;

IT(d,f)to(p,f)=S(p,f)T(d,f)to(p,f)=S(p,f)S(p,f)T(p,f)to(p,m)=S(p,m)T(p,f)to(p,m)=S(p,f)1S(p,m)\begin{align*} I T_{\text{(d,f)to(p,f)}} = S_{\text{(p,f)}} &\Leftrightarrow T_{\text{(d,f)to(p,f)}} = S_{\text{(p,f)}}\\ S_{\text{(p,f)}} T_{\text{(p,f)to(p,m)}} = S_{\text{(p,m)}} &\Leftrightarrow T_{\text{(p,f)to(p,m)}} = {S_{\text{(p,f)}}}^{-1} S_{\text{(p,m)}} \end{align*}

I assume that non-changed attributes can be ignored. That is,

T(d,f)to(p,f)=T(d, )to(p,)T(d,f)to(p,m)=T(,f )to(,m)\begin{align*} T_{\text{(d,f)to(p,f)}} &= T_{\text{(d,}\bullet \text{ )to(p,}\bullet \text{)}}\\ T_{\text{(d,f)to(p,m)}} &=T_{\text{(}\bullet \text{,f )to(}\bullet \text{,m)}}\\ \end{align*}

Then, I can calculate 2 ways transform to S(d,m)S_{\text{(d,m)}}, maybe.

S(p,m)T(d, )to(p,)1=method 1S(d,m)S(d,f)T(,f )to(,m)=method 2S(d,m)\begin{align*} S_{\text{(p,m)}} {T_{\text{(d,}\bullet \text{ )to(p,}\bullet \text{)}}}^{-1} \stackrel{\text{method 1}}{=} S_{\text{(d,m)}}\\ S_{\text{(d,f)}} T_{\text{(}\bullet \text{,f )to(}\bullet \text{,m)}} \stackrel{\text{method 2}}{=} S_{\text{(d,m)}} \end{align*}

Happy Experiment Time!!

Harmony:|| has some scripts on UI panel. Then, I have to modify a bit only!

import bpy, json
from mathutils import Matrix

fp_S_df = None #because S_df is identity matix
fp_S_pf = 'plantigrade.harmony'
fp_S_pm = 'plantigrade_male.harmony'

armature = bpy.data.objects['Harmony_armature']

with open(fp_S_pf, 'rt') as f:
	data_S_pf = json.load(f)
with open(fp_S_pm, 'rt') as f:
	data_S_pm = json.load(f)

for k,v in data_S_pf.items():
	T_dx2px = Matrix(data_S_pf[k])
	T_xf2xm = Matrix(data_S_pf[k]).inverted_safe() @ Matrix(data_S_pm[k])
	S_pm = Matrix(data_S_pm[k])
	
	armature.pose.bones[k].matrix_basis = S_pm @ T_dx2px.inverted_safe() #method 1
	# armature.pose.bones[k].matrix_basis = T_xf2xm #method 2
	

Initial State

Initial State

Target State(method 1)

Target State(method 1)

Target State(method 2)

Target State(method 2)

Nice.