• October 21, 2018, 06:47:36 PM
• Welcome, Guest

Pages: [1]   Go Down

### AuthorTopic: Basic Hier.Him tutorial  (Read 10183 times)

0 Members and 1 Guest are viewing this topic.

#### SAS~Magpie

• OAW Team
• member
• Offline
• Posts: 235
• Viva la Revolucion!
##### Basic Hier.Him tutorial
« on: August 09, 2009, 05:54:53 PM »

EDITING THE HIERARCHY FILE
Stuff you'll need:

1. SFS extractor,

2. Some kind of image editing program, (Photoshop, Gimp, etc. This is more for advanced, franken construction.)

3. Basic file structure knowledge

4. Wrapper installed

First Steps:

Here's the first trick - this folder emulates the file structure of the .sfs files in your il-2 directory, where Il-2 stores all the game data, maps, and models, etc. So anything you put in this directory with the proper format, Il-2 will look there FIRST to load. So if you want to, say, change the wingspan of the Do-335V-13, you create a folder in the MODS directory called "Do-335V-13 Longer Wings" (or whatever, it doesn't actually matter), and then in that directory use this file structure:

/3DO/Plane/Do-335V-13

It's important to use the correct plane name, and sometimes this can be tricky to find out. Some planes have (Multi1) in the name (ie. Ta-183(Multi1)), and some will have a country like F6F-5(USA) - almost all US planes do. Depending on which you use (Multi1) or (USA), you affect which models the plane uses (I think this is why some U.S. planes have those cool USAF markings while others are those big ugly stars). Not all planes have this and it's specific to the plane.

The core construction file for every plane is called hier.him. This file tells the plane how the various mesh files (.msh) are placed and oriented to build the plane. The .msh files are the individual pieces of the plane.

So let's start out easy. Use the .sfs extractor to find the hier.him file in any given aircraft. Then extract it to the MODS/YOURMOD/3DO/Plane/NAME OF PLANE EXTRACTED directory. Now, open up the file and you'll see something like this: (TIP; use wordpad to look at hier and .msh files, as it automatically sorts them. Notepad just makes block text).

Code: [Select]
[_ROOT_]...[CF_D0]Mesh CF_D0Parent _ROOT_Attaching 0 1 0 -1 0 0 0 0 1 -0.03118 -0.00019 -0.17065etc etc
The [-] brackets lists individual parts of the plane, in this case, the CF_D0. These are specific names, usually relating to the .msh files in the directory, but don't have to be. Some creative license can be used in this part, to assist you in keeping tabs on your build. However, what the Mesh is pointing to, has to be exact.

We should note here that as long as the parts called for in the hier.him file are in the .sfs file, the game will find them. IE if you change the mossie hier.him in the MODS folder, the game will use THAT hier.him, and not the one from its' own .sfs file. If you drop in the Bf-110's wings to the MODS mossie folder, the game will use those parts instead, and so on. It's also important to note that the game only recognizes parts that are in the folder when it starts. If it won't load a model or gives a "can't load hier.him" error, try restarting. The other big snafu I run into all the time is when you have two parts with the same name, or a part with a parent that isn't mentioned yet in the hier.him (ie, you have to "build" the plane in order in the hier.him.

So, back to the hier.him file:

Code: [Select]
[_ROOT_] - The point in space where the model is built from...[CF_D0] Part name (Central Fuselage in this case - the D0 means damage, ie D0, D1, D2)Mesh CF_D0 The .msh file to be usedParent _ROOT_ Which part this part is attached toAttaching 0 1 0 -1 0 0 0 0 1 -0.03118 -0.00019 -0.17065 The orientation of the partetc etc...
Additionally, some parts are "Hidden" and/or "Separable". Hidden means they are not revealed, usually for damage meshes (ie CF_D1/2/3 etc). Alternately this can be a good way to hide parts for cosmetic reasons. Note that hidden parts can still be shot, hit the ground, etc.

Separable means that the part can be detached from the parent, as in a crash or if they are shot off.

CAP meshes, like CF_CAP, are the internal frames and structure models, like the bracing in a wing, that appear when a wing snaps off.

It's important when borrowing parts from other planes to use all damage versions of those parts, like WingLOut (Left Wing, outboard)_D0, D1, D2, and D3, plus D_CAP. Otherwise you'll get some strange effects from damage, like a mossie wing suddenly turning into a Bf-110 wing...

When borrowing parts, it's usually a good idea to copy/paste from the original hier.him file as well, although, not necessary. So if you're borrowing, say, the keel from a typhoon for your build, you should grab the rudder as well and find the [keel1_D0] etc entries in the typhoon hier.him, and use these to replace the ones in your mossie. This will ensure that the rudder attaches properly to the keel, and that the parts should be at least sort of oriented properly.

Orientation is going to be the most difficult and painstaking part of model building, but ultimately it's the biggest part of the game.

The attaching line often looks like this:
Code: [Select]
Attaching 1 0 0 0 1 0 0 0 1 0 0 0X Y Z x y z
The capital letters represent stretching. X is wingtip to wingtip, Y is nose to tail, and Z is cockpit to wheels.The first (read capital) digits, are relative to the rotation, and stretching of a mesh - value input dependent. The last three (read lowercase) digits relate to the mesh position, relative to the parent mesh If you wanted to make your wing twice as long, for instance, you'd change the line to:

Attaching 2 0 0 0 1 0 0 0 1 0 0 0

Kumpels Tool is a very handy little utility for this work; DOWNLOAD KUMPELS'S TOOLS At SAS - this will help you with the placement, rotation, and positioning of the meshes.

Sometimes the line has lines like:

Code: [Select]
Attaching 1 0 1.88325e-008 0 1 0 -1.88325e-008 0 1 0.370041 -5.00679e-005 -0.22008
Usually for landing gear..

The last three numbers are for positioning (xyz), so you can move the model up, sideways, forward, etc. I believe it's in meters, so 1.1 means 1 meter, 10 centimeters, etc. This scale might change if the model is bigger or smaller...

You can also use negative numbers. If you want a wing flipped over, for instance, you can make the Z number -1. Be sure to change the X or Y coordinate to -1 as well (you'll have to experiment) or you might make it invisible or inside-out.

This seems simple enough but it gets very complicated. Sometimes a model will be oriented wrong - like a wing standing on its' side, or 90 degrees off angle. One way I have found to correct this is to change the line to:

0 1 0 -1 0 1 0 -1 0 0 0 0

Which sometimes works. Again, it takes alot of experimentation before you get a feel for it. Sometimes even the basic XYZ's are off or reversed, usually because of the CF_D0's orientation, which is different for different planes.

Also be aware that changing the orientation or size of a parent part changes all of it's "children" as well. If you shrink the WingRin (Right Wing inboard) for instance, the whole wing, plus engines and landing gear (if attached there) will shrink with it. Changing the CF_D0 will usually affect the whole plane. Speaking of the CF_D0, this is the most important part of the plane. All the other parts are connected to it, and reorienting it can sometimes cause the plane to fly incorrectly (like sideways). Not all plane parts are oriented properly in the first place, so simply replacing the CF_D0 in the folder might lead to a fuselage 90 degrees off angle, etc, but changing the orientation sometimes changes the flight profile, etc. It can be a real headache. For landing gear, try to use the landing gear of the plane you're using the directory of, because the animation is tied to the specific plane's Class Files. Note that the .msh name doesn't matter (like gearL1.msh), only the [gearL1] entry in the hier.him. Renaming the entry will make the gear non-functional, (and is a good way to cover up wheel wells)

I find the best method to work on planes is to open up the hier.him file and the quick mission builder viewer and switch between the two. Just make the changes in hier.him and reload the plane in the viewer to see the results. You don't have to just add plane models either. If you extract a model from the .sfs files; you can add them to plane directory as well.

It's important to get any .tga and .mat files a .msh file might call for, or it might not work.

(edit2: Changed misleading idea that gear animation is linked to the FM to java class files)
Logged

#### Boomer

• member
• Offline
• Posts: 55
##### Re: Basic Hier.Him tutorial
« Reply #1 on: November 04, 2010, 05:50:15 AM »

I'm modding my first aircraft and have moved the tail, rudder and stabilisers from the plane i want to the new model. The problem is I dont understand the  XYZxyz with the numbers.

For instance, below is my rudder from the heir, and my rudder in game is forward of the position I need it in. I have tried different variants of numbers but just keep losing the plane.

Can someone please explane which numbers in the attaching line sequence move the object forward, rearward, left, right, up, and down please.

Also it states in the explanation that the attaching line often looks like this...1 0 0 0 1 0 0 0 1 0 0 0.... As i understand it the first
1 0 0 0 represents X the next Y and the last Z, so what reresents the xyz.

Regards,

Boomer

[Rudder1_D0]
Mesh Rudder1_D0
Parent Keel1_D0
Separable
Attaching 0 -1 0 0 0 1 -1 0 0  -0.01043 0.49284 0.11211
[Rudder1_D1]
Mesh Rudder1_D1
Parent Rudder1_D0
Hidden
Separable
Attaching 1 0 0 0 1 0 0 0 1 0 0 0
[Rudder1RodL_D0]
Mesh Rudder1RodL_D0
Parent Rudder1_D0
Separable
Attaching 1 0 0 0 1 0 0 0 1 0.0116596 -0.11504 -0.32434
[Rudder1RodR_D0]
Mesh Rudder1RodR_D0
Parent Rudder1_D0
Separable
Attaching 0 0 -1 -1 0 0 0 1 0 0.0102696 -0.11499 0.31365
Logged

#### Boomer

• member
• Offline
• Posts: 55
##### Re: Basic Hier.Him tutorial
« Reply #2 on: November 04, 2010, 12:56:26 PM »

Thanks Crazy,

That helps ALOT I thought the XYZxyz was fixed the same for all aircraft and yes I was starting to go a little nuts.

Thanks for the info,

Cheers,

Boomer
Logged

#### Ectoflyer

• member
• Offline
• Posts: 716
##### Re: Basic Hier.Him tutorial
« Reply #3 on: November 04, 2010, 01:54:59 PM »

Sorry guys, just a doubt: when we find numbers of this kind:
-1.88325e-008
we must edit, with kumpel, the part of numbers before the letter "e", or both, or the part after?
and what the "e" stands for?
Thanks!
Logged

#### Boomer

• member
• Offline
• Posts: 55
##### Re: Basic Hier.Him tutorial
« Reply #4 on: November 04, 2010, 09:48:12 PM »

Ecto,

Boomer
Logged

#### Boomer

• member
• Offline
• Posts: 55
##### Re: Basic Hier.Him tutorial
« Reply #5 on: November 05, 2010, 02:24:53 AM »

Cheers Beo,

Been trying my hand changing your DeHev2, moved the engine cowel back, now trying to change the tail, can finally see the frustration you guys go through.

But hey gotta start somewhere

Boomer
Logged

#### Ectoflyer

• member
• Offline
• Posts: 716
##### Re: Basic Hier.Him tutorial
« Reply #6 on: November 05, 2010, 12:51:03 PM »

Ecto,

Boomer

Thank you guys!
Logged

#### Checkyersix

• Modder
• member
• Offline
• Posts: 1177
• Dr. Frankenplane
##### Re: Basic Hier.Him tutorial
« Reply #7 on: November 20, 2010, 08:36:13 PM »

I've been modding the hier.him for years, but I've always wondered one thing: What does the CollisionObject Sphere line do? Anyone know?
Logged

#### Jonzynator

• Modder
• member
• Offline
• Posts: 350
• Lurking around(2013)
##### Re: Basic Hier.Him tutorial
« Reply #8 on: November 20, 2010, 09:32:48 PM »

I've been modding the hier.him for years, but I've always wondered one thing: What does the CollisionObject Sphere line do? Anyone know?

Isn't it like a bubble around an aircraft? Like for say a sphere around an object in witch it can be damaged
Logged

#### Verhängnis

• Unofficial Heinkel Fan
• Modder
• member
• Offline
• Posts: 1496
##### Re: Basic Hier.Him tutorial
« Reply #9 on: November 23, 2010, 04:04:32 AM »

I've been modding the hier.him for years, but I've always wondered one thing: What does the CollisionObject Sphere line do? Anyone know?

Isn't it like a bubble around an aircraft? Like for say a sphere around an object in witch it can be damaged

I thought that was what collision boxes did?
Also interested in this...
Logged

#### asheshouse

• SAS Team
• member
• Offline
• Posts: 2489
##### Re: Basic Hier.Him tutorial
« Reply #10 on: November 23, 2010, 07:38:43 AM »

I am just guessing here but --

Each object can have a large number of collision boxes which would take a long time to check, so possibly the first level of collision check just looks at the spheres then only if a sphere is intercepted does the game engine bother to check the individual collision boxes.
Like I said, I am only guessing.
Logged
Pages: [1]   Go Up

Page created in 0.022 seconds with 22 queries.