Author Topic: About the .HRC file type...........  (Read 25532 times)

The SaiNt

  • *
  • Posts: 1300
    • View Profile
About the .HRC file type...........
« on: 2001-01-04 15:57:00 »
Anyone can help me out here?
The following is an example of a hrc file

:HEADER_BLOCK 2
:SKELETON n_sefiros_sk
:BONES 23

hip
root
1.6143456
1 BKHE

chest
hip
5.073813
1 BKIA

head
chest
4.5480328
1 BKIC

non_1
head
5.7248783
0

kami
non_1
14.583745
1 BKJB

l_chest
hip
4.7595735
0

l_collar
l_chest
2.3108385
0

l_uparm
l_collar
3.4343264
1 BKJD

l_foarm
l_uparm
4.8168325
1 BKJF

l_hand
l_foarm
2.2786036
1 BLAB

r_chest
hip
4.7595735
0

r_collar
r_chest
2.3108385
0

r_uparm
r_collar
3.4343264
1 BLAD

r_foarm
r_uparm
4.8168325
1 BLAF

r_hand
r_foarm
2.2786036
1 BLBB

l_hip
root
1.8991876
0

l_femur
l_hip
7.0923777
1 BLBD

l_tibia
l_femur
7.99837
1 BLBF

l_foot
l_tibia
6.756432
1 BLCB

r_hip
root
1.8991876
0

r_femur
r_hip
7.0923777
1 BLCD

r_tibia
r_femur
7.99837
1 BLCF

r_foot
r_tibia
6.756432
1 BLDB

What are numbers exactly for?


The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
About the .HRC file type...........
« Reply #1 on: 2001-01-04 18:16:00 »
for a start this belongs in the tech area or game tweaking, look at the post about lgp editor and file types, a little discription is in that post, in the tech-related foroum.

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
About the .HRC file type...........
« Reply #2 on: 2001-01-04 18:22:00 »
woops!
Sorry! this is the tech-related area  :oops:!
my mistake!

About the .HRC file type...........
« Reply #3 on: 2001-01-04 20:06:00 »
The Skillster: (!) Hey, it happens. Now I don't feel bad at all about my torqueing Qhimm off with my double post the other day.

The SaiNt: (Please keep in mind that I am only doing guesswork.) The decimal numbers? I am guessing they are either:
1. Onscreen coordinates of the specific part of the skeleton
2. Size of the specific part of the skeleton
3. ...or something else I was too stupid to think of.

I don't know if this helps, but if you can find the corresponding .rsd files then you have the individual info for each part of the skeleton... right?

Which .hrc in char.lgp? If you can supply that info, I can poke around and tell you if I come up with anything. Is this the Sephiroth skin by any chance? (n_sefiros_sk)    :wink:

I've puzzled over this before, but I'm afraid I still don't understand the .hrc structure. First it lists the header, then the... strings? Then something else that completely escapes me. The layout seems to follow an odd pattern (if pattern it is).

Headers:
1. Always have ":" in front of each line.
2. Always have the same three line format of
Line 1: The header block name (I don't understand it)
Line 2: The name of the skeleton
Line 3: The number of "bones" the skeleton has.

Strings/unknown
1. Always have four lines
2. First two lines are always a description of something (the specific part?)
3. Third line always has a decimal number (one digit whole number, decimal carried 5-7 spaces)
4. Sometimes the first two lines in the group have something at the beginning such as "1_", "r_".
5. The fourth line always has a single digit number (i.e. "0") and/or a four letter combination (i.e. "BKIA" or "0 BKIA"). The singled digit number is possibly binary as I've only seen ever seen the numbers "0" and "1" in these parts of .hrc files I've looked at.
6. Almost all of the four line strings/unknowns have a corresponding segment of another four lines further down the list. (i.e.
"hip
root
1.6143456
1 BKHE"

and

"l_hip
root
1.8991876
0")

These have the following differences:
(1) The first two lines are unaltered in cases such as "hip", and "root". Otherwise they are altered by adding something to the front of the word like "1_" or "r_". (Note that there are exceptions.)
(2) I have not bothered to check about this, but number of decimal spaces in the third line may be static. What I mean is that the number in the third line of each segment is carried to might be fixed (i.e. a segment and it's corresponding segment both have different numbers, but they have to have the same length. Example: The two seperate four line parts shown above. They are different numbers, but both have 5 decimal digits.)

Anyways, I'm stumped. Anyone know anything more about this?
Let me be the first to say I could be wrong about *any* part of this.

[This message has been edited by Srethron Askvelhtnod (edited January 04, 2001).]


ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
About the .HRC file type...........
« Reply #4 on: 2001-01-04 21:26:00 »
The strings for each part: eg.

head
chest
4.5480328
1 BKIC

First one (head) is name of this part. Second one (chest) is name of its "parent" part. Hip is the initial (root) part that has no parent.
The number might be a scale factor, don't know. The four letters are definitely a filename of something in the same LGP archive.


Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
About the .HRC file type...........
« Reply #5 on: 2001-01-04 21:51:00 »
Keep in mind that these are object hierarchies (model skeletons).

head
chest
4.5480328
1 BKIC
----------
'head' - node name
'chest' - name of parent node
'4.5480328' - distance to parent node (bone length)
'1 BKIC' - geometry file associated with this node


non_1
head
5.7248783
0
----------
'non_1' - node name
'head' - name of parent node
'5.7248783' - distance to parent node
'0' - empty geometry reference, this node has no associated geometry.


Skeletons are defined using angle/distance vectors. The bone lengths define the 'body proportions' of the model, while the node rotation info is stored in the .a files (not too hard to decode, stored as simple floats).


About the .HRC file type...........
« Reply #6 on: 2001-01-04 22:58:00 »
The light goes on. Thanks for the info.

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
About the .HRC file type...........
« Reply #7 on: 2001-01-05 00:51:00 »
woah! this is going out of the realm of programming/hacking and into the realm of 3d graphics and polygonal positioning!
ill leave this topic for now, its starting to lose me  :(!

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
About the .HRC file type...........
« Reply #8 on: 2001-01-05 02:14:00 »
It's still programming ... tho I can understand if it's not the sort of programming you want to start off with!

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
About the .HRC file type...........
« Reply #9 on: 2001-01-05 10:30:00 »
ficedula:
did you get my email with the wav file?

The SaiNt

  • *
  • Posts: 1300
    • View Profile
About the .HRC file type...........
« Reply #10 on: 2001-01-05 15:39:00 »
Ok! Got it.
Just one more thing I wanted to say,
if I put

chest
hip
5.073813
2 BKIA BKJF

I can put two parts together!
The 2 can be changed into anything else corresponding to the amount of parts added.

One more favour,
Qhimm,since you said its possible to decode the .a files, could you help me please. I really need to turn one of the parts around about 180 degrees i think. Thanks


Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
About the .HRC file type...........
« Reply #11 on: 2001-01-05 16:46:00 »
Hey, I only said they were easy to decode, I don't know which values correspond to which angles. Just look through the files and you'll find floats like 180.0 and 90.0, then fiddle around with these values in your OpenGL app or whatever you're using.

About the .HRC file type...........
« Reply #12 on: 2001-01-05 20:01:00 »
The SaiNt: Thanks for the info.


Qhimm: At the risk of making an even bigger fool of myself...
Now, that part I don't understand. OpenGL? What does OpenGL have to do with modifying HRC files?   :-?

[This message has been edited by Srethron Askvelhtnod (edited January 05, 2001).]


ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
About the .HRC file type...........
« Reply #13 on: 2001-01-05 21:51:00 »
OpenGL is a 3d API. It's pretty easy to program in, so if you were going to write some sort of 3d display program, you'd probably use it for a quick and easy solution. So, Qhimm's suggesting you knock up a OpenGL polygon displayer and feed the values in 'til you get some results.

EDIT: Skillster: Yes, I got your email. I should mention now that I might be away from my computer for a week or two. I'll still be able to visit the message board and check email, but I won't have access to any of my files - so no updates to my programs. Not sure yet; but I may not be able to sort anything out soon.

[This message has been edited by ficedula (edited January 05, 2001).]


The SaiNt

  • *
  • Posts: 1300
    • View Profile
About the .HRC file type...........
« Reply #14 on: 2001-01-06 09:46:00 »
Hehe, one more problem.
How do I know which .a file to look in?
I can't seem to find a reference anywhere within the .hrc or .rsd files.
For eg:
I'm looking for the part BKFB but BKJB is the name of a .RSD file. In the RSD file all i see is

@RSD940102
PLY=BKJC.PLY
MAT=BKJC.MAT
GRP=BKJC.GRP
NTEX=0

The references for the .PLY .MAT and .GRP seem to be in the .p files. I have no idea how you read the .p files so i'm stuck.

For those who want to know, in the .hrc file,

head
chest
4.5480328
1 BKIC

The no. 4.5480328
can be made a negative no.
like this -4.5480328

[This message has been edited by The SaiNt (edited January 06, 2001).]


About the .HRC file type...........
« Reply #15 on: 2001-01-06 21:29:00 »
Ficedula: Thanks again. I understand about being away. I'm not asking you to give up your personal life or anything.   :wink:

The SaiNt: Thanks for all the info. It's a big help (believe it or not). I'm not sure,  but Qhimm may have a bit of code in several of his source files for reading .a and .p files (and Lgp.h  calls them Animation and Geometry).

[This message has been edited by Srethron Askvelhtnod (edited January 06, 2001).]


The SaiNt

  • *
  • Posts: 1300
    • View Profile
About the .HRC file type...........
« Reply #16 on: 2001-01-07 15:42:00 »
Wont anyone answer me?

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
About the .HRC file type...........
« Reply #17 on: 2001-01-07 22:10:00 »
SaiNt: I'm sure if anybody here has got any further than you have at the moment. You might be on your own at this point.
'Course, it'd be nice for somebody to prove me wrong....


I have my PC again! Yay! So I *do* have access to all my files. Except I have a large technical report to write ... arg.


About the .HRC file type...........
« Reply #18 on: 2001-01-07 23:33:00 »
The SaiNt: Haven't made any progress yet. If I find something out, you'll be among the first to know. Have you checked Qhimm's source to see if there's any info there?

Ficedula: Hey, at least it wasn't two weeks.


ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
About the .HRC file type...........
« Reply #19 on: 2001-01-07 23:35:00 »
I *did* say 'might'. Didn't know what was happening until yesterday.

About the .HRC file type...........
« Reply #20 on: 2001-02-22 16:11:00 »
The SaiNt (or whomever): Ok, some questions:

1. What part is the "root"? Is it the legs, or does it mean that it has no parent part?

2. I haven't found any .HRC files with 2 different .RSD files referenced as in The SaiNt's example:

"2 BKIA BKJF

I can put two parts together!
The 2 can be changed into anything else corresponding to the amount of parts added."

Do any of the models ever have this by themselves? And I'm not quite sure what you mean by your last sentence. Does that mean that you can put as many parts together as you wanted, as long the total matches the number of bones listed in the Header?

[This message has been edited by Srethron Askvelhtnod (edited February 22, 2001).]


The SaiNt

  • *
  • Posts: 1300
    • View Profile
About the .HRC file type...........
« Reply #21 on: 2001-02-22 17:12:00 »
What do you mean you can't find any of the HRC files that contain the multiple references to the RSD files? There are so many!!!
Here's a list of some of them:-
aggb
gjeb
gchc
fgfb
epfb
azbb
aihb
ahdf
aiba
gwaa
fiba
fhaa
eyie
atfe
asjc

When I said
"The 2 can be changed into anything else corresponding to the amount of parts added."
I meant that you can reference one or more RSD files but you must first specify before hand how many RSD files you wish to attach to that "bone".

For example let's take the file aggb.hrc

chest
hip
4.551412
2 AGGE AGHA

Notice the number 2? This shows that two RSD files are referenced at this bone.
Basically, it means that the section "chest" is attached to the section "hip".
The number 4 here on the other hand is the distance that chest is from hip.
I not too sure what the numbers after "." represent cause I didn't see any difference after changing them.

Let's take another example of the file eyie.hrc

bone_2
root
58.32005
6 EYJB EYJD EYJF EZAB EZAD EZAF

See the number 6? This shows that 6 RSD files are referenced at this bone.
This section bone_2 is "58" units away from the root position. So, basically the numbers before the RSD references only show how many RSD files there are referenced.

Let's say I put this:-

bone_2
root
58.32005
0

bone_3
bone_2
0
1 ABCD

This would make a section called bone_2 appear "58" units away from root but since 0 RSD files are referenced, there will be nothing displayed on screen. In the 2nd section you see that a section called bone_3 is attached to bone_2 with a distance of "0" units. Now bone_3 has a reference to ABCD.RSD. This would make the object ABCD appear "58" units away from root. Get it?

You don't have to match the amount of RSD files referenced with the number of bones specified in the header. Why? Cause their both different things!!! The number of bones specified in the header only needs to be matched with the amount of bones in the HRC file. The "bones" are the the sections bone_2 and bone_3 in the example above. Theoraticaly, you could join all the RSD files in one bone but that wouldn't be the point would it? After all you don't want Cloud to be walking like a stone, right?

You won't see many files that have more than 1 RSD referenced to a single bone (especially humanoid creatures) cause it limits movement. The only reason you would want to use it is to cluster certain objects together like lets say, Aeris' ponytail and her white materia. Note that when you reference multiple RSD files from the same bone, all of them will originate from the same spot thus making it very messy unless it was meant to be like that in the first place.

As for you question on what is "root", I believe "root" is the centre of the entire 3D object since the hip is usually referenced to it. So, you should start building all your 3D objects from "root".

That's all I have to say for now. Does that answer you question Srethron?
If you need any more help feel free to ask. Do you need me to write a complete document about the HRC format?
I gotta study for my programming exam tomorrow so till then, bye!


ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
About the .HRC file type...........
« Reply #22 on: 2001-02-23 17:44:00 »
SaiNt: If you knew exactly how to display a full model that'd be cool ... I've not managed it yet. Individual .P files are no problem, but I haven't managed to display a whole skeleton with all the bones in the correct positions yet...
maybe I should look at Qhimm's source again.

About the .HRC file type...........
« Reply #23 on: 2001-02-24 01:20:00 »
The SaiNt: Thanks for the info. I already knew that the number in each string's 4th line had to match the number of files referenced. I just wasn't quite sure on what you meant in that sentence I quoted.

I've already got a doc on the .HRC format, but if you know anything that you haven't shared yet, sure!


Clone5

  • *
  • Posts: 19
    • View Profile
About the .HRC file type...........
« Reply #24 on: 2001-02-27 01:46:00 »
I've created a file with all the HRC files and what they represent.  I might've missed a few, and some of them have generic names like Man, Woman, Boy, Girl.  I couldn't tell what a few of them were, but got most of them.      http://www.geocities.com/damienaftp/hrc.txt" TARGET=_blank>Here it be.


EDIT: Case Error

[This message has been edited by Clone5 (edited February 26, 2001).]