Extract GR2 to Blender with mesh AND skeleton and re-export to GR2

Yeah, I have the problem with all ironclads, which is a shame since they're the closest unit in terms of animation (the broadside gun salvo). I guess the weird setup with the damaged model is messing things up.

The strange thing is: if I open the nb2 file in a text editor, it does list the missing bones, they are apparently removed on import because they're zero-sized (that's me experimenting with the destroyer):

Spoiler :
tC9pRGs.jpg


I'm starting to get the feeling that I'm missing something mind-bogglingly simple here...

EDIT: Anybody with a working import setup willing to try out what happens if they import an NB2 file I upload? If it imports correctly for somebody else, it's my Blender setup that's borked, if not, then it's either my NexusBuddy2 or the model itself.
 
Yeah, I have the problem with all ironclads, which is a shame since they're the closest unit in terms of animation (the broadside gun salvo). I guess the weird setup with the damaged model is messing things up.

The strange thing is: if I open the nb2 file in a text editor, it does list the missing bones, they are apparently removed on import because they're zero-sized (that's me experimenting with the destroyer):

Spoiler :
tC9pRGs.jpg


I'm starting to get the feeling that I'm missing something mind-bogglingly simple here...

EDIT: Anybody with a working import setup willing to try out what happens if they import an NB2 file I upload? If it imports correctly for somebody else, it's my Blender setup that's borked, if not, then it's either my NexusBuddy2 or the model itself.

Weird the problem you have. If you want it here is a ironclad blend file.
If you post your nb2 file I will see if it imports ok.
 
Weird the problem you have. If you want it here is a ironclad blend file.
If you post your nb2 file I will see if it imports ok.
Thanks for the blend-file, this will help me a lot!

Attached the some of my nb2 exports (the confederate ironclad, the vanilla ironclad and the destroyer to get some spread) - would be great if you could try importing them so I get a handle on the issues. I'd rather be able to do imports myself than relying on other people. :)
 

Attachments

The strange thing is: if I open the nb2 file in a text editor, it does list the missing bones, they are apparently removed on import because they're zero-sized (that's me experimenting with the destroyer)

This sounds like something that should be fixable in the NB2 import script (make it ignore the size of bones), but it's strange that Wolfdog apparently isn't getting the problem?
 
This sounds like something that should be fixable in the NB2 import script (make it ignore the size of bones), but it's strange that Wolfdog apparently isn't getting the problem?
Yeah, that's why I'd like to compare the NB2 files to see whether that's an issue coming from the export out of NexusBuddy or the import into Blender.

FYI, I'm using the NexusBuddy2 beta 9 [Win8.1 compile] and your blender scripts, v8 with Blender 2.49b - if wolfdog knows what versions he's running any differences could give a clue what's wrong with my setup.
 
Hi Deliverator,

I have installed Python 262 , then Blender 2.49b, then PyFFI-py2.6-2.0.1 and I have unzipped your scripts in <drive>/Users/<username>/AppData/Roaming/Blender Foundation/Blender/.blender/scripts but when I want to export in BR2 all scripts have vanished :


Any idea what I did wrong or which step I missed ?

Thanks for your help :)
 
Hulfgar, the steps you said seem like the right ones. Only thing I can think of is you didn't mention the Export folder, I assume you put them in there.

lord tirian, I imported your scripts and they work on my setup. I have Win 7 x64 with NexusBuddy2 Beta9 & v8 scripts. If I remember correct I used the first NexusBuddy2 Beta9 as the one that said it was for Win 7 did not work.
 
lord tirian, I imported your scripts and they work on my setup. I have Win 7 x64 with NexusBuddy2 Beta9 & v8 scripts. If I remember correct I used the first NexusBuddy2 Beta9 as the one that said it was for Win 7 did not work.
Odd, so it's the import into Blender that goes funky. Good to know, though, it means I have a starting point to try out different permutations of versions, thanks for the check.

Also, thanks to your ironclad blender file, I could finish this - thank you very much! :)
 
I decided to have a go at finally updating my Blender scripts to work with the latest version of Blender which is currently at 2.72. After almost giving up due to the complexity of working things out I was finally able to get a working .nb2 import script for the latest Blender and I'm about 50% of the way to a working .br2 export as well. :)

One benefit of using the newer api is that it seems to resolve one of the issues with the current 2.49 version, namely that with some models the skeleton bones have incorrect rotations on import from .nb2.

Here's the Civ V Spearman .nb2 imported to Blender 2.49 via the old NB2 script (scrambled skeleton!):

uc


And the same Spearman .nb2 imported to Blender 2.72 via the new script (unscrambled skeleton!):

uc


The Civ BE Aegis .nb2 imported to Blender 2.49 via old script (scrambled skeleton!)::

uc


The Civ BE Aegis .nb2 imported to Blender 2.72 via new script (unscrambled skeleton!)::

uc


I both cases the bones all seem to be in the correct positions and rotations in the newer script. I think this is because the later version of the Blender API has a more robust function for converting the quaternion rotations used by the Granny format to the matrix rotations used by Blender. Hopefully this means that going the other way will be more robust too and I can make the new BR2 export as reliable for skeleton data as it is for mesh data.
 
Oooh, that brilliant news, exciting! Very much looking forward to what's going to come out of this! :goodjob:
 
Excellent, hopefully custom anims will export properly now.:)

What problems have you have with custom anims? I believe that custom anims will work fine provided you follow the same process as in the Lion conversion tutorial. For example all the anims for the Sandworm were brought in OK and they were handmade by me - albeit a while ago.
 
I've got the complete .gr2 > .nb2 > Blender 2.7 > .br2 > .gr2 process working now. I used the new scripts to make this extra spiky Raptor Bug purely using Blender 2.7:

raptor_bug_blender27_spikes.jpg


Just for fun, the BE Kraken imported into Blender 2.7 with the new script:

kraken_blender_272.jpg


With the .br2 the Overwrite method is working fine. Directly loading the .br2 and saving as .gr2 works fine in game, but the unit is wrongly oriented in Granny Viewer and animations also look twisted there. Not a big problem as you'd probably only really want do that if adding extra FX bones.

I think Blender 2.49 might still have to be the tool if you want to do anything with animations or Civ 4 files - there's no way I'm porting the NIF scripts to Blender 2.7!

If you want to try out the new scripts here they are, I'll do more of write-up later:
http://forums.civfanatics.com/downloads.php?do=file&id=23407

You need to install the latest Blender and then add these scripts to the addons directory. After than you need to activate the Addons in User Preferences and the new options will be available in the Import/Export menus.
 
What problems have you have with custom anims? I believe that custom anims will work fine provided you follow the same process as in the Lion conversion tutorial. For example all the anims for the Sandworm were brought in OK and they were handmade by me - albeit a while ago.

Yes they work fine provided you don't modify them in any way. I just had a problem a while back trying to get an fourth turret on a ship to animate which went horribly wrong. See this post. Thanks
 
What problems have you have with custom anims? I believe that custom anims will work fine provided you follow the same process as in the Lion conversion tutorial. For example all the anims for the Sandworm were brought in OK and they were handmade by me - albeit a while ago.

There was something about having to move the mesh .001 to get the right spot and all kinds of stuff. I'm hoping the move to 2.7 will help with Civ4 leaders being imported. But I have a feeling civ4 nifs can't be imported to 2.7 still.
 
I've got the complete .gr2 > .nb2 > Blender 2.7 > .br2 > .gr2 process working now. I used the new scripts to make this extra spiky Raptor Bug purely using Blender 2.7:

raptor_bug_blender27_spikes.jpg


Just for fun, the BE Kraken imported into Blender 2.7 with the new script:

kraken_blender_272.jpg


With the .br2 the Overwrite method is working fine. Directly loading the .br2 and saving as .gr2 works fine in game, but the unit is wrongly oriented in Granny Viewer and animations also look twisted there. Not a big problem as you'd probably only really want do that if adding extra FX bones.

I think Blender 2.49 might still have to be the tool if you want to do anything with animations or Civ 4 files - there's no way I'm porting the NIF scripts to Blender 2.7!

If you want to try out the new scripts here they are, I'll do more of write-up later:
http://forums.civfanatics.com/downloads.php?do=file&id=23407

You need to install the latest Blender and then add these scripts to the addons directory. After than you need to activate the Addons in User Preferences and the new options will be available in the Import/Export menus.

Hi,

If I may, could I call your attention this post: http://forums.civfanatics.com/showpost.php?p=13353691&postcount=104 ?

The gist of this is, I had a file that was not natively from Civ 4 or Civ 5 that I was trying to import into civ 5. After much agony (including the fact that I had a fbx file that was blender 2.7.1 back before you gave a modern blender version of the scripts) I was able to create a file that looks right in Nexus, right in Granny, has the right number of bones, etc. Everything matches a civ 5 model I'd open up (except that my model is smaller, but scaling would fix that, right?). But when I actually to load the image in Civ 5, I get a massive graphical glitch, which you can see here:
http://forums.civfanatics.com/attachment.php?attachmentid=379683&stc=1&d=1406401987

I just tried it again with your new scripts. Everyone looks the same...except that now I see nothing in Civ 5. Just an invisible unit. I have been at a complete loss as to what is wrong.

In the hopes of finding a solution, I have attached the various files related to this to this post, as a .rar. I used the mesh override trick. The overall procedure (other than .fbx editing in blender) is blender->br2->NexusBuddy->Meshoverride/add materials->gr2.

Thanks for any help you may be able to give...
 

Attachments

I've got the complete .gr2 > .nb2 > Blender 2.7 > .br2 > .gr2 process working now. I used the new scripts to make this extra spiky Raptor Bug purely using Blender 2.7:

Spoiler :
raptor_bug_blender27_spikes.jpg


Just for fun, the BE Kraken imported into Blender 2.7 with the new script:

kraken_blender_272.jpg



With the .br2 the Overwrite method is working fine. Directly loading the .br2 and saving as .gr2 works fine in game, but the unit is wrongly oriented in Granny Viewer and animations also look twisted there. Not a big problem as you'd probably only really want do that if adding extra FX bones.

I think Blender 2.49 might still have to be the tool if you want to do anything with animations or Civ 4 files - there's no way I'm porting the NIF scripts to Blender 2.7!

If you want to try out the new scripts here they are, I'll do more of write-up later:
http://forums.civfanatics.com/downloads.php?do=file&id=23407

You need to install the latest Blender and then add these scripts to the addons directory. After than you need to activate the Addons in User Preferences and the new options will be available in the Import/Export menus.


Brilliant work as usual, Deliverator! It is well appreciated. :goodjob: :thanx:
 
Hi,

If I may, could I call your attention this post: http://forums.civfanatics.com/showpost.php?p=13353691&postcount=104 ?

The gist of this is, I had a file that was not natively from Civ 4 or Civ 5 that I was trying to import into civ 5. After much agony (including the fact that I had a fbx file that was blender 2.7.1 back before you gave a modern blender version of the scripts) I was able to create a file that looks right in Nexus, right in Granny, has the right number of bones, etc. Everything matches a civ 5 model I'd open up (except that my model is smaller, but scaling would fix that, right?). But when I actually to load the image in Civ 5, I get a massive graphical glitch, which you can see here:
http://forums.civfanatics.com/attachment.php?attachmentid=379683&stc=1&d=1406401987

I just tried it again with your new scripts. Everyone looks the same...except that now I see nothing in Civ 5. Just an invisible unit. I have been at a complete loss as to what is wrong.

In the hopes of finding a solution, I have attached the various files related to this to this post, as a .rar. I used the mesh override trick. The overall procedure (other than .fbx editing in blender) is blender->br2->NexusBuddy->Meshoverride/add materials->gr2.

Thanks for any help you may be able to give...

Wow, this issue still isn't resolved? I will take a look at it but I can't make any promises. It's worth a fresh set of eyes, though.
 
Back
Top Bottom