Bone Tree Editor- development thread : Version 1.1 released

Started by TheShyGuy, September 13, 2010, 11:57:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

January 26, 2011, 03:01:55 AM #285 Last Edit: January 26, 2011, 04:27:14 AM by TheShyGuy
http://www.mediafire.com/?3ue53jy0bchh81g

there...srry it took a while..fixed all the errors above.  Only one now is that brawlbox doesnt load the tree at all ( no errors when opening tho...)

edit 2:

i used the bb source...and found that it has to do with 'textures1' entry nodes...tryn to find where i messed up....other than that i think(since its the last treenode to actually make...) everything else if fine...My code for textures1 is just the rg string += add_2, rg_data += add_2... im prob missing an offset cuz it reads -10 bytes before it should......

..your template reads it fine btw...then again it doesnt read textures either

edit3:...mightve found the prob lol

edit4: WIIIN got it working and loaded right....fix was that texture1 data came right after the reloc table...lol so basically it doesnt get touched...bone shows up in bb too

....model viewer is messed up...>.> shows an X

Quote from: TheShyGuy on January 26, 2011, 03:01:55 AM
http://www.mediafire.com/?3ue53jy0bchh81g

there...srry it took a while..fixed all the errors above.  Only one now is that brawlbox doesnt load the tree at all ( no errors when opening tho...)

edit 2:

i used the bb source...and found that it has to do with 'textures1' entry nodes...tryn to find where i messed up....other than that i think(since its the last treenode to actually make...) everything else if fine...My code for textures1 is just the rg string += add_2, rg_data += add_2... im prob missing an offset cuz it reads -10 bytes before it should......

..your template reads it fine btw...then again it doesnt read textures either

edit3:...mightve found the prob lol

edit4: WIIIN got it working and loaded right....fix was that texture1 data came right after the reloc table...lol so basically it doesnt get touched...bone shows up in bb too

....model viewer is messed up...>.> shows an X

well, glad to see you figured it out :P
I'd just DL'd it and was about to test it XDD

keep in mind though...
everything in the data teble may not be organized accordingly...

everything's basically thrown on top of each other and then mapped to...
keep that in mind before you think textures are always before bones ;)

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

k...thought of a better idea lol...instead of just doing the addition stuff depending on wut i thought the order was...ima just do it by the data offset or w/e....

Quote from: TheShyGuy on January 27, 2011, 02:20:36 AM
k...thought of a better idea lol...instead of just doing the addition stuff depending on wut i thought the order was...ima just do it by the data offset or w/e....

exactly :)

if data offsets to before bone, add this nuber to the offset
else, add this nuber (different number) to the offset

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

January 27, 2011, 04:18:15 AM #289 Last Edit: January 27, 2011, 04:42:53 AM by TheShyGuy
offset = BinaryWriter position
i_tmp = i_tmp value(read 4)

           if (i_tmp > lastBone_Mdl0_offset)
               i_tmp += add_2;

           if (offset > lastBone_rg_offset)
               i_tmp += add_1;

no need for 'if!' cuz itd be 0 anyways lol...gnna test this code after i fix sum other ones around it

edit:

ill prob finish this within this week

Quote from: TheShyGuy on January 27, 2011, 04:18:15 AM
offset = BinaryWriter position
i_tmp = i_tmp value(read 4)

           if (i_tmp > lastBone_Mdl0_offset)
               i_tmp += add_2;

           if (offset > lastBone_rg_offset)
               i_tmp += add_1;

no need for 'if!' cuz itd be 0 anyways lol...gnna test this code after i fix sum other ones around it

edit:

ill prob finish this within this week

not sure how you have it set up :/
but in my case, it's never just add2 alone

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

? it wouldnt always add add_2 alone...if the current writer position is greater than the added data,add_2is added. If its after the relocation data, then it added 16.....it can be both.  Mdl0 offsets are changed depending on the bw positon, not on anything like add_1/add_2 cuz its easier and more error proof(shaders or sumtin share data), same for string(but a lil diff).  The only thing i actually need to change without really needing the current positon is the rg offsets.

ex. when add_2 is alone...when its doing the relocation group(after the bone list rg) offsets and its changing the string and data offsets. -> relocation group offset is already +16, so the offsets is added only add_2.


January 29, 2011, 12:16:30 AM #292 Last Edit: October 06, 2022, 11:28:38 PM by DarkPikachu
hey TSG...
I'm still kinda lost on this...

would you happen to know a way to get values like these:

^notice the X,Y grid positioning

I'm working on objects in my converter,
and kinda can't concentrate on bones :P

could you help me out here??

these are the vars I need to do math on to get the right numbers:
                    parent = l(fr.read(4))/208
                    First_child = ui(fr.read(4))/208
                    Next_child = ui(fr.read(4))/208
                    Prev_child = l(fr.read(4))/208
                    part2 = ui(fr.read(4))

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

havent checked to see if i can do this in c#, but cant you just get the datatable(thats how i load my tree) row and column? or get the parent x,y..then the current bone index and the parents child count. then use that?

ex. parent = 5,5
      child count = 2
      current bone = X->parent(x) + 1
                               Y->parent(y) + child count + 1

hey :D
how's progress coming :)
I wanna test the bone adder ;)

Quote from: TheShyGuy on January 29, 2011, 12:24:05 AM
havent checked to see if i can do this in c#, but cant you just get the datatable(thats how i load my tree) row and column? or get the parent x,y..then the current bone index and the parents child count. then use that?

ex. parent = 5,5
      child count = 2
      current bone = X->parent(x) + 1
                               Y->parent(y) + child count + 1

well...
Y = bone index
X gets added to...
but I just now got an idea,
which is prbly the idea you were trying to tell me: :P

define LASTX as a list before the for loop
in the for loop:

if len(LASTX): XPOS = LASTX[parent] + 1
else: XPOS = 0 #if len(XPOS) = 0 then set XPOS as 0
LASTX.append(XPOS) #add the current XPOS to the end of the list

^hows that look :)

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

progress = taking a break lol..for the past 2 day.  Had stuff to do and just wnted a break.

lets see:

Quote
if len(LASTX): XPOS = LASTX[parent] + 1
else: XPOS = 0 #if len(XPOS) = 0 then set XPOS as 0
LASTX.append(XPOS) #add the current XPOS to the end of the list

hmm wouldnt directly setting it to 0 not work? i mean the only time it would be 0 is for the topN(unless you had a model without that kinda of setup)?

wut im saying to maybe make a tag for each tree node as you create it.  Then:

y = index(obv)
x = depends on when the prev node created had a child or not

then in the loop, get the tag and your done.  Not sure if  this would work cuz i dunno how you create your tree nodes. Like i said  i do mine with a datatable, if you want the source code for it i can easily just post it

January 30, 2011, 04:18:09 PM #296 Last Edit: October 06, 2022, 11:31:14 PM by DarkPikachu
I GOT MY BONES WORKING PERFECTLY!!! :happy:

here's my code on them: http://www.pasteit4me.com/2172005

and here's a sample bone from the tmp:
< bone Tail1 3,15 0 -3.9999999899e-06,0.0,-0.427565008402 0.0,0.0,-90.0 1.0,1.0,1.0 1.0,0.0,0.0,0.0|0.0,1.0,0.0,0.397000014782|0.0,0.0,1.0,-0.301451027393|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.0|-0.0,1.0,-0.0,-0.397000014782|0.0,-0.0,1.0,0.301451027393|0.0,0.0,0.0,1.0 >

the format:
< bone bone_name parent,child(grid) is_connected(bool) locX,Y,Z rotX,Y,Z scaX,Y,Z bind inv_bind >

EDIT:
oh yea...
the is_connected (CONN) var doesn't work right :/

how could I set that accordingly??

EDIT2:
I think I might have an idea:

if parent < (0-1): CONN = 0
else: CONN = 1

EDIT3:
that worked perfectly :D
here's pachi's bone structure in blender:


you can compair it to these:

< bone Pachirisu 0,0 1 0.0,0.0,0.0 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,0.0|0.0,1.0,0.0,0.0|0.0,0.0,1.0,0.0|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.0|-0.0,1.0,-0.0,0.0|0.0,-0.0,1.0,0.0|0.0,0.0,0.0,1.0 >
< bone Origin 1,1 1 0.0,0.0,0.0 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,0.0|0.0,1.0,0.0,0.0|0.0,0.0,1.0,0.0|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.0|-0.0,1.0,-0.0,0.0|0.0,-0.0,1.0,0.0|0.0,0.0,0.0,1.0 >
< bone Waist 2,2 1 0.0,0.397004008293,0.12611399591 0.0,0.0,90.0 1.0,1.0,1.0 0.0,-1.0,0.0,0.0|1.0,0.0,0.0,0.397004008293|0.0,0.0,1.0,0.12611399591|0.0,0.0,0.0,1.0 0.0,1.0,-0.0,-0.397004008293|-1.0,0.0,-0.0,0.0|0.0,-0.0,1.0,-0.12611399591|0.0,0.0,0.0,1.0 >
< bone LThigh 3,3 1 4.80000016978e-05,-0.285930007696,-0.0578869991004 -180.0,0.0,-90.0 1.0,1.0,1.0 1.0,-0.0,0.0,0.285930007696|0.0,-1.0,0.0,0.397052019835|0.0,0.0,-1.0,0.068226993084|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,-0.285930007696|0.0,-1.0,-0.0,0.397052019835|0.0,-0.0,-1.0,0.068226993084|0.0,0.0,0.0,1.0 >
< bone LFoot 4,4 1 0.0,0.271604001522,0.0 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,0.285930007696|0.0,-1.0,0.0,0.125448018312|0.0,0.0,-1.0,0.068226993084|0.0,0.0,0.0,1.0 1.0,0.0,0.0,-0.285930007696|0.0,-1.0,-0.0,0.125448018312|0.0,-0.0,-1.0,0.068226993084|0.0,0.0,0.0,1.0 >
< bone RThigh 3,5 0 4.80000016978e-05,0.285930007696,-0.0578869991004 0.0,0.0,-90.0 1.0,1.0,1.0 1.0,0.0,0.0,-0.285930007696|0.0,1.0,0.0,0.397052019835|0.0,0.0,1.0,0.068226993084|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.285930007696|-0.0,1.0,-0.0,-0.397052019835|0.0,-0.0,1.0,-0.068226993084|0.0,0.0,0.0,1.0 >
< bone RFoot 4,6 1 0.0,-0.271604001522,0.0 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,-0.285930007696|0.0,1.0,0.0,0.125448018312|0.0,0.0,1.0,0.068226993084|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.285930007696|-0.0,1.0,-0.0,-0.125448018312|0.0,-0.0,1.0,-0.068226993084|0.0,0.0,0.0,1.0 >
< bone Spine 3,7 0 0.243059143424,0.0,0.0 0.0,0.0,0.0 1.0,1.0,1.0 0.0,-1.0,0.0,0.0|1.0,0.0,0.0,0.639819025993|0.0,0.0,1.0,0.12611399591|0.0,0.0,0.0,1.0 0.0,1.0,-0.0,-0.639819025993|-1.0,0.0,-0.0,0.0|0.0,-0.0,1.0,-0.12611399591|0.0,0.0,0.0,1.0 >
< bone Head 4,8 1 0.460072994232,0.0,0.0 0.0,0.0,-90.0 1.0,1.0,1.0 1.0,0.0,0.0,0.0|0.0,1.0,0.0,1.09989202023|0.0,0.0,1.0,0.12611399591|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.0|-0.0,1.0,-0.0,-1.09989202023|0.0,-0.0,1.0,-0.12611399591|0.0,0.0,0.0,1.0 >
< bone LEar 5,9 1 0.433147013187,1.21945202351,-0.0354570001364 0.0,0.0,88.0054321289 1.0,1.0,1.0 0.0348026454449,-0.999320209026,0.0,0.433147013187|0.999320209026,0.0348026454449,0.0,2.31934404373|0.0,0.0,1.0,0.0906569957733|0.0,0.0,0.0,1.0 0.0348077937961,0.999468028545,-0.0,-2.33318710327|-0.999468028545,0.0348077937961,-0.0,0.352185338736|0.0,-0.0,1.0,-0.0906569957733|0.0,0.0,0.0,1.0 >
< bone REar 5,10 0 -0.433147013187,1.2194570303,-0.0354570001364 180.0,0.0,-88.0054321289 1.0,1.0,1.0 0.0348026454449,-0.999320209026,0.0,-0.433147013187|-0.999320209026,-0.0348026454449,0.0,2.31934905052|0.0,0.0,-1.0,0.0906569957733|0.0,0.0,0.0,1.0 0.0348077937961,-0.999468028545,0.0,2.33319211006|-0.999468028545,-0.0348077937961,-0.0,-0.352185159922|0.0,-0.0,-1.0,0.0906569957733|0.0,0.0,0.0,1.0 >
< bone LArm 4,11 0 0.289499014616,-0.319108009338,0.0859630033374 -180.0,0.0,-90.0 1.0,1.0,1.0 1.0,-0.0,0.0,0.319108009338|0.0,-1.0,0.0,0.929318070412|0.0,0.0,-1.0,0.212076991796|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,-0.319108009338|0.0,-1.0,-0.0,0.929318070412|0.0,-0.0,-1.0,0.212076991796|0.0,0.0,0.0,1.0 >
< bone LHand 5,12 1 0.0,0.0,-0.28024199605 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,0.319108009338|0.0,-1.0,0.0,0.929318070412|0.0,0.0,-1.0,0.492318987846|0.0,0.0,0.0,1.0 1.0,0.0,0.0,-0.319108009338|0.0,-1.0,-0.0,0.929318070412|0.0,-0.0,-1.0,0.492318987846|0.0,0.0,0.0,1.0 >
< bone RArm 4,13 0 0.289499998093,0.319108009338,0.0859630033374 0.0,0.0,-90.0 1.0,1.0,1.0 1.0,0.0,0.0,-0.319108009338|0.0,1.0,0.0,0.929319024086|0.0,0.0,1.0,0.212076991796|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.319108009338|-0.0,1.0,-0.0,-0.929319024086|0.0,-0.0,1.0,-0.212076991796|0.0,0.0,0.0,1.0 >
< bone RHand 5,14 1 0.0,0.0,0.28024199605 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,-0.319108009338|0.0,1.0,0.0,0.929319024086|0.0,0.0,1.0,0.492318987846|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.319108009338|-0.0,1.0,-0.0,-0.929319024086|0.0,-0.0,1.0,-0.492318987846|0.0,0.0,0.0,1.0 >
< bone Tail1 3,15 0 -3.9999999899e-06,0.0,-0.427565008402 0.0,0.0,-90.0 1.0,1.0,1.0 1.0,0.0,0.0,0.0|0.0,1.0,0.0,0.397000014782|0.0,0.0,1.0,-0.301451027393|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.0|-0.0,1.0,-0.0,-0.397000014782|0.0,-0.0,1.0,0.301451027393|0.0,0.0,0.0,1.0 >
< bone Tail2 4,16 1 0.0,0.0990779995918,-0.683709025383 90.0,78.5461120605,90.0 1.0,1.0,1.0 0.0,0.0,1.0,0.0|0.198571234941,0.980048000813,0.0,0.496078014374|-0.980048000813,0.198571234941,0.0,-0.985160052776|0.0,0.0,0.0,1.0 0.0,0.19858622551,-0.980121970177,-1.06409132481|-0.0,0.980121970177,0.19858622551,-0.290577739477|1.00000011921,-0.0,0.0,0.0|0.0,0.0,0.0,1.0 >
< bone Tail3 5,17 1 1.09466505051,0.0449969992042,0.0 0.0,0.0,-2.63988900185 1.0,1.0,1.0 0.0,0.0,1.0,0.0|0.153216540813,0.988122165203,0.0,0.757546246052|-0.988122165203,0.153216540813,0.0,-2.04904913902|0.0,0.0,0.0,1.0 0.0,0.153237894177,-0.988259851933,-2.14107775688|-0.0,0.988259851933,0.153237894177,-0.434660553932|1.0,-0.0,0.0,0.0|0.0,0.0,0.0,1.0 >
< bone Tail4 6,18 1 1.18681299686,0.0,0.0 0.0,0.0,12.5423269272 1.0,1.0,1.0 0.0,0.0,1.0,0.0|0.364133238792,0.931247830391,0.0,0.939385652542|-0.931247830391,0.364133238792,0.0,-3.22176527977|0.0,0.0,0.0,1.0 0.0,0.364200443029,-0.931419670582,-3.34294033051|-0.0,0.931419670582,0.364200443029,0.29840606451|1.0,-0.0,0.0,0.0|0.0,0.0,0.0,1.0 >


my UD'd bones code: http://www.pasteit4me.com/2165009

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

gj man..cant w8...gnna go on a psa streak when this comes out lol

Quote from: TheShyGuy on January 30, 2011, 07:09:39 PM
gj man..cant w8...gnna go on a psa streak when this comes out lol

DONT TOUCH MELEE PICHU!!! >:3
melee Pichu's mine >:3

Pachi is mine as well :3

and nobody can work on Riku but me. XDD
Riku's my game char
^I'm gonna try to actually render fur using the shaders >:3

here's what I mean:


^done entirely with shaders >:3
now imagine that in brawl

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.