Author Topic: [FF7] Importer script for Blender 2.6x (Missing Download)  (Read 6683 times)

Amanitas

  • Fast newbie
  • *
  • Posts: 6
  • Karma: 1
    • View Profile
It has been a bit since I have 'released' version 0.4 but I have been working on an import script for Blender 2.6x that will import .p files. The attached video shows the script at a point when you could only import the .p with materials and broken textures.

Since then, I have been working a bit on the bones and animation and I am a few hours from being able to import a .hrc (skeleton file) and load in animations into blender.

There is currently no support for exports.

I would like to know now if this is a tool people would like to have. I would not like to waste my time scripting if no one will use it.

Blender was chosen because it can support 'actions' where multiple animations can be assigned to one skeleton and can be called in the game engine ;-)

Any feedback is appreciated.

Sorry, the video is more of a walkthrough of the script and not a Demo.

http://www.youtube.com/watch?v=wJnRQYjX3zw
« Last Edit: 2014-07-17 18:09:14 by Covarr »

syntax error

  • Crazy poster
  • *
  • Posts: 148
  • Karma: 0
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #1 on: 2012-04-05 11:18:22 »
Blender 2.63 is to arrive soon.
Even if no exporter is available, interested modders can create funny videos using battle models.

Vgr

  • Global moderator
  • No life
  • *
  • Posts: 2206
  • Karma: 33
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #2 on: 2012-04-06 00:12:46 »
I am definetly interested. As for an export script, I would be even more interested! Keep us updated! :D

Amanitas

  • Fast newbie
  • *
  • Posts: 6
  • Karma: 1
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #3 on: 2012-04-06 16:22:00 »
Well I have finally been able to get bones posed and all frames loaded into blender.

The first problem what I was using degrees instead of radians, so cloud looked like he was sent through a garbage disposal.

Second problem seems to be the axes. After playing with them, it turns out that I had to read the rotation values in in the order of ZXY.

But even after this, the animations are just slightly off. Not by much at all.

It would be awesome if someone like Mirex, who has played around with FF7 animation files, could explain a bit better about the rotations.


ficedula

  • No life
  • *
  • Posts: 2179
  • Karma: 40
    • View Profile
    • http://www.ficedula.co.uk
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #4 on: 2012-04-07 18:03:25 »
You say you 'read' the rotation values in ZXY order ... hopefully you mean that's the order you're applying them in? Because you should be reading them from the FF7 files in XYZ order - but then actually applying them in ZXY order.

I don't know what format the Blender file requires rotations to be specified in (quaternions? actual axis rotations?); but be aware that different libraries can have different conventions for how you specify the order of rotations. For example, [at least some versions of] OpenTK specifies matrix multiplication the opposite way around to OpenGL, so when translating code from one to the other, you have to reverse the order matrices get multiplied in. If you're using a library to convert the rotations into the format Blender wants, be careful which order you're doing the multiplications in. May be worth just swapping things around to see if it helps...

Dark_Ansem

  • Insane poster
  • *
  • Posts: 271
  • Karma: 0
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #5 on: 2012-04-12 06:56:26 »
tracking, will install blender just for this when it is released. a much needed upgrade.

whitERaven

  • Insane poster
  • *
  • Posts: 406
  • Karma: 2
  • when the Raven turns white..
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #6 on: 2012-08-03 08:51:47 »
Hi! what could have happen to this project??  this would be very helpful considering blender is easy to get..

So what is the status of this project??

neomonkeus

  • Fast newbie
  • *
  • Posts: 29
  • Karma: 1
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #7 on: 2012-08-04 11:59:55 »
Don't know what the current state of the project is but it will probably need a fair bit of additional work as Blender 2.63 re-vamped the mesh system *BMesh*, which breaks any pre-2.63 scripts.

That said, they seem to be pretty far along, though the video doesn't give you much detail.

Edit: Amanitas has graciously agreed to create a public repo for this script over the next few days or so.
« Last Edit: 2012-08-05 22:53:00 by neomonkeus »

Amanitas

  • Fast newbie
  • *
  • Posts: 6
  • Karma: 1
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #8 on: 2012-08-07 02:54:26 »
I Havent actually been allowed to computers overthe last few months, which would explain my absence. I just got a new job and they have been pretty relentless with my hours, but i should be able to get some work done in the script tomorrow.

If what you said about meshes
Being handled
Differently in blender 2.63 then I might as well rewrite the code
Anyways. I have a pretty good start and like you
Just said I will have a repo up.

It will be located at http://www.github.com/jacobvalenta/ffimport

Not much there right now.

Dark_Ansem

  • Insane poster
  • *
  • Posts: 271
  • Karma: 0
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #9 on: 2012-08-07 06:17:34 »
I wonder if the same script will be used for the re-release.

Vehek

  • Crazy poster
  • *
  • Posts: 219
  • Karma: 9
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #10 on: 2012-08-07 08:59:40 »
If what you said about meshes
Being handled
Differently in blender 2.63 then I might as well rewrite the code
Anyways. I have a pretty good start and like you
Just said I will have a repo up.
How were you creating the mesh? I'm not sure how to explain this, but how hard the upgrade is depends on what method was used to generate the mesh. By default, Blender uses ngons, referred to as "polygons". Before, it was only triangle/quad faces, now called "tessfaces". It's still possible to use faces, but the names for face-based types are different, and I think they can't be modified if ngons have already been generated for the mesh. Well, at least, I was never able to get changes to the UVs to persist when ngons existed.

from_pydata now generates a mesh using the ngon system. UVs in meshes with ngons work differently than tessfaces. I'm not sure if I can explain this correctly. Polygons are made up of "loops". UVs are assigned to entries corresponding to each loop. With tessfaces, UVs are assigned to entries corresponding to each face, all 3 or 4 UV coords for the face.

neomonkeus

  • Fast newbie
  • *
  • Posts: 29
  • Karma: 1
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #11 on: 2012-08-07 13:22:43 »
To be honest, I have not investigated the BMesh system thoroughly, happily existing in 2.62 land until things are working enough to make the move. Currently marching forward to the next milestone seems better than going backwards and redoing.

From what I have looked at BMesh is something that you will only need to use if you need to. For import/export scripters, we can just use bpy mesh/polygons stuff as we dont need to deal with those things as we work in tri-land.

That said there maybe advantages that I have yet to comprehend like vertex color access might be easier through BMesh.
« Last Edit: 2012-08-07 16:44:06 by neomonkeus »

Amanitas

  • Fast newbie
  • *
  • Posts: 6
  • Karma: 1
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #12 on: 2012-08-07 14:43:51 »
I was using from_pydata to construct the mesh. Hopefully nothing has changed but I think I will go ahead and "rewrite" it anyways. Mostly it would just to clean up the code so it is readable.

Thank you for the explaination on the new bmesh, unfortunately it seems I didn't keep as up to date as I would like :) Hopefully bmesh will leave us alone.

Should have some working code here later today or tomorrow.

Amanitas

  • Fast newbie
  • *
  • Posts: 6
  • Karma: 1
    • View Profile
Re: [WIP] Final Fantasy VII importer script for Blender 2.6x
« Reply #13 on: 2012-08-09 15:56:21 »
Status Update :)

So currently you can import models again (wireframe included). I recently found some code for importing .p files in a more efficient way (I think) so I will probably using some of that code (its from 2.49). I will also be adding materials. I will then be adding support for rsd files next and later .tex.

One of the issues plaguing me right now is hojo's head not importing correctly. The other .p importer that I found looks like it should take care of it (from the code I saw) that is the big reason I will be using that. I should be done in a few hours.

One thing I am going to do right now is try to import battle models. :)