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

I'm posting this here for Ekmek, but anyone else is welcome to play around with it.

It's a "mod" that gives you two workers that can build wonders as tile improvements. The ArtDefine_Landmarks hook up to existing wonder fxsxml files. It almost works: problem is that graphic stays at "under construction" state and never completes. (Been working on this for a while now.)

The fire animations for Colossus and the Great Lighthouse do work if you fiddle around with the fsxsml file (which I didn't do here).
 

Attachments

  • ImprovmentWondersTest (v 1).zip
    6.2 KB · Views: 247
It almost works: problem is that graphic stays at "under construction" state and never completes.
I have had similar problems with naval units not changing states when damaged. It seems to be a problem with custom gr2's.
 
The beta 8 version of Nexus Buddy 2 is now uploaded and I have written this short tutorial on modifying wonders and buildings etc.
 
It's a "mod" that gives you two workers that can build wonders as tile improvements. The ArtDefine_Landmarks hook up to existing wonder fxsxml files. It almost works: problem is that graphic stays at "under construction" state and never completes. (Been working on this for a while now.)

The latest changes to Nexus Buddy 2 should allow people use Blender to copy and paste meshes from wonder graphics into tile improvement models which might well get around this issue.
 
I have had similar problems with naval units not changing states when damaged. It seems to be a problem with custom gr2's.

Have you been able to spot any differences in the structure before the vanilla gr2 and custom gr2? Were the meshes created via FBX or BR2? If the structure of the file and the names of everything are the same I can't see where the problem would be. Possibly the way Nexus Buddy creates materials could cause an issue.
 
Have you been able to spot any differences in the structure before the vanilla gr2 and custom gr2? Were the meshes created via FBX or BR2? If the structure of the file and the names of everything are the same I can't see where the problem would be. Possibly the way Nexus Buddy creates materials could cause an issue.

I could not see any difference in the structure. I have tried both the fbx and I also tried the overwrite meshes from br2 to see if that would work. The only thing I have not tried is extracting separately with your new ver 8, which I hope to try soon when I get some time.
 
Hey there! I've been trying to modify and make a template of the Korean Turtle Ship, but I've been having some issues.

So, first, because of how damage states work the model comes with 2 meshes. That's not a problem though, it seems it imports the nb2 perfectly. However, since it has 2 meshes I decided to go the .br2 route; I made my changes and exported, and there's an error:

"Error: Mesh has unweighted vertices!"
TypeError: Exceptions must be classes or instances, not str

So, I thought I may have unweighted a vertex unwillingly. Tried searching for it, selecting all vertices without weight... and there was none. So, I decided to reimport the model, and then export it without touching anything, the error was still there. And of course, since it has 2 meshes, exporting as fbx (which doesn't generate errors) doesn't work since the meshes get screwed up...

Anyone managed to import/modify/rexport a ship model yet?
 
Hey there! I've been trying to modify and make a template of the Korean Turtle Ship, but I've been having some issues.

So, first, because of how damage states work the model comes with 2 meshes. That's not a problem though, it seems it imports the nb2 perfectly. However, since it has 2 meshes I decided to go the .br2 route; I made my changes and exported, and there's an error:

"Error: Mesh has unweighted vertices!"
TypeError: Exceptions must be classes or instances, not str

So, I thought I may have unweighted a vertex unwillingly. Tried searching for it, selecting all vertices without weight... and there was none. So, I decided to reimport the model, and then export it without touching anything, the error was still there. And of course, since it has 2 meshes, exporting as fbx (which doesn't generate errors) doesn't work since the meshes get screwed up...

Anyone managed to import/modify/rexport a ship model yet?

I have successfully done a import/modify/rexport of a few ship models. Is there a bone that does not have a vertex group rigged to it that accidentally got deleted? That's the only thing I can think of.
 
Hey there! I've been trying to modify and make a template of the Korean Turtle Ship, but I've been having some issues.

So, first, because of how damage states work the model comes with 2 meshes. That's not a problem though, it seems it imports the nb2 perfectly. However, since it has 2 meshes I decided to go the .br2 route; I made my changes and exported, and there's an error:

"Error: Mesh has unweighted vertices!"
TypeError: Exceptions must be classes or instances, not str

So, I thought I may have unweighted a vertex unwillingly. Tried searching for it, selecting all vertices without weight... and there was none. So, I decided to reimport the model, and then export it without touching anything, the error was still there. And of course, since it has 2 meshes, exporting as fbx (which doesn't generate errors) doesn't work since the meshes get screwed up...

Anyone managed to import/modify/rexport a ship model yet?

I just tried this and didn't have any problem. I exported the turtle ship to NB2, imported to Blender, Applied Scale and Rotation to Obdata, exported to BR2 and then used overwrite meshes from BR2. I didn't get the unweighted vertices error and everything looks fine:

Spoiler :


Are you using the latest scripts?
 
I could not see any difference in the structure. I have tried both the fbx and I also tried the overwrite meshes from br2 to see if that would work. The only thing I have not tried is extracting separately with your new ver 8, which I hope to try soon when I get some time.

If you look the vanilla units in Granny Viewer they have some ExtendedData called Civ5MeshStateGroups. These seem to reference the undamaged and damaged Materials. At the moment there is no way for Nexus Buddy 2 to add this data to a custom mesh. There may also be other things missing from our custom .gr2s that are preventing damage states from working.

It's probably possible to add a facility to edit this data in Nexus Buddy 2, but I don't know if I'll get around to that.
 
Hey there! I've been trying to modify and make a template of the Korean Turtle Ship, but I've been having some issues.

So, first, because of how damage states work the model comes with 2 meshes. That's not a problem though, it seems it imports the nb2 perfectly. However, since it has 2 meshes I decided to go the .br2 route; I made my changes and exported, and there's an error:

"Error: Mesh has unweighted vertices!"
TypeError: Exceptions must be classes or instances, not str

So, I thought I may have unweighted a vertex unwillingly. Tried searching for it, selecting all vertices without weight... and there was none. So, I decided to reimport the model, and then export it without touching anything, the error was still there. And of course, since it has 2 meshes, exporting as fbx (which doesn't generate errors) doesn't work since the meshes get screwed up...

Anyone managed to import/modify/rexport a ship model yet?

I'm getting this when I try to convert wonders to tiles. tiles (like the example airfield) don't have bones. Is there a way we can get a tag to export without bones?
 
Ok, yeah I'm using the newest scripts. I have noticed something in fact:



Many bones that are present on the Vertex Groups no longer exist (only the Bone_Mast_Flag's seem to have been imported), and all I did was importing this time; so something in between converting to nb2 or importing is doing something awry... Anyway, could you upload the Turtle Ship template in the meantime? :D
 
Here is the Turtle Ship template. I tested it and it exported OK.
 

Attachments

  • TurtleShipTemplate.zip
    697.6 KB · Views: 253
I have had similar problems with naval units not changing states when damaged. It seems to be a problem with custom gr2's.

BTW, Any progress on this? I of course am facing the same problem; and am using latest Nexus Buddy to import/export. I have also made the gr2 replace an existant gr2 model, so I could check if it was an issue with the ArtDefine rather than the model, but it didn't work; so its related to the model.
 
BTW, Any progress on this? I of course am facing the same problem; and am using latest Nexus Buddy to import/export. I have also made the gr2 replace an existant gr2 model, so I could check if it was an issue with the ArtDefine rather than the model, but it didn't work; so its related to the model.

Not as yet as I have been busy with work but should have some time this weekend. Will let you know how I get on.
 
As I said earlier I don't think damage states are going to work without the Civ5MeshStateGroups Extended data on meshes unfortunately.

Maybe there is code solution where you can have a undamaged gr2 and a damaged one and the code swaps them when appropriate.
 
I'm getting this when I try to convert wonders to tiles. tiles (like the example airfield) don't have bones. Is there a way we can get a tag to export without bones?

When you say "tiles don't have bones" - can you point me in the direction of an example? The improvement .gr2s I've looked at so far still have a single bone that everything is rigged to.

Are you simply trying to take a wonder mesh and insert it into a tile improvement .gr2? I'm pretty sure you can do that just by using this method.
 
Top Bottom