problem at create 3d models

Results 1 to 2 of 2
  1. #1
    Newbie masrawy2 is offline
    MemberRank
    Aug 2016 Join Date
    2Posts

    big grin problem at create 3d models


    RaGEZONE Recommends

    RaGEZONE Recommends

    Hi guys
    (I'm new here so i don't know if that is the right section or no ,so if that not the right section plz move it)
    let's start
    I'm a 3d designer so i want to create new models for c9 but the problem i can't import the bones
    I have searched on the net to how i can import the bones but i got a problem
    i think there's problem at the files that i have or maybe the game had updated her files or like that because i tried to import old file and the file had imported successfully
    i used this script to import the bones (.r3cb files) at 3ds max
    the problem in this line fseek f (0x107 - bonename.count)#seek_cur
    i must change that offset => 0x107
    the bones here that i used at the attachment
    Code:
    if (heapSize < 20000000) then
    (
       heapSize = 200000000 -- allow ~ 40 MB instead of just 7.5 MB. Prevents "Runtime Error: Out of scripter memory"
    )
    
    fname = GetOpenFileName caption:"Open c9 Model File" types:"c9 Model File(*.r3cb)|*.r3cb"
    f = fopen fname "rb"   --open file in read only format
    
    
    fn PrintOffset Var =(
            local Var = Var
            print ("This is the offset 0x" + (bit.intAsHex Var) as string)
            Var
        )
    
    fn PrintCount Var = (
            local Var = Var
            print ("This is the Count 0x" + (bit.intAsHex Var) as string)
            Var
        )
    
    fn Readword fstream = (
        return readshort fstream #unsigned
    )
    
    fn ReadFixedString bstream fixedLen =(
       local str = ""
       for i = 1 to fixedLen do(
          str += bit.intAsChar (ReadByte bstream #unsigned)
       )
       str
    )
    BNArr = #()
    bonecount = readlong f
    for a = 1 to bonecount do (
    bonename = readstring f
    fseek f (0x107   - bonename.count)#seek_cur
    boneid2 = readlong f
    boneparent = readlong f + 1
    BoneID = (a + 1)
    m11 = readfloat f; m12 = readfloat f; m13 = readfloat f; m14 = readfloat f
    m21 = readfloat f; m22 = readfloat f; m23 = readfloat f; m24 = readfloat f
    m31 = readfloat f; m32 = readfloat f; m33 = readfloat f; m34 = readfloat f
    m41 = readfloat f; m42 = readfloat f; m43 = readfloat f; m44 = readfloat f
    tfm = matrix3 [m11,m12,m13] [m21,m22,m23] [m31,m32,m33] [m41,m42,m43]
    m11 = readfloat f; m12 = readfloat f; m13 = readfloat f; m14 = readfloat f
    m21 = readfloat f; m22 = readfloat f; m23 = readfloat f; m24 = readfloat f
    m31 = readfloat f; m32 = readfloat f; m33 = readfloat f; m34 = readfloat f
    m41 = readfloat f; m42 = readfloat f; m43 = readfloat f; m44 = readfloat f
    tfm2 = matrix3 [m11,m12,m13] [m21,m22,m23] [m31,m32,m33] [m41,m42,m43]
       newBone = bonesys.createbone   \
                  tfm.row4   \
                  (tfm.row4 + 0.01 * (normalize tfm.row1)) \
                  (normalize tfm.row3)
             newBone.name   = BoneName
             newBone.width  = 0.3
             newBone.height = 0.3
             newBone.transform = tfm2
             newBone.wirecolor = yellow
             newbone.showlinks = true
             newBone.setBoneEnable false 0
             newBone.pos.controller      = TCB_position ()
             newBone.rotation.controller = TCB_rotation ()
    print bonename
    print boneid2
    print boneparent
    if (BoneID == 3) then
    newBone.parent = BNArr[1]
    if (boneparent != 0) then
    newBone.parent = BNArr[boneparent]
    append BNArr newBone
    
    fseek f 0x24#seek_cur
    nullcount = readlong f
    fseek f (0x4 * nullcount)#seek_cur                 
      
    
    )
    select $'Scene Root'
    rotate $ (angleaxis 90.0 [1,0,0])
    rotate $ (angleaxis 180.0[0,0,1])
    
    fclose f
    if anyone to help me to fix this problem plz send msg to me
    also if you have old client for c9 since 2011 or 2012 tell me plz
    I will share my designs if anyone helped me
    sorry if my eng is bad
    Attached Files Attached Files


  2. #2
    Newbie masrawy2 is offline
    MemberRank
    Aug 2016 Join Date
    2Posts

    Re: problem at create 3d models

    thx guys
    fixed:D




Advertisement