Qhimm.com Forums

Final Fantasy 7 => FF7 Tools => Topic started by: Borde on 2005-07-10 14:47:58

Title: [PC] HRC Resizer
Post by: Borde on 2005-07-10 14:47:58
Well, while Reunion figures out how to solve the clipping problems with the hi-res models (or you want hi-res SD models like me :-P), you may use this program to adjust the size of the models in order for them to fit better on the background.
Here you have:
http://perso.wanadoo.es/e/ventanucos/HRC_resizer.zip (http://perso.wanadoo.es/e/ventanucos/HRC_resizer.zip)

Updated with ice_cold513 FAQ. Thanks for writting it!
Title: FF7PC field model resizer
Post by: ice_cold513 on 2005-07-10 14:57:24
WWWWEEEEEeeee

thx you i love the SD models on the FF games im going to have a messabout with this tool now

any big bugs to stay from??
Title: FF7PC field model resizer
Post by: Borde on 2005-07-10 15:28:44
None that I'm aware of. But who knows?
Title: FF7PC field model resizer
Post by: ice_cold513 on 2005-07-10 15:30:48
Ok thxs

OK Boys & Girls lets go bug hunting. :wicked:  :wicked:
Title: Re: [FF7] HRC Resizer
Post by: obesebear on 2016-01-21 21:16:49
Ok guys, yes this is ancient, but I have a request.  I have no idea how to make programs, and I have a huge task of manually resizing each and every NPC to certain, specific sizes.  This means I have to manually edit the .hrc file for every bone.

It would save me months of work if someone could create a program, very similar to this one, that instead of adjusting the bones by a percentage, adjusts them based on the numbers inputted.  Thanks in advance if anyone is up to this or even has the know how.
Title: Re: [FF7] HRC Resizer
Post by: ficedula on 2016-01-22 11:42:47
Sure, should be trivial.

How would you intend to input the information? Give a couple of examples of the changes you'd be making.
Title: Re: [FF7] HRC Resizer
Post by: EQ2Alyza on 2016-01-22 11:54:04
Ok guys, yes this is ancient, but I have a request.  I have no idea how to make programs, and I have a huge task of manually resizing each and every NPC to certain, specific sizes.  This means I have to manually edit the .hrc file for every bone.

It would save me months of work if someone could create a program, very similar to this one, that instead of adjusting the bones by a percentage, adjusts them based on the numbers inputted.  Thanks in advance if anyone is up to this or even has the know how.

I 2nd this idea.
Title: Re: [FF7] HRC Resizer
Post by: Kaldarasha on 2016-01-22 14:53:40
Ok guys, yes this is ancient, but I have a request.  I have no idea how to make programs, and I have a huge task of manually resizing each and every NPC to certain, specific sizes.  This means I have to manually edit the .hrc file for every bone.

It would save me months of work if someone could create a program, very similar to this one, that instead of adjusting the bones by a percentage, adjusts them based on the numbers inputted.  Thanks in advance if anyone is up to this or even has the know how.

What you are doing is entirely different from my resizing method (which I have completed since 2 years or so). I have changed the scale the model would have in a certain field within the flevel.lgp. You change the size a model will have globally in any field. Never the less both ways create a big problem: the models aren't placed on the walkmesh correctly and will standing through it.

Sadly the only realistic solution to compensate that is to change all animations to the new high, and even then there are animations which hardly can be corrected because they have a full move a scene (a MP animation springs in my mind).
Here what I had done for Cloud so far:
https://mega.nz/#!WYtR1Y4A!MMXit515P2WEYQEVf_Qp_mQ7x7DQHXbwWT5foam7ax0

Sure, should be trivial.

How would you intend to input the information? Give a couple of examples of the changes you'd be making.

This is a tricky task because some models get a body correction trough the animation (see Tifa and Aerith). I think it would be clever to normalize the leg bones and changing the other bones by the percentage the upper leg bone has grown.


I actually need a tool which can edit the animation files itself because it would be much better if I could convert an animation with 24 bones to 40 bones. The new bones doesn't even need to be animated.But  this way we could unify all human animations and never getting trouble anymore if we change a model with a different bone number.
Title: Re: [FF7] HRC Resizer
Post by: obesebear on 2016-01-22 16:18:39
Sure, should be trivial.

How would you intend to input the information? Give a couple of examples of the changes you'd be making.

I would want to be able to type them in. It would need to load the hrc to verify how many and what bones.

The only issue, like kaldarasha was saying, is that some of the models, like the children, use animations that adults use due to having the same number of bones. However, I think that problem can be bypassed by not adjusting bone lengths too severely
Title: Re: [FF7] HRC Resizer
Post by: ficedula on 2016-01-22 17:49:17
I would want to be able to type them in. It would need to load the hrc to verify how many and what bones.

The only issue, like kaldarasha was saying, is that some of the models, like the children, use animations that adults use due to having the same number of bones. However, I think that problem can be bypassed by not adjusting bone lengths too severely

More specific, please.

Do you envisage loading a HRC, being presented with a grid showing all the bones with their current lengths, and just moving down the grid and applying an adjustment to each one? Or some other interface?

Would you overtype the current length, or would you want to type in an adjustment (+2.4, -0.45, ...) ? Would you need the ability to apply an adjustment to a whole bunch of bones at once? If you adjust a parent bone, should it apply any changes to the child bones at all, or leave them unchanged?

What you are doing is entirely different from my resizing method (which I have completed since 2 years or so). I have changed the scale the model would have in a certain field within the flevel.lgp. You change the size a model will have globally in any field. Never the less both ways create a big problem: the models aren't placed on the walkmesh correctly and will standing through it.

Sadly the only realistic solution to compensate that is to change all animations to the new high, and even then there are animations which hardly can be corrected because they have a full move a scene (a MP animation springs in my mind).
Here what I had done for Cloud so far:
https://mega.nz/#!WYtR1Y4A!MMXit515P2WEYQEVf_Qp_mQ7x7DQHXbwWT5foam7ax0

This is a tricky task because some models get a body correction trough the animation (see Tifa and Aerith). I think it would be clever to normalize the leg bones and changing the other bones by the percentage the upper leg bone has grown.


I actually need a tool which can edit the animation files itself because it would be much better if I could convert an animation with 24 bones to 40 bones. The new bones doesn't even need to be animated.But  this way we could unify all human animations and never getting trouble anymore if we change a model with a different bone number.

Just adding new not-actually-doing-anything bone entries to the animation files should be pretty easy. Fundamentally it's basically just inserting a bunch of zero rotations into the file.
Title: Re: [FF7] HRC Resizer
Post by: Kaldarasha on 2016-01-22 18:01:06
If I understood Bear correctly he wants to nomalise the models to one size.
Title: Re: [FF7] HRC Resizer
Post by: obesebear on 2016-01-22 19:46:03
I would like an interface where the hrc is loaded and each bone is labeled (i.e. hip root) and has a box beside it where the bone length is displayed.   This box can then be easily edited using the numpad on the keyboard to input whatever length is desired.  It would also be helpful for them to be in a list format so that multiple bone lengths can be displayed at once so scrolling is minimized. For my purposes, it would be IMMENSELY helpful to be able to temporarily store lengths so that with the click of a button, the saved lengths can be applied to the new hrc without having to manually type each one in.  So if I want to change hip root from 1.0 to 1.2 and apply it to others, I could click a box beside the length to save whatever number has been input, once a new hrc is loaded, another box can be pushed to load 1.2 in place of whatever number the hrc originally had.  This is most beneficial for skeletons like Cloud where there are 64 other models that have his exact same structure.

As far as adding new bones that don't do anything, that may throw errors in kimera, but should work fine in game.  If it's easy to do, it could be worth trying, at least until a proper converter is made for them
Title: Re: [FF7] HRC Resizer
Post by: obesebear on 2016-03-28 23:38:52
Ficedula hasn't logged in for over a month.  Is anyone else willing and able to to create this program?
Title: Re: [FF7] HRC Resizer
Post by: New Pagodi on 2016-04-17 13:42:16
Ficedula hasn't logged in for over a month.  Is anyone else willing and able to to create this program?

Are you still looking for this?  If so, is this the kind of thing you're looking for?
(http://i.imgur.com/hBGGZ4f.png)
I think I could make an editor like this.
Title: Re: [FF7] HRC Resizer
Post by: obesebear on 2016-04-17 13:54:15
Yes!
It will need to be able to read the .hrc to know what bones are used in the model, but the big feature I need is for the lengths I input to stay even when a new hrc is loaded.  That way I can open aaaa.hrc, set all of its bone lenths, save it; then when I open aaab.hrc, all the lengths I manually typed in will still be up (or a button can be pressed to recall them?) so that all I have to do is open aaab.hrc and save it and all of its lengths will be the changed to the same as aaaa.hrc
Title: Re: [FF7] HRC Resizer
Post by: genesis063 on 2016-04-17 19:17:48
Could there be a one made for the battle models as well or give it support for them?  It would help great for us non-hex savvy modders for giving Sephiroth and other characters different animations and create new characters and bosses the way we in-vision them.
Title: Re: [FF7] HRC Resizer
Post by: New Pagodi on 2016-04-19 08:24:44
Yes!
It will need to be able to read the .hrc to know what bones are used in the model, but the big feature I need is for the lengths I input to stay even when a new hrc is loaded.  That way I can open aaaa.hrc, set all of its bone lenths, save it; then when I open aaab.hrc, all the lengths I manually typed in will still be up (or a button can be pressed to recall them?) so that all I have to do is open aaab.hrc and save it and all of its lengths will be the changed to the same as aaaa.hrc

This project ended up being a little harder than I thought, but I should have something soon.  One question, when an HRC has an entry like:

Code: [Select]
l_hand
l_foarm
2.2786036
#1 l_hand
2 ERJE ESAA

is the '#1 l_hand ' significant.  Almost all entries only have 4 lines and so I'm assuming those are comments or something like that.
Title: Re: [FF7] HRC Resizer
Post by: Kaldarasha on 2016-04-19 17:44:05
Yep that entry should be ignored.
While you at creating a new program I could need two new functions: one is to change the vertices type to 0, 1 or 2 (http://wiki.qhimm.com/view/FF7/P#.P_File_Header), the other is to remove the textured flag from a group of a p-file. I have ask Dan already for that and he would do it, when he gets the time for it. However if you already working on a similar tool there is probably no need for another tool.
Title: Re: [FF7] HRC Resizer
Post by: DLPB_ on 2016-04-19 20:04:10
Yeah, and it would save me a lot of time :)
Title: Re: [FF7] HRC Resizer
Post by: New Pagodi on 2016-04-20 10:03:00
I would like an interface where the hrc is loaded and each bone is labeled (i.e. hip root) and has a box beside it where the bone length is displayed.   This box can then be easily edited using the numpad on the keyboard to input whatever length is desired.  It would also be helpful for them to be in a list format so that multiple bone lengths can be displayed at once so scrolling is minimized. For my purposes, it would be IMMENSELY helpful to be able to temporarily store lengths so that with the click of a button, the saved lengths can be applied to the new hrc without having to manually type each one in.  So if I want to change hip root from 1.0 to 1.2 and apply it to others, I could click a box beside the length to save whatever number has been input, once a new hrc is loaded, another box can be pushed to load 1.2 in place of whatever number the hrc originally had.  This is most beneficial for skeletons like Cloud where there are 64 other models that have his exact same structure.

I've put this on my github page (https://github.com/NewPagodi/HrcEdit/releases/tag/v0.0.1).  I usually just write software for my use.  This is the first thing I've tried to release for others to use.  I hope it works.

I hope the utility is self explanatory.  There's 3 tabs.  On the first one you can load and edit an hrc file.  You load a profile to update all the values at once.  On the second tab you can save the current values to a new profile.  The 3rd tab is a batch tool.  You can drop a bunch of files on it, select a profile, and hit the go button and it will TRY to update all the files at once. 

The utility is severely undertested, so please back up anything you want to change first.
Title: Re: [FF7] HRC Resizer
Post by: New Pagodi on 2016-04-20 10:52:34
Could there be a one made for the battle models as well or give it support for them?  It would help great for us non-hex savvy modders for giving Sephiroth and other characters different animations and create new characters and bosses the way we in-vision them.

Possibly.  I need more information on what you want.

Yep that entry should be ignored.
While you at creating a new program I could need two new functions: one is to change the vertices type to 0, 1 or 2 (http://wiki.qhimm.com/view/FF7/P#.P_File_Header), the other is to remove the textured flag from a group of a p-file. I have ask Dan already for that and he would do it, when he gets the time for it. However if you already working on a similar tool there is probably no need for another tool.

Again possibly.  My background is primarily in parsing and processing text based files, but I should be able to write something to manipulate binary info.  Looking over that page, I can certainly change the byte to set the vertices type, but I'm not sure what the what the textured flag is.
Title: Re: [FF7] HRC Resizer
Post by: genesis063 on 2016-04-21 02:51:09
I'm not sure how it works exactly as I am a total noob with that stuff.  I would think at the very least you can have a function to compare say Sephiroth with Cloud animations to their bones then allow for Sephiroth file to be edited to that number.  You could then load that file into his model and just rearrange the parts from scratch to play out how you like them.  I know one hexer did this and it worked and he said he just had to redo the animations so they don't stay a mess with Kimera.  That is basically it and limits have their one file for it from a different lgp but it still loads.  The main reason we need to edit the bones in the files is because it just wont load otherwise.
Title: Re: [FF7] HRC Resizer
Post by: obesebear on 2016-04-21 02:58:44
I'll just say that adding bones is all week and good, but if you're wanting to do that and create new animations, I would try to see how hard it is to deal with animations in kimera before tackling such a monumental task
Title: Re: [FF7] HRC Resizer
Post by: Kaldarasha on 2016-04-21 09:14:25
So I tested few of the edits for the settings I need. The Vertices setting does only need a fix Vertices button, because mode 2 is probably the flag the game use to hide a model. So the program should set it only to mode 1. The texture flag is harder to get rid of as I expected, because it needs to make the NumTexCoords to 0 as also it needs to remove the array were the text coords are stored. Here are two test files I made:https://mega.nz/#!udlDSQBb!OjM026qUn6gOiII0pzrNCpQc6Wx9pND_wRr5PLVyQfY
The array starts at 000027C0x8.
Is it actually possible to cut out code from a file?
Title: Re: [FF7] HRC Resizer
Post by: genesis063 on 2016-04-22 07:46:43
I'll just say that adding bones is all week and good, but if you're wanting to do that and create new animations, I would try to see how hard it is to deal with animations in kimera before tackling such a monumental task
This came from meesbaker he is the one that told me all he had to do once he changed it was to then edit them in Kimera to play right on Sephiroth's model.  You can probably get more detail from him.  I just and probably many others just need a program to make up for our lack of hex editing to make it possible for the rest of us.  The biggest issue is the bones that are counted into the models for those animations.
Title: Re: [FF7] HRC Resizer
Post by: New Pagodi on 2016-04-22 17:46:12
So I tested few of the edits for the settings I need. The Vertices setting does only need a fix Vertices button, because mode 2 is probably the flag the game use to hide a model. So the program should set it only to mode 1. The texture flag is harder to get rid of as I expected, because it needs to make the NumTexCoords to 0 as also it needs to remove the array were the text coords are stored. Here are two test files I made:https://mega.nz/#!udlDSQBb!OjM026qUn6gOiII0pzrNCpQc6Wx9pND_wRr5PLVyQfY
The array starts at 000027C0x8.
Is it actually possible to cut out code from a file?

I tried writing a viewer to see if I could at least read the data (https://github.com/NewPagodi/PfileView/releases) in those files.  Since I don't know what the numbers are supposed to be I don't know if I'm reading them right.  Can you try it and see? 

I'm pretty sure that I'm at least reading the floats wrong, because in the bounding box section of one of the files you uploaded, the utility the utility reads the maxz as less than the minz.  That obviously can't be right.

One problem I already see is in the "Hundreds" section of the file.  The link you gave says it's a "Complex structure that specifies render state (texturing, blend modes, culling, filtering, depth testing, depth masking, shademode etc)" 

Do you have the details of that structure?  It seems to be of variable size.  In one of the files you uploaded, it appears to be 108 bytes and in the other it's 104 bytes.  In the viewer, I simply output the bytes in hex and decimal since I don't know what the bytes are supposed to mean.

edit: updating the link.
Title: Re: [FF7] HRC Resizer
Post by: New Pagodi on 2016-04-22 21:17:02
After looking at a few more pfiles, I guess the hundreds structure is not variable size but always 100 bytes (hey, it's right there in the name). 

But there seems to be an extra 4 bytes between the groups items and the final 2 items (Bounding boxes and the Normal index table). 

At least with these 2 assumptions, the numbers the viewer spits out seem to make more sense.

Also, there seems to be an extra 4 bytes (all zeros) at the end the Swordtest.p file that was uploaded.  That's why I originally thought the hundred table was variable size.  Are those extra bytes supposed to be there?