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

@Deliverator
Could you please take a look of why this .blender file can not export to .br2?
I import the pathfinder nb2 to blender, and do nothing, it just can't export.

It looks like you didn't use Delete Top Bone when you imported the NB2 which led to the axe bone not being imported which in turn led to the unweighted vertices exception. Delete Top Bone should be selected by default really.

You can change the default by editing line 692 of nb2_import.py to:
Code:
GLOBALS['DELETE_TOP_BONE'] = Draw.Create(1)
 
It looks like you didn't use Delete Top Bone when you imported the NB2 which led to the axe bone not being imported which in turn led to the unweighted vertices exception. Delete Top Bone should be selected by default really.

You can change the default by editing line 692 of nb2_import.py to:
Code:
GLOBALS['DELETE_TOP_BONE'] = Draw.Create(1)

I think I have already selected Delete Top Bone, I use the option below:


What ever how I press the Delete Top Bone button, I meet the same problem in the Pathfinder model, while I never have this problem in other models.
 

Attachments

  • d3ete.png
    d3ete.png
    6.2 KB · Views: 625
I think I have already selected Delete Top Bone,

What ever how I press the Delete Top Bone button, I meet the same problem in the Pathfinder model, while I never have this problem in other models.

Mmmm. All I can say is that it worked for me! I imported the Pathfinder.nb2 without Delete Top Bone set and I got the same issue as with your .blend - that is that the axe bone was missing. You can check the list of bones in the Outliner screen which is useful to always have open. When I imported with Delete Top Bone set then the axe bone was there are the model exported OK. The whole import/export works in fine in Blender 2.7 also. I can upload my .blend later if you want.

If you get the unweighted vertices message it means that not all vertices are assigned to a vertex group matching then name of a bone in the skeleton. That could be because some vertices aren't assigned to vertex groups or because a bone for one or more of the vertex groups is missing.
 
Help! I've been slowly working on new models for a mod and it's time to start getting them into the game... but now for some reason I can't. I've previously used the older method (outlined here). I upgraded my plugins/scripts so I can use this method and now I can't get either to work.

Attached is my blend - any help you could provide would be great. I use the BR2 export and overwrite method outlined in your tutorial. In the end my unit is 'on it's back' and very small. If I scale it up so it's the right size, all of the animations are massive!

Any idea what I need to do to get this fixed? I have a bunch of WW1 tanks, aircraft, ships and artillery pieces ready if only I could get the into the game!

Thanks,
-Smitty

FYI - Attached is my blend file if that helps.
 

Attachments

  • LanciaIZ.zip
    246.1 KB · Views: 229
Help! I've been slowly working on new models for a mod and it's time to start getting them into the game... but now for some reason I can't. I've previously used the older method (outlined here). I upgraded my plugins/scripts so I can use this method and now I can't get either to work.

Attached is my blend - any help you could provide would be great. I use the BR2 export and overwrite method outlined in your tutorial. In the end my unit is 'on it's back' and very small. If I scale it up so it's the right size, all of the animations are massive!

Any idea what I need to do to get this fixed? I have a bunch of WW1 tanks, aircraft, ships and artillery pieces ready if only I could get the into the game!

Thanks,
-Smitty

FYI - Attached is my blend file if that helps.

I think you need to do Ctrl-A and Apply Scale and Rotation to ObData on the mesh. This is a common gotcha. Are you using vanilla .gr2 animations or converted ones? This tutorial is a bit out of date. If you are doing a BR2 overwrite onto a vanilla .gr2 then you are OK to leave the model *not* rotated back 90 degrees in Blender i.e. with the Z axis upwards. Position it like this and make sure you do the Ctrl-A Scale and Rotation thing on the mesh then you should be fine.
 
I think it must be Apply Scale and Rotation to ObData that I missed. I started out using the vanilla mechanized infantry mesh & skeleton.

I ended up going back to an earlier version of the fbx export plugin and was able to convert the model using an older method. I think I'll try this method on some of the multiple mesh units.

Thanks for your help!
 
How do I launch the Nexus Buddy? The exe never runs when I click it.

The NexusBuddy .config file should look like this:

Code:
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>

<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>

You also need the .NET Framework 4 installed if you have not already done so.
 
There is no .config file. Just .dll's, a txt for animation, the application, XML, and program debug.

Edit: Managed to access the XML, but not with visual studio 2010 shell. After modifying the XML, and making sure I have the framework, I ran the program again, but nothing continues to happen. :/
 
There is no .config file. Just .dll's, a txt for animation, the application, XML, and program debug.

Edit: Managed to access the XML, but not with visual studio 2010 shell. After modifying the XML, and making sure I have the framework, I ran the program again, but nothing continues to happen. :/

You also need to install the Civ V SDK and set the Asset Path. If you read the last few pages of the Nexus Buddy 2 thread you'll find some pointers on getting it working.
 
Got it working. My problem was the Asset Path, which originally gave me an error message, then when I gave it an incorrect one, I couldn't find how to change it (until now).

Thanks for all your help :D
 
I've just removed the image links. I don't know what's happened to the attachments and the import to Blender via .nb2 is now so simple that the images don't really add much.
 
Having a small problem. I'm trying to rig up a new helicopter. The rotor locations don't match up with those of the standard Civ5 helicopter. Whenever I move the bones and export, every time they show up in game as though I've never moved them.

Any idea how to re-position a bone but the animations stay the same?
 
Having a small problem. I'm trying to rig up a new helicopter. The rotor locations don't match up with those of the standard Civ5 helicopter. Whenever I move the bones and export, every time they show up in game as though I've never moved them.

Any idea how to re-position a bone but the animations stay the same?

It can be done with Blender. What I would do is insert a new bone into the hierarchy above the rotors but below the helicopter body and then move this new adjustment bone to position the rotors where you want them to be.

You need to have a new bone that isn't referenced by the .gr2 animation files. Moving bones that *are* referenced in the animation won't work because the animation specifies their location and rotation so will put the bones back to their original Civ 5 positions. Essentially you need to add a new adjustment bone that the animation won't reposition because it doesn't know about it. Does that make sense?

You can test the vanilla animations with your adjusted model in Granny Viewer after you have converted your models .fbx into a .gr2. You need to re-save the animation .gr2 files first but once you've done this you can just drag and drop them into Granny Viewer to confirm that they're working.
 
Hmmm... So I added an extra bone and was able to move around part of the model. Everything works fine (the animations for the helicopter rotor I moved worked), except the location is all out of whack.

Basically I made a bone like you said and the rear rotor is now movable. The only problem is that I can't control where the rear rotor is. Any ideas how to fix it?
 
Hmmm... So I added an extra bone and was able to move around part of the model. Everything works fine (the animations for the helicopter rotor I moved worked), except the location is all out of whack.

Basically I made a bone like you said and the rear rotor is now movable. The only problem is that I can't control where the rear rotor is. Any ideas how to fix it?

The important thing is the location of the rotors when the animations are playing rather than their position in the default rest pose. It is now possible to import Civ 5 animations into Blender so that you can check the effect of skeleton changes on the resulting animation which may help.

Otherwise it is difficult to understand the issue without seeing the specifics. If you attach your blend file I can take a look at it if you want.
 
Here is the blend file I'm using. Thanks for your help!

I won't be able to look at it until the weekend, but I'll take a look then.
 
Top Bottom