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

Awesome find, Novator. Another modding limitation tumbles!

I was able to grab the textures for Wu using TexMod and put everything together in Blender:

attachment.php


attachment.php


I will do a test, but I think it should now be possible to both reskin existing 3D Leaders and alter their meshes.

The only thing that would nice is to be able to grab the higher resolution textures, but the DX9 ones are good enough for now.
 

Attachments

  • texmod.jpg
    texmod.jpg
    94.3 KB · Views: 464
  • blender-wu.jpg
    blender-wu.jpg
    89.2 KB · Views: 27,565
deliverator I'm looking fwd to the next build of NB2 so I can get started.

Nexus Buddy 2 beta 5 is now uploaded.

Bear with me - I need to rewrite the opening post of this thread completely seeing as it's now completely out of date. In summary: the process for creating templates is now really simple - just export to .nb2 from Nexus Buddy 2 and then import into Blender using the new import script. The only thing that needs to be done manually is to rotate the entire skeleton 90 degrees back about the X-axis in Edit Mode. I tried to automate this step into the NB2 import script, but the bone orientations were never correct as when I do it manually.
 
In Nexus Buddy. When I try to export into nb2 I have Error message. "Can't find C:\users\Novator\Appdata\local\trmp\tempmesh709953704054515.msh
 
downloaded! I'm assume this doesn't have the fix for the character limits in 2.49 so leader modding has to wait.

The new import and export scripts handle the longer object names by storing the full name in the Armature object data on import and then fetching it again on output. So leader modding should be fine - the only tedious bit is going to be exporting each mesh as separate FBX to get through the flaky FBX>GR2 import - I would like to make this part simpler and more reliable.
 
In Nexus Buddy. When I try to export into nb2 I have Error message. "Can't find C:\users\Novator\Appdata\local\trmp\tempmesh709953704054515.msh

There are 2 steps in the export for each mesh: first the code calls the executable gr2conv.exe to create the temporary .msh file, and then the .msh file gets loaded and processes when the .nb2 file is made.

I'm pretty sure gr2conv.exe doesn't work when the file paths have spaces in so you'll want to make sure your working directory doesn't have spaces. On my PC I have working directories set like C:\Civ5Mod\UnitWork\UnitWork_CamelArcher. I will try and make gr2conv.exe handle spaces in file names at some point, but for now copy your source gr2 to a working directory that has no spaces in the path.
 
The new import and export scripts handle the longer object names by storing the full name in the Armature object data on import and then fetching it again on output. So leader modding should be fine - the only tedious bit is going to be exporting each mesh as separate FBX to get through the flaky FBX>GR2 import - I would like to make this part simpler and more reliable.

sweet. I'll just bake textures in the meantime.
 
D:/nexusbuddy/polynesia_kamehameha_the_great.gr2

I renamed to sos.gr2. Then opened Nexus Buddy, sos.gr2. Saved my file. Then went to Advanced options and press "Export to NB2". Then got an error "The input string was invalid".
 
D:/nexusbuddy/polynesia_kamehameha_the_great.gr2

I renamed to sos.gr2. Then opened Nexus Buddy, sos.gr2. Saved my file. Then went to Advanced options and press "Export to NB2". Then got an error "The input string was invalid".

Mmmmm. I just tried it on polynesia_kamehameha_the_great.gr2 without any renaming and it worked fine.

Can you upload a screenshot? Have you tried for a simple unit model?

I'm wondering if it is a permissions problem - the application would need permission to write to the temp directory.
 
I removed material from the mesh and the mesh became invisible in game.
 
I removed material from the mesh and the mesh became invisible in game.

What did you expect to happen? A mesh needs a material in order to be visible.
 
Google translation:
Spoiler :
System.FormatException: Input string was invalid.in System.Number.ParseSingle (String value, NumberStyles options, NumberFormatInfo numfmt)in IndieStoneMaterialMaker.Export.NB2Exporter.loadMeshInfo (IGrannyFile grannyFile, Int32 meshIndex)in IndieStoneMaterialMaker.Export.NB2Exporter.exportNB2Model (IGrannyFile grannyFile, Int32 modelId)in IndieStoneMaterialMaker.Export.NB2Exporter.exportNB2 (IGrannyFile grannyFile)in IndieStoneMaterialMaker.Form1.exportNB2ButtonClick (Object sender, EventArgs e)at System.Windows.Forms.Control.OnClick (EventArgs e)in System.Windows.Forms.Button.OnClick (EventArgs e)in System.Windows.Forms.Button.OnMouseUp (MouseEventArgs mevent)at System.Windows.Forms.Control.WmMouseUp (Message & m, MouseButtons button, Int32 clicks)at System.Windows.Forms.Control.WndProc (Message & m)in System.Windows.Forms.ButtonBase.WndProc (Message & m)in System.Windows.Forms.Button.WndProc (Message & m)in System.Windows.Forms.Control.ControlNativeWindow.OnMessage (Message & m)in System.Windows.Forms.Control.ControlNativeWindow.WndProc (Message & m)at System.Windows.Forms.NativeWindow.Callback (IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded assembly **************mscorlibAssembly Version: 4.0.0.0Version Win32: 4.0.30319.296 (RTMGDR.030319-2900)CodeBase: file :/ / / C :/ Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll----------------------------------------NexusBuddy2.0Assembly Version: 0.0.0.0Version Win32: 0.0.0.0CodeBase: file :/ / / D :/ NexusBuddy/NexusBuddy2.0.exe----------------------------------------System.Windows.FormsAssembly Version: 4.0.0.0Version Win32: 4.0.30319.1002 built by: RTMGDRCodeBase:----------------------------------------System.DrawingAssembly Version: 4.0.0.0Version Win32: 4.0.30319.1001 built by: RTMGDRCodeBase:----------------------------------------SystemAssembly Version: 4.0.0.0Version Win32: 4.0.30319.1001 built by: RTMGDRCodeBase: file :/ / / C :/ Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll----------------------------------------Firaxis.Framework.GrannyAssembly Version: 1.0.0.0Version Win32: 1.0.0.0CodeBase: file :/ / / D :/ NexusBuddy / Firaxis.Framework.Granny.DLL----------------------------------------System.CoreAssembly Version: 4.0.0.0Version Win32: 4.0.30319.233 built by: RTMGDRCodeBase:----------------------------------------Firaxis.FrameworkAssembly Version: 1.0.0.0Version Win32: 1.0.0.0CodeBase: file :/ / / D :/ NexusBuddy / Firaxis.Framework.DLL----------------------------------------System.Windows.Forms.resourcesAssembly Version: 4.0.0.0Version Win32: 4.0.30319.1 built by: RTMRelCodeBase:----------------------------------------System.DirectoryServicesAssembly Version: 4.0.0.0Version Win32: 4.0.30319.1001 (RTMGDR.030319-1000)CodeBase:----------------------------------------System.DirectoryServices.resourcesAssembly Version: 4.0.0.0Version Win32: 4.0.30319.1 (RTMRel.030319-0100)CodeBase:----------------------------------------System.XmlAssembly Version: 4.0.0.0Version Win32: 4.0.30319.233 built by: RTMGDRCodeBase:----------------------------------------Firaxis.Framework.Granny.ImplWin32Assembly Version: 1.0.0.0Version Win32:CodeBase: file :/ / / D :/ NexusBuddy/Firaxis.Framework.Granny.ImplWin32.DLL----------------------------------------Firaxis.Framework.FirePlaceAssembly Version: 1.0.0.0Version Win32: 1.0.0.0CodeBase: file :/ / / D :/ NexusBuddy / Firaxis.Framework.FirePlace.DLL----------------------------------------msvcm90Assembly Version: 9.0.30729.6161Version Win32: 9.00.30729.6161CodeBase:----------------------------------------mscorlib.resourcesAssembly Version: 4.0.0.0Version Win32: 4.0.30319.1 (RTMRel.030319-0100)CodeBase:----------------------------------------Debugging ************** RAM (JIT) **************To connect the RAM (JIT) debugging. Config file of theapplication or computer (machine.config) must have thevalue jitDebugging, established in section system.windows.forms.The application must also be compiled to includedebugging.For example:<configuration><system.windows.forms jitDebugging="true" /></ Configuration>When JIT debugging is enabled, any unhandled exceptionsent to the debugger JIT, registered on the computer,rather than be handled by this dialog box.
 
When the error occurs has a file been created in your temp folder? C:\users\Novator\Appdata\local\trmp\tempmesh...
 

If you upload the .msh file from your temp folder then I can see if I can recreate the problem. Have you tried with other .gr2 files?
 
In Nexus Buddy. When I try to export into nb2 I have Error message. "Can't find C:\users\Novator\Appdata\local\trmp\tempmesh709953 704054515.msh

I just got the same error when I first tried to export, but I tried again but this time saved the *.gr2 file first then exported to *.nb2 and it worked.
 
Back
Top Bottom