trouble opening mvr_male.chr

09/10/2015 14:54 blacksystem1990#1
How do you actually open mvr_male.chr in 3ds max? Which is character bones for animations.
It cannot be opened directly cause it says load error.


EDIT

nevermind, solved by myself.

#close request
09/10/2015 22:13 Sedrika#2
Could you tell us what your problem was?
09/13/2015 15:09 blacksystem1990#3
What you mean
Its already on main post

#close request again
01/14/2019 19:35 61574920#4
Can you tell me how to solve it ?
01/14/2019 20:03 MrDemian#5
Quote:
Originally Posted by Sedrika View Post
Could you tell us what your problem was?
He tried to open the .chr file without using the Modelfiles.
This will cause the 3ds Crach because these chr files are different from the original chr file format.

You can only open the Characterbones by loading atleast one Modelfile withit
01/14/2019 20:09 Mike Oxmaul#6
ofc you can load bones without a model :thinking:
01/14/2019 20:16 MrDemian#7
Quote:
Originally Posted by Jupsi332 View Post
ofc you can load bones without a model :thinking:
Try to open mvr_male.chr without any tool, 3ds will crash or say "wrong file format"
01/14/2019 20:28 Mike Oxmaul#8
Code:
Function ReadCHR FileName &BoneData &Version =
    (
        If FileName == Undefined Then Return False
        BoneData = ClsBoneData()

        Local FileHandle = 0
        Local I = 0
        
        FileHandle = FOpen FileName "rbS"

        Version = ReadLong FileHandle #Unsigned
        If Version < 4 Then
            MessageBox "Invalid Version, attempting to continue anyway."
        
        BoneData.ID = ReadLong FileHandle #Unsigned
        BoneData.BoneCount = ReadLong FileHandle #Unsigned
        
        CreateArray &BoneData.Names BoneData.BoneCount
        CreateArray &BoneData.TM BoneData.BoneCount
        CreateArray &BoneData.InverseTM BoneData.BoneCount
        CreateArray &BoneData.LocalTM BoneData.BoneCount
        CreateArray &BoneData.Parents BoneData.BoneCount
        
        For I = 1 To BoneData.BoneCount Do
        (
            FSeek FileHandle 4 #Seek_Cur    --Bone Name Len
            BoneData.Names[I]     = ReadString FileHandle
            BoneData.TM[I]        = ReadMatrix FileHandle
            BoneData.InverseTM[I]    = ReadMatrix FileHandle
            BoneData.LocalTM[I]    = ReadMatrix FileHandle
            BoneData.Parents[I]    = (ReadLong FileHandle #Signed)
            
            If (FindString BoneData.Names[I] "L ForeArm") != Undefined Then        BoneData.LeftArmIndex = I
            Else If (FindString BoneData.Names[I] "R ForeArm") != Undefined Then    BoneData.RightArmIndex = I
            Else If (FindString BoneData.Names[I] "L Hand") != Undefined Then    BoneData.LeftHandIndex = I
            Else If (FindString BoneData.Names[I] "R Hand") != Undefined Then    BoneData.RightHandIndex = I
        )
        
        BoneData.SendVS = ReadLong FileHandle #Unsigned
        
        BoneData.LocalRH = ReadMatrix FileHandle
		
        BoneData.LocalShield = ReadMatrix FileHandle
		
        BoneData.LocalKnuckle = ReadMatrix FileHandle
        
        If Version == 5 Then
        (
            CreateArray &BoneData.Events 4
            CreateArray &BoneData.EventParents 4
            For I = 1 To 4 Do BoneData.Events[I] = ReadVector3 FileHandle
            For I = 1 To 4 Do BoneData.EventParents[I] = ((ReadLong FileHandle #Signed) + 1)
        )
        If Version >= 6 Then
        (
            CreateArray &BoneData.Events 8
            CreateArray &BoneData.EventParents 8
            For I = 1 To 8 Do BoneData.Events[I] = ReadVector3 FileHandle
            For I = 1 To 8 Do BoneData.EventParents[I] = ((ReadLong FileHandle #Signed) + 1)
        )
        If Version == 7 Then
        (
            BoneData.LocalLH = ReadMatrix FileHandle
        )
		If Version >= 8 Then
		(
			BoneData.LocalBack = ReadMatrix FileHandle
		)
        FClose FileHandle
    )
/////////////////////////////////////
 on btnBones pressed do
    (
        chr = ClsBoneData()
        f = getOpenFileName caption: "Import Bones" types: "Bone Definitions(*.chr)|*.chr"
        version = undefined
        ReadCHR f &chr &version
        
        
        CreateArray &BoneSet chr.BoneCount
    
        For I=1 To chr.BoneCount Do
        (
			inverse chr.TM[i]
            if chr.Parents[I]+1 != 0 Then
            (
                pos1 = chr.TM[I].row4
                pos2 = chr.TM[chr.Parents[I]+1].row4
                
                BoneSet[I] = BoneSys.CreateBone (Point3 0 0 0 ) Y_Axis Z_Axis
                BoneSet[I].name = chr.Names[I]
                BoneSet[I].width = 0.05 as Float
                BoneSet[I].height = 0.05 as Float
                BoneSet[I].length = distance pos1 pos2
                BoneSet[I].transform = chr.TM[I]
                BoneSet[I].Parent = BoneSet[chr.Parents[I]+1]
            )
            
            else (
                BoneSet[I] = BoneSys.CreateBone chr.TM[I].row4 Y_Axis Z_Axis
                BoneSet[I].name = chr.Names[I]
                BoneSet[I].width = 0.05 as Float
                BoneSet[I].height = 0.05 as Float
                BoneSet[I].length = length chr.TM[I].row4
                BoneSet[I].transform = chr.TM[I]
            )

        )
        
        SkinBones = BoneSet
        
        if meshO3d != undefined Then (
            if meshO3d.BoneData != undefined Then meshO3d.BoneData = chr
        )
    )
01/14/2019 23:13 MrDemian#9
Okey i'll give up.

Sedrika asked what Problem it was. That was my interpretation, because as i mentioned without any kind of import script like a basic 3ds Max Version for example 17. It will say wrong file format. Just want to help people why it cause the problem.

sometimes im wondering why i keep in this forum.
best regrads Robin.