Author Topic: Importing custom models into ff7  (Read 6820 times)

Locutus

  • *
  • Posts: 30
    • View Profile
Importing custom models into ff7
« on: 2004-12-27 18:52:46 »
I have few questions, ideas.

imagine that i have high poly model of Aerith
I would like to import it into ff7 as battle or field model.
Present Aerith battle model is made of many files.
Rvaa file has information about animation, skeleton and position of various model parts.
Other small files are parts of the body and atachments points.
My idea is to export ff7 Aerith into 3d model software then create  ,or get (from few web artists) high poly aerith model.  New aerith must have pose, and proportions of the old Aerith. Then we are breaking apart new Aerith into pieces.Each piece must have atachments point. Then we must export pieces,models into ff7 3d format and replace old files in ff7 archive with new ones.
Important thing - we are not changing Rvaa file so animation and skeleton is preserved. We must have this same number of new 3d files as the number of old 3d files.

Questions.Problems
There is software ,Mirex Biturn to  convert ff7 3d files into other formats but there is no software to convert it back into ff7 model. How to do it?

Is it possible to import high poly model into ff7 or there is a polygon, memory limit for that or any other problems?

Waiting for your comments ,sugestions, ideas

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
Importing custom models into ff7
« Reply #1 on: 2004-12-27 21:15:59 »
It - cannot - be - done.

Right now there is no software that could convert 3d files into FF7 3d format.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Importing custom models into ff7
« Reply #2 on: 2004-12-28 16:19:38 »
As Mirex stated this is not currently possible.

There are a few things impeeding this:
We don't know the animation format well enough is the primary one.
On the PC it might be a bit easier.  Though I suppose it's possible to do on the playstation version it would not do much for performance on that platform.  Ditto for PC actually.

The only way to actually make such a model useful is to make a new engine to run the FF7 data set, this would allow for better performance all around as well.

It's a nice thought though :)

Cyb

Locutus

  • *
  • Posts: 30
    • View Profile
Importing custom models into ff7
« Reply #3 on: 2004-12-28 17:29:59 »
We do not need to know animation data becouse we do not change animation files.
We are need only to change part of the character's body. And need to set "atachment" "rotation", point
Animation,body part assemble file is intact. This file containing animation, skeleton will put together changed body parts and will animate them normaly.
We only need to know how to convert 3d formats into ff7 format. (so we need to know - geometry data, vertex color ,( since we are creating high poly models we don't need textures),  we need also a knowledge how atachments points are stored). Knowledge about normal bones and animation is not needed (it would be needed if we were to create compleately new models with new proportions, poses and animations)

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Importing custom models into ff7
« Reply #4 on: 2004-12-29 10:24:59 »
It is(theoretically)possible.

As far as you do not change any skeleton/animation data, of course.
The .p File Format itself has been decoded to ~95% (by me  :roll: )

Quote from: Alhexx Homepage
2002-12-17 #2:
Hm, second update today ... it's a long time ago when site has been udpated twice per day :P
Well, okay, only 19 minutes until tomorrow...
There's something VERY interesting I wanted to show you NOW, and not tomorrow:
Take a look at those two Screenshots: Yuffie #1 and Yuffie #2
I just want to point out: That Triangle is 100% Ultima-generated! :)


I have been able to generate a .p Model from scratch:
Mod Warning: Don't try to revive this topic!
http://forums.qhimm.com/viewtopic.php?t=1758&start=9

To sum it up:
1. Technically, it is possible to generate a FF7 .p file from scratch.
1.1. However, if you take a closer look at my description, there are 2 sections in the file that cannot be generated from scratch yet, but can be copied from the original files:
1.1.1. The extended Header (Bytes 64 - 128)
1.1.2. The "Hundrets Pool"

I have been working on that extended header, which possibly is just a set of checksums or something. But if you leave the extended header 0, FF7 won't crash but will accept the files.
As for the Hundrets... don't know but it seems to be a kind of texture information...

Conclusion:
It is possible, but it exporting from 3ds max or maya into FF7 .p format would require writing new plugins, and you won't get around manually hex-editing the generated files... but it is possible.

 - Alhexx

Cyberman

  • *
  • Posts: 1572
    • View Profile
Importing custom models into ff7
« Reply #5 on: 2004-12-29 20:20:02 »
Quote from: Locutus
We do not need to know animation data becouse we do not change animation files.
We are need only to change part of the character's body. And need to set "atachment" "rotation", point
Animation,body part assemble file is intact. This file containing animation, skeleton will put together changed body parts and will animate them normaly.
We only need to know how to convert 3d formats into ff7 format. (so we need to know - geometry data, vertex color ,( since we are creating high poly models we don't need textures),  we need also a knowledge how atachments points are stored). Knowledge about normal bones and animation is not needed (it would be needed if we were to create compleately new models with new proportions, poses and animations)


Mmmmm... all righty since you think it's so simple let me explain.  The bone structure is stored in section 1 of the PSX files.   There is a slight problem here, but I suppose it doesn't matter.  This section contains
Code: [Select]

struct bone
{
 U16 PARENT;
 S16 LENGTH;
 U32 OFFSET;
};
U32 BoneCount;
bone RootBone;
bone Bones[BoneCount];

There are bones with an offset of 0 these are joints.  Anything with a real offset has a length and shape because OFFSET points to the data for the bone.  So now you have your basic bone structure.

now comes your bone description
Code: [Select]

struct Vertex
{
 S16 X, Y, Z;
 U15 U;
};

struct Color
{
 U8 R,G,B;
 U8 U;
};

struct Poly
{
 U16 A, B, C, D;
};

struct TexCnt
{
 U16 Count;
 U16 Page;
};

struct Triangle
{
 Poly Veticies;
 Color Colors[3];
};

struct Quadric
{
 Poly Verticies;
 Color Colors[4];
};

struct TexTriangle
{
 Poly Verticies;
 U8 U0, V0;
 U16 PAL;
 U8 U1, V1, U2, V2;
};

struct TexQuadric
{
 Poly Verticies;
 U8 U0, V0;
 U16 PAL;
 U8 U1, V1, U2, V2, U3, V3;
 U16 R;
}

U32 VertexPoolSize;
Vertex Verticies[VertexPoolSize/8];
TexCnt TexTriC;
TexTriangle TexTris[TexTriC.Count];
TexCnt TexQuadC;
TexQaudric TexTris[TexQaudC.Count];
U32 TriangleC;
Triangle Triangles[TriangleC];
U32 QuadC;
Quadric Quads[QuadC];

So the part you need to alter is the part pointed to by each bone.  You could for example use 256 color textures and fully skin your subject with up to a 256x256 pixel bitmap. (Colors are limited to 16bit RGB on the playstation version).  This might save some space as the textured polys require less space in the face pool.

You must meet the original critera for the bone size also.  You can get that from the bone length information etc. contained in the PC's HRC files.  As Alhexx noted you'll have to generate a .P file from your model information.  Looks to be not so simple huh? :D

I think it's still a lot of work even if you don't need the animation information (though if you change ANYTHING reguarding bone length then.. you are on your own).

Cyb

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Importing custom models into ff7
« Reply #6 on: 2004-12-30 10:16:00 »
Well, you don't need to change bone lengths (usually), since when you simply want to replace the geometry by a high-quality one, the skeleton and and animation will be the same...

And, btw: Are we talking about a PSX or a PC Mod???

As for the texturing: If it is a good a idea to skin the whole model or not is another discussion, but it would break FF7's style to create (fully) textured models.

Okay, it is possible to create new FF7 .p models, at least for the PC Version, but it would require writing a 3ds max or maya plugin... (but I wanted to do that anyway...)
And like I said, it is possible.

Locutus, two questions:
1. Was this just a "I'm-curious-and-I-want-to-know-if-it-is-possible" Question, or do you want to start a serious project?
If the answer is I'm just curious, you can skip the rest of this post.
2. Which Modeller are you using? (3ds max, lightwave, maya, ...) ?

If you seriously want to start a project, then you should get the tools which are currently out there, and import the FF7 models into your modeller and start working. A Topic for model replacement (not requests, but running projects) are likely seen in the Game Tweaking forum.
So start modelling and post some screenshots of your work here.
If your work is satisfying, you can leave that "back-importing" into FF7 to me  :wink:

Good Luck!

 - Alhexx

Cyberman

  • *
  • Posts: 1572
    • View Profile
Importing custom models into ff7
« Reply #7 on: 2004-12-30 16:03:56 »
Quote from: Alhexx
Well, you don't need to change bone lengths (usually), since when you simply want to replace the geometry by a high-quality one, the skeleton and and animation will be the same...

And, btw: Are we talking about a PSX or a PC Mod???

Oddly Yes.. both. :)  I assumed he has the PC version but PSX version would be just as easy to do with a nice CD Image editing suite.
Quote from: Alhexx
As for the texturing: If it is a good a idea to skin the whole model or not is another discussion, but it would break FF7's style to create (fully) textured models.

Eeee the dreaded S word ;) It might.. FF8 used up to 2 128x128 textures for there images.  A larger texture might yield some nice details.  For the PSX version although the colored vertexs work fine, they do consume space.  For each color you need 1 double word of space. So  for 1 triangle you need 8 + 12 bytes (20 bytes each) a textured one requires 8 + 8 bytes or 16 bytes.  Quadrics are the same problem.  All must be double word aligned.  A quadric is 24 bytes and a textured quadric is 20 bytes.  If you have a lot of faces it can add up fast.
Quote from: Alhexx
Okay, it is possible to create new FF7 .p models, at least for the PC Version, but it would require writing a 3ds max or maya plugin... (but I wanted to do that anyway...)
And like I said, it is possible.

Locutus, two questions:
1. Was this just a "I'm-curious-and-I-want-to-know-if-it-is-possible" Question, or do you want to start a serious project?
If the answer is I'm just curious, you can skip the rest of this post.
2. Which Modeller are you using? (3ds max, lightwave, maya, ...) ?

If you seriously want to start a project, then you should get the tools which are currently out there, and import the FF7 models into your modeller and start working. A Topic for model replacement (not requests, but running projects) are likely seen in the Game Tweaking forum.
So start modelling and post some screenshots of your work here.
If your work is satisfying, you can leave that "back-importing" into FF7 to me  :wink:

Good Luck!

 - Alhexx

Good point tweaking this is indeed. Hmmm doh?

Cyb