Tcll
Smash Lord
good news
UMC's transformer is complete ;D
but before this can actually do it's job, the verifier needs to fill in the blanks...
the transformer works off the bone's bind and inverse bind matrices, but:
- Sm4sh only supplies the LRS (verifier needs to build a bind and inverse matrix)
- Melee only supplies the LRS and inverse. (verifier needs to build the bind)
the verifier isn't yet built with this (it's been needed for a while, but I've been pre-occupied with other aspects of UMC).
so yea, this'll cause a bit more delay because it's needed for the UT functions.
this functionality has been a requirement of UMC since the rebuild (3.0) and (now that it's possible) must be implemented before I can release.
EDIT:
fun fact:
the transformer is actually a simplified version of my HAL_DAT transformer.
UMC's transformer is complete ;D
Code:
def __Transform():
if __UTData:
print 'Transforming data...'
for SID in __UTData:
for OID in __UTData[SID]:
#associate an influence to every
I,M = {None:None},[None]*len(Libs[3][OID][3][3][0])
if Libs[3][OID][4] not in ('',None):
PO = Libs[3][Libs[3][OID][4]]
if PO[0]=="_Rig": Bs = Libs[3][OID][3][3]
else: print '<object %i: "%s"> parent is not a rig object.'%(OID,Libs[3][OID][1]); continue
else: print '<object %i: "%s"> cannot find parent.'%(OID,Libs[3][OID][1]); continue
WVs = Libs[3][OID][3][3][4]
for prim in Libs[3][OID][3][3][5]:
for VID, NBTs, Cs, UVs, Ws, Ms in prim:
if M[VID] != None: continue # influence has already been calculated
Ii = len(i); M[VID] = Ii; I[Ii] = [[0.0,0.0,0.0,0.0],[0.0,0.0,0.0,0.0],[0.0,0.0,0.0,0.0],[0.0,0.0,0.0,0.0]]
for BID,WID in Ws:
tempmtx = MtxMultiply(*Bs[BID][4:6]) # world-transform matrix
for r in range(4):
for c in range(4):
I[Ii][r][c]+=tempmtx[r][c]*WVs[WID]
Libs[3][OID][3][3][0] = [ __TransV(Libs[3][OID][3][3][0][i],I[M[i]]) for i in __UTData[SID][OID][0] ]
Libs[3][OID][3][3][1][0] = [ __TransN(Libs[3][OID][3][3][1][0][i],I[M[i]]) for i in __UTData[SID][OID][1][0] ]
__UTData = {} # clear after finishing to save memory
the transformer works off the bone's bind and inverse bind matrices, but:
- Sm4sh only supplies the LRS (verifier needs to build a bind and inverse matrix)
- Melee only supplies the LRS and inverse. (verifier needs to build the bind)
the verifier isn't yet built with this (it's been needed for a while, but I've been pre-occupied with other aspects of UMC).
so yea, this'll cause a bit more delay because it's needed for the UT functions.
this functionality has been a requirement of UMC since the rebuild (3.0) and (now that it's possible) must be implemented before I can release.
EDIT:
fun fact:
the transformer is actually a simplified version of my HAL_DAT transformer.
Last edited: