Difference between revisions of "PSX/HRC"

From Final Fantasy Inside
< PSX
Jump to navigation Jump to search
my_wiki>Halkun
(HRC Hierarchy data format)
m (5 revisions imported)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== HRC Hierarchy data format ==
+
== HRC Hierarchy data format ==
  
 
An HRC file is product of the original Playstation Psy-Q 3D development libraries. They describe the bone hierarchy of a 3D model. Most of the time they originally start as a plain text file exported from 3D editing software, or from a 3D file converter. From this they can be "compiled" into binary form more usable for the PSX.
 
An HRC file is product of the original Playstation Psy-Q 3D development libraries. They describe the bone hierarchy of a 3D model. Most of the time they originally start as a plain text file exported from 3D editing software, or from a 3D file converter. From this they can be "compiled" into binary form more usable for the PSX.
  
On the PC version of Final Fantasy 7 uses a text HRC file to define the skeletal hierarchy of the field models. The Battle Models use the compiled Format.
+
On the PC version of Final Fantasy 7, a text HRC file is used to define the skeletal hierarchy of the field models. The Battle Models use the compiled Format.
  
 
But I think that since you read this document, you've got some knowledge 'bout 3D models and skeletons. Let's just start, this format's quite simple! ^_^
 
But I think that since you read this document, you've got some knowledge 'bout 3D models and skeletons. Let's just start, this format's quite simple! ^_^
  
=== HRC file format ===
+
=== HRC file format ===
  
 
Since the HRC files are simple plain-text files, you can open them in notepad or any other text editor. Here are the first four bones of "abjb.hrc" (Yuffie's Hierarchy)
 
Since the HRC files are simple plain-text files, you can open them in notepad or any other text editor. Here are the first four bones of "abjb.hrc" (Yuffie's Hierarchy)
  
<pre>
+
<nowiki>:HEADER_BLOCK 2
:HEADER_BLOCK 2
+
:SKELETON sd_yufi_sk
:SKELETON sd_yufi_sk
+
:BONES 24
:BONES 24
+
 +
hip
 +
root
 +
2.9662
 +
1 ABJC
 +
 +
chest
 +
hip
 +
4.0621967
 +
1 ABJE
 +
 +
head
 +
chest
 +
5.017107
 +
1 ACAA
 +
 +
joint
 +
head
 +
3.5236073
 +
0
 +
 +
ribon_a
 +
joint
 +
8.52051
 +
1 ACAF
 +
....
 +
</nowiki>
  
hip
+
The other bones look the same as the ones listed here. These are the parts of the file.
root
 
2.9662
 
1 ABJC
 
  
chest
+
====  Header  ====
hip
 
4.0621967
 
1 ABJE
 
  
head
+
As most files, also the HRC files have got a kind of header. That are the first three lines.
chest
 
5.017107
 
1 ACAA
 
  
joint
+
<nowiki>:HEADER_BLOCK 2</nowiki>
head
 
3.5236073
 
0
 
  
ribon_a
+
This seems to be a simple "ID". As far as I know, this is the first line in all HRCs...
joint
 
8.52051
 
1 ACAF
 
....
 
</pre>
 
  
The other bones look the same as the ones listed here. These are the parts of the file.
+
<nowiki>:SKELETON sd_yufi_sk</nowiki>
  
==== Header ====
+
This tells you the name of the skeleton, in our example "sd_yufi_sk".
  
As most files, also the HRC files have got a kind of header. That are the first three lines.
+
<nowiki>:BONES 24</nowiki>
<pre>:HEADER_BLOCK 2</pre>
 
This seems to be a simple "ID". As far as I know, this is the first line in all HRCs...
 
  
<pre>:SKELETON sd_yufi_sk</pre>
 
This tells you the name of the skeleton, in our example "sd_yufi_sk".
 
 
<pre>:BONES 24</pre>
 
 
Tells you how much bones are stored in this skeleton.
 
Tells you how much bones are stored in this skeleton.
  
==== Bones ====
+
==== Bones ====
  
 
Every bone consist of 4 Lines, which look like this. Let's first take a look at the lines of the first bone:
 
Every bone consist of 4 Lines, which look like this. Let's first take a look at the lines of the first bone:
  
<FONT COLOR="GREEN"> First Line: ("hip")</FONT>
+
<font color="GREEN"> First Line: ("hip")</font>
  
 
This is the name of the current bone.
 
This is the name of the current bone.
  
<FONT COLOR="GREEN">Second Line: ("root")</FONT>
+
<font color="GREEN">Second Line: ("root")</font>
  
 
This is the name of the parent bone. The parent bone must be already listed above in the skeleton file,or it can be "root" (origin).
 
This is the name of the parent bone. The parent bone must be already listed above in the skeleton file,or it can be "root" (origin).
  
<FONT COLOR="GREEN">Third Line: ("2.9662")</FONT>
+
<font color="GREEN">Third Line: ("2.9662")</font>
  
 
That's the Length of the bone.
 
That's the Length of the bone.
  
<FONT COLOR="GREEN">
+
<font color="GREEN"> Fourth Line #1: ("0") </font>
Fourth Line #1: ("0")
 
  
Fourth Line #2: ("1 ABJC")
+
<font color="GREEN">Fourth Line #2: ("1 ABJC") </font>
  
Fourth Line #3: ("2 ABJC ABJD")
+
<font color="GREEN">Fourth Line #3: ("2 ABJC ABJD") </font>
</FONT>
 
  
 
This line consist of 2 or more different values. First, there is a number telling many RSD files are aligned to this model. If it has no RSD File, the number is 0. If the number is 1, there is a string after the number telling you the name of the Resource Data File (RSD). The RSD file tells you which .p Model to use.
 
This line consist of 2 or more different values. First, there is a number telling many RSD files are aligned to this model. If it has no RSD File, the number is 0. If the number is 1, there is a string after the number telling you the name of the Resource Data File (RSD). The RSD file tells you which .p Model to use.
Line 85: Line 86:
 
There may be even more than 2 RSD Files on 1 Bone, however this has yet be be seen.
 
There may be even more than 2 RSD Files on 1 Bone, however this has yet be be seen.
  
=== Notes ===
+
=== Notes ===
 +
 
 
There are no bone angles, just bone lengths. The HRC file only contains hierarchy data. To build a skeleton, animation files are required.
 
There are no bone angles, just bone lengths. The HRC file only contains hierarchy data. To build a skeleton, animation files are required.

Latest revision as of 05:25, 23 May 2019

HRC Hierarchy data format

An HRC file is product of the original Playstation Psy-Q 3D development libraries. They describe the bone hierarchy of a 3D model. Most of the time they originally start as a plain text file exported from 3D editing software, or from a 3D file converter. From this they can be "compiled" into binary form more usable for the PSX.

On the PC version of Final Fantasy 7, a text HRC file is used to define the skeletal hierarchy of the field models. The Battle Models use the compiled Format.

But I think that since you read this document, you've got some knowledge 'bout 3D models and skeletons. Let's just start, this format's quite simple! ^_^

HRC file format

Since the HRC files are simple plain-text files, you can open them in notepad or any other text editor. Here are the first four bones of "abjb.hrc" (Yuffie's Hierarchy)

:HEADER_BLOCK 2
 :SKELETON sd_yufi_sk
 :BONES 24
 
 hip
 root
 2.9662
 1 ABJC 
 
 chest
 hip
 4.0621967
 1 ABJE
 
 head
 chest
 5.017107
 1 ACAA 
 
 joint
 head
 3.5236073
 0
 
 ribon_a
 joint
 8.52051
 1 ACAF
 ....
 

The other bones look the same as the ones listed here. These are the parts of the file.

Header

As most files, also the HRC files have got a kind of header. That are the first three lines.

:HEADER_BLOCK 2

This seems to be a simple "ID". As far as I know, this is the first line in all HRCs...

:SKELETON sd_yufi_sk

This tells you the name of the skeleton, in our example "sd_yufi_sk".

:BONES 24

Tells you how much bones are stored in this skeleton.

Bones

Every bone consist of 4 Lines, which look like this. Let's first take a look at the lines of the first bone:

First Line: ("hip")

This is the name of the current bone.

Second Line: ("root")

This is the name of the parent bone. The parent bone must be already listed above in the skeleton file,or it can be "root" (origin).

Third Line: ("2.9662")

That's the Length of the bone.

Fourth Line #1: ("0")

Fourth Line #2: ("1 ABJC")

Fourth Line #3: ("2 ABJC ABJD")

This line consist of 2 or more different values. First, there is a number telling many RSD files are aligned to this model. If it has no RSD File, the number is 0. If the number is 1, there is a string after the number telling you the name of the Resource Data File (RSD). The RSD file tells you which .p Model to use.

There may be even more than 2 RSD Files on 1 Bone, however this has yet be be seen.

Notes

There are no bone angles, just bone lengths. The HRC file only contains hierarchy data. To build a skeleton, animation files are required.