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

Ok, don’t use those old .blend files as they come from a time when people were still guessing skeletons by hand because it wasn’t possible to extract the exact skeleton into Blender via NB2. That will be why the model was twisted because the skeleton wasn’t correct I think.

The direct BR2 -> GR2 is slightly tucked away in the “Open BR2” under additional actions. Don’t use FBX as it has always been unstable - that’s what Firaxis left us with - it’s only useful for custom animation work.

Best way will be to get the vanilla Rifleman into Blender via .nb2 and then get Bernie’s Rifleman lined up and rigged to that then export to .br2 and open in Nexus Buddy 2. You can check animations by dragging and dropping in Granny Viewer so you don’t have to test in game.
 
Thank you for the explanations :D

I don't know why but today, I can't export back into BR2
I've tried the weight paint technique to rig.
But when exporting, I get an error from Blender and a 0kb file.
What am I missing?
 
Thank you for the explanations :D

I don't know why but today, I can't export back into BR2
I've tried the weight paint technique to rig.
But when exporting, I get an error from Blender and a 0kb file.
What am I missing?

Depends on the error. Common issue is that a mesh hasn’t been parented to an armature using Ctrl-P.
 
I'm going mad.
No matter which order I select to make that damn Ctrl-P, I still get "unweighted vertices" error.
 
Last edited:
I'm going mad.
No matter which order I select to make that damn Ctrl-P, I still get "unweighted vertices" error.

Parenting the mesh to an armature only one part of it. You also need to assigned the vertices (vertexes) to Vertex Groups which have the exact same name as bones in the Armature. This is what is meant by rigging, you are giving a certain amount of weight to each vertex saying how it should move when the bones in the armature move.

This video explains how Vertex Groups work:
 
Hello,

I got one question too ( in fact much more than 1 but not yet still I'm still working on following each of your tutorials )

- Working with Blender 2.76 and your blender 2.7 addons scripts ( the 15.1 ones )
- Opened a working fine unit in Nexus Buddy ( the last version )
- Exported in .nb2 from Nexus and Imported in Blender

- - - - - - - - - - - -
edit: deleted my example : wrong and bad example since you can't import a customized unit even it's working fine ingame in nexusbuddy and blender and just re-export it as well wihout having bones issue ... I have to re-rig the custom unit to a civ5 one ... always ...
- - - - - - - - - - - -

I understand the process but I always get some errors beween the weightpaint part and the control P ...
I must be dummy somewhere

Once the vertex of the mesh unit I want at the end are deleted and ready for the weignt transfer with the Civ 5 unit, something goes wrong. Will come back later with new questions :D

Thanks :)

PS : even when I success the process ( weight-paint - control P - export to .br2 ) and save as a .gr2 file in nexus buddy, even when the Granny show me the unit seems ok, then I get a huge dark glitch in game :/

Still wonder why ...
 
Last edited:
@coffee junkie: If you do adjust the rotation (or position or scale) of a mesh or model in Blender you should make sure you do Ctrl-A to Apply the object's visual transformation (position/rotation/scale) to the object data before exporting. That could be the issue you were getting.

The glitching issue could be due to this:
https://forums.civfanatics.com/thre...o-civ-5-full-conversion.519437/#post-13017604

This tip might also be relevant too:
You also need to ensure every separate mesh in your model is rigged to at least two bones. This is commonly an issue for weapons and human units. Duplicating and hiding a triangle is one solution or joining any unseen triangle from the body to the weapon mesh ensuring that it is rigged to a different bone from the weapon - a hand or foot etc. See here for more on this top tip!
 
Going to test all this tonight :) thank you !

So ... for what I intend to do ( and what I understood so far ), I need to import 3 units :

1) the U Roman Legion civ5 unit which is the model used by the 2 other custom units and of course the one who gets the good skeleton ... ( armature ? )

2) The Baratheon Swordsman I want at the end ( which is a cutom working unit by Danrell )

3) The Turkey Longswordsman ( another custom unit by Danrell ) ONLY because I need its rounded Shield

Already imported everything in Blender via .nb2 import, made the 90° on X axis and control-A ( rotate and scale ) and already removed both body mesh and vertex groups of the turkey longswordsman except the shield ones )

Until now, I don't need to care about the Roman Legion : I keep it for the final moves ...

In this case I have my first QUESTION : Why should I weightpainted a whole unit for a single shield ? I mean, there should be a way to re-assign ONLY the round shield ( of the turkey longswordsman ) to my Baratheon swordsman isn't it ? ( with the hiding triangles rigged to the hand as you advice of course )

My second QUESTION ( see my ignorance ) : both shield and weapon seem to be already rigged to the root, so, there are 2 different riggings ?

Thanks :)
 
In this case I have my first QUESTION : Why should I weightpainted a whole unit for a single shield ? I mean, there should be a way to re-assign ONLY the round shield ( of the turkey longswordsman ) to my Baratheon swordsman isn't it ? ( with the hiding triangles rigged to the hand as you advice of course )

You can just take the shield and parent it (Ctrl-P) to the armature you want it to be influenced by then weight paint or assign it to the correct vertex group.

If the shield and weapon are rigged to the root bone they are not likely to move correctly when the unit moves they should be assigned to hand bones or special weapon bones most likely.
 
That's was fast answer ! :D thank you so much ... and related to Ctrl-P, which option should I choose ? connected or keep offset ? I know, a bit boring to receive so many questions but most of times, it is small detail such as a Ctrl-P option which brings big mistakes to newbie ;)
 
That's was fast answer ! :D thank you so much ... and related to Ctrl-P, which option should I choose ? connected or keep offset ? I know, a bit boring to receive so many questions but most of times, it is small detail such as a Ctrl-P option which brings big mistakes to newbie ;)

I normally select the "With Empty Groups" option which creates empty Vertex Groups based on the names of the armature (skeleton) you are assigning the mesh to.
https://docs.blender.org/manual/en/latest/animation/armatures/skinning/parenting.html
 
you save my day ! thank you :)
 
Another question here ... How to separate the shield mesh from the whole armature and scene root ? I already deleted all the vertex but to do first a Ctrl-J to join the new shield to the Baratheon Swordsman ( and keep its UVmap ) before re-assign it, it seems I should avoid beeing messed with 2 root scenes ... Hope I do not say too many silly things ;)

edit: It's ok ... I finally found it !!! hurray : the round shield is a free mesh I'm going to try to re-assign with your previous answers :) Thanks Deliverator ! In some way, it could be easier to create a shield from the ground or import an independant mesh and assign it to the unit ;)
 
Last edited:
Another question here ... How to separate the shield mesh from the whole armature and scene root ?

Not sure exactly what you mean, but if you mean splitting off a section of a mesh you need to TAB into Edit Mode then Ctrl drag to lasso select or otherwise select the section of the mesh you want to split off. Then use the P key to seParate that section into a separate mesh. You can then delete the other mesh object you don't want to keep.

If you mean moving sections of mesh between different Armatures (Skeletons) then as soon as you use Ctrl-P to Parent the mesh to a different Armature it will switch ownership. A mesh can only have one Armature Object parent.

A tip is to always have the Outliner panel open to understand the structure of your Blender objects. I generally have a window with the Outliner on the left hand side. Without this it is quite hard to figure out what is going on.
 
Dear Deliverator,

Thank you for your endless patience.
I've watched the video, read and read again your answers. After much "wait, what was it again? The old one or the new one first??" I've finally made units. And they work in-game!
Truly, bless you :D

I noticed on import of game units into Blender, they aren't as smooth as they are in-game. I first thought it was my mind playing tricks or just some information lost when creating to NB2 but when exporting, the unit is the same. Not smooth. Modified or not. Any idea what could be the cause?
 
A quick answer to thank you A LOT Deliverator :) Everything is working fine until now and I began to make some new units. I will let you know our mod progress ( with pictures ) ;) I second flying toaster about the .nb2 export/import in Blender. I noticed too once in Blender, the civ5 unit mesh is much sharper and angular than the original. Should I check something particular in Nexus Buddy before exporting the .nb2 ? Once again, thanks a lot !
 
I've finally made units. And they work in-game!

Everything is working fine until now and I began to make some new units. I will let you know our mod progress ( with pictures ) ;)

:goodjob: I'm always glad when people persevere log enough to get 3D art stuff working. :D

I noticed on import of game units into Blender, they aren't as smooth as they are in-game. I first thought it was my mind playing tricks or just some information lost when creating to NB2 but when exporting, the unit is the same. Not smooth. Modified or not. Any idea what could be the cause?

I second flying toaster about the .nb2 export/import in Blender. I noticed too once in Blender, the civ5 unit mesh is much sharper and angular than the original. Should I check something particular in Nexus Buddy before exporting the .nb2 ? Once again, thanks a lot!

Ok, I will try and give as comprehensive an answer as I can. First, you probably know this but it is best to view your model in Blender using Smooth shading rather than Flat shading as this will give an indication of how the model will be shaded when converted into .gr2 Granny format.

By default when loading in a model Flat Shading is often selected. This model is the Civ V Nuclear Sub imported via .nb2.

sub1.png


You can enable Smooth shading here - this doesn't actually affect the underlying data - just how the model appears in Blender:

sub2.png


Model with Smooth shading enabled:

sub3.png


Here you can see that there are still some sharp lines on the nose that aren't present in the original model. These are because the .nb2 script does not import the Normal data for each vertex.

I discovered this a while ago and it is one of the things that has been fixed with the .cn6 format and .cn6 Blender scripts.

Even when working on Civ V models you can now use the .cn6 format instead of .nb2 - see "Export to CN6" button under Additional Actions in Nexus Buddy 2. Going via .cn6 you can see that the shading on the nose of the sub doesn't have the sharp edges anymore:

sub4.png


The .cn6 process also stores the original Normal, Binormal and Tangent for every vertex in a special Vertex Group called VERTEX_KEYS so that the original values can be retrieved on export from Blender.

The problem is that up to now the BR2 process for Civ V didn't read the original values back out again. I have now updated the BR2 Export Blender script to do this. This means that model's appearance will be the same when it has been through the .gr2 -> .cn6 -> Blender -> .br2 -> .gr2 round trip. To do this you'll need to use the io_export_br2.py Addons from the latest 15.2 Blender scripts.

subv1.png

subv2.png

subv3.png


Some more background I wrote when I created the .cn6 format and process:
"It turns at that until now that Blender has always been recalculating it's own Normals for each vertex rather than using the custom ones from the .nb2 file. This explains why some meshes didn't look as smooth when imported to Blender as the original .fgx does in FGX viewer. Since Blender now supports custom normal import I can now import vertex normals properly. Also the original normals, binormals and tangents are preserved for export as far as possible using a dummy vertex group called VERTEX_KEYS. If you want to force Blender to recalculate vertex normals, binormals and tangents then you can just delete the VERTEX_KEYS Vertex Group for the mesh."

Hopefully this will help. If you are still getting blocky models after trying this process then perhaps there is something else that can be done to resolve. The best thing is to post your .blend file and then I can see if I can help you get a non-blocky version.
 
just ... great, so great ! Thank you. I will let you know ( with pictures ) the progress I'm going to test tonight :)
 
I'm trying to mod the graphics, but I have basically no experience in 3D art. So can one with no skill take a model, like the samurai, then rig it into musketman animations? I tried doing it as in the OP, but I get just an invisible unit.

I'm just trying to make a unit use another unit's animations first, I'll worry about making the gun later. Do I need to learn basic 3d modeling first, or can I just use existing components like weapons? I know there are the tutorials about converting Civ4 units to Civ 5, but I'm not trying that, I'm just using Civ5 art.

EDIT:
I should have been more patient, it was just an error in my fsxml file. I still need to figure out how to make the gun and the texture, but now I at least know it works
 
Last edited:
So I still need help. I'm not sure what to do exactly to copy parts of meshes to another model. Is it that I should import both models, separate the musket and remove the musketman, then parent the musket to the samurai and assign it to a vertex group. Should I edit the bones or can I add the "bRifle" bone to the samurai somehow? I managed to do the whole process without error messages in Blender or NexusBuddy, but ingame the model was invisible again, and I can't find errors in the fxsxml. I reassigned the materials too.

EDIT:

I managed to change the musketman hats by editing the mesh directly, just need to make the textures.
 
Last edited:
Top Bottom