• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

problem at create 3d models

Initiate Mage
Joined
Aug 15, 2016
Messages
4
Reaction score
1
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:
[COLOR=#569CD6]if[/COLOR] (heapSize < [COLOR=#B8D7A3]20000000[/COLOR]) then
(
   heapSize = [COLOR=#B8D7A3]200000000[/COLOR] -- allow ~ [COLOR=#B8D7A3]40[/COLOR] MB instead of just [COLOR=#B8D7A3]7.5[/COLOR] MB. Prevents [COLOR=#D69D85]"Runtime Error: Out of scripter memory"[/COLOR]
)

fname = GetOpenFileName caption:[COLOR=#D69D85]"Open c9 Model File"[/COLOR] types:[COLOR=#D69D85]"c9 Model File(*.r3cb)|*.r3cb"[/COLOR]
f = fopen fname [COLOR=#D69D85]"rb"[/COLOR]   --open file in read only format


fn PrintOffset [COLOR=#569CD6]Var[/COLOR] =(
        local [COLOR=#569CD6]Var[/COLOR] = [COLOR=#569CD6]Var[/COLOR]
        [COLOR=#569CD6]print[/COLOR] ([COLOR=#D69D85]"This is the offset 0x"[/COLOR] + (bit.intAsHex [COLOR=#569CD6]Var[/COLOR]) [COLOR=#569CD6]as[/COLOR] string)
        [COLOR=#569CD6]Var[/COLOR]
    )

fn PrintCount [COLOR=#569CD6]Var[/COLOR] = (
        local [COLOR=#569CD6]Var[/COLOR] = [COLOR=#569CD6]Var[/COLOR]
        [COLOR=#569CD6]print[/COLOR] ([COLOR=#D69D85]"This is the Count 0x"[/COLOR] + (bit.intAsHex [COLOR=#569CD6]Var[/COLOR]) [COLOR=#569CD6]as[/COLOR] string)
        [COLOR=#569CD6]Var[/COLOR]
    )

fn Readword fstream = (
    [COLOR=#569CD6]return[/COLOR] readshort fstream [COLOR=#57A64A][I]#unsigned[/I][/COLOR]
)

fn ReadFixedString bstream fixedLen =(
   local str = [COLOR=#D69D85]""[/COLOR]
   [COLOR=#569CD6]for[/COLOR] i = [COLOR=#B8D7A3]1[/COLOR] to fixedLen [COLOR=#569CD6]do[/COLOR](
      str += bit.intAsChar (ReadByte bstream [COLOR=#57A64A][I]#unsigned)[/I][/COLOR]
   )
   str
)
BNArr = [COLOR=#57A64A][I]#()[/I][/COLOR]
bonecount = readlong f
[COLOR=#569CD6]for[/COLOR] a = [COLOR=#B8D7A3]1[/COLOR] to bonecount [COLOR=#569CD6]do[/COLOR] (
bonename = readstring f
fseek f ([COLOR=#B8D7A3]0x107[/COLOR]   - bonename.count)[COLOR=#57A64A][I]#seek_cur[/I][/COLOR]
boneid2 = readlong f
boneparent = readlong f + [COLOR=#B8D7A3]1[/COLOR]
BoneID = (a + [COLOR=#B8D7A3]1[/COLOR])
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 + [COLOR=#B8D7A3]0.01[/COLOR] * (normalize tfm.row1)) \
              (normalize tfm.row3)
         newBone.name   = BoneName
         newBone.width  = [COLOR=#B8D7A3]0.3[/COLOR]
         newBone.height = [COLOR=#B8D7A3]0.3[/COLOR]
         newBone.transform = tfm2
         newBone.wirecolor = yellow
         newbone.showlinks = [COLOR=#569CD6]true[/COLOR]
         newBone.setBoneEnable [COLOR=#569CD6]false[/COLOR] [COLOR=#B8D7A3]0[/COLOR]
         newBone.pos.controller      = TCB_position ()
         newBone.rotation.controller = TCB_rotation ()
[COLOR=#569CD6]print[/COLOR] bonename
[COLOR=#569CD6]print[/COLOR] boneid2
[COLOR=#569CD6]print[/COLOR] boneparent
[COLOR=#569CD6]if[/COLOR] (BoneID == [COLOR=#B8D7A3]3[/COLOR]) then
newBone.[COLOR=#569CD6]parent[/COLOR] = BNArr[[COLOR=#B8D7A3]1[/COLOR]]
[COLOR=#569CD6]if[/COLOR] (boneparent != [COLOR=#B8D7A3]0[/COLOR]) then
newBone.[COLOR=#569CD6]parent[/COLOR] = BNArr[boneparent]
append BNArr newBone

fseek f [COLOR=#B8D7A3]0x24[/COLOR][COLOR=#57A64A][I]#seek_cur[/I][/COLOR]
nullcount = readlong f
fseek f ([COLOR=#B8D7A3]0x4[/COLOR] * nullcount)[COLOR=#57A64A][I]#seek_cur                 [/I][/COLOR]
  

)
select $[COLOR=#D69D85]'Scene Root'[/COLOR]
rotate $ (angleaxis [COLOR=#B8D7A3]90.0[/COLOR] [[COLOR=#B8D7A3]1[/COLOR],[COLOR=#B8D7A3]0[/COLOR],[COLOR=#B8D7A3]0[/COLOR]])
rotate $ (angleaxis [COLOR=#B8D7A3]180.0[/COLOR][[COLOR=#B8D7A3]0[/COLOR],[COLOR=#B8D7A3]0[/COLOR],[COLOR=#B8D7A3]1[/COLOR]])

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:cool:
sorry if my eng is bad
 

Attachments

You must be registered for see attachments list
Back
Top