Nexus Buddy 2

Nexus Buddy 2 - Granny Editor for Civ 5 2.5.3

that sounds like a model issue and the way its rigged. the helicopter does something with bones to make it float. for my uav unit I have to mess with the mesh to make it elevated. try move the mesh lower below the ground a put one vertice there to anchor it.

That's a bit out of my depth, unfortunately. I've never worked with 3D modeling software before, though I'll probably give it a shot towards the end of June when I have more time off.

I can see them. See this screenshot. You should only have to set the BaseSampler and the LightCubeMapSampler as shown, the other textures were reported as being in the parameter set but I don't think they are used. Which feature file are you looking at?

I was looking at the marsh file, but I wasn't being very clear. There are two textures in the marsh file like the one you posted, but when you unpack the fpk files there are 4 separate marsh-related textures. marsh_d, which I would assume is a diff? marsh_h which I would think is some kind of height map? marsh_s which is probably an SREF thing? And marsh_stamp, which looks a lot like a transparency mask. (though marsh_stamp is much smaller, dimensions wise, than the other 3.) Possibly that base sampler should be those 4 images all rolled into one though. I'll try that next.

Doing my best to keep up with this thread. Out of my depth but trying. Can you explain what shaders are in this context and your workflow for building one? Additionally, I've been looking into making features as well but I cant seem to find the art defines table that points to the feature gr2 files, much like the missing art defines for terrain. What's the art define file for features? Or are you talking about editing features already in the game by changing install folder files.

Think the best work around for adding features ATM is to just add them as resources that change yields but don't provide a resource, then fixing up the tooltip to reflect them as a feature.

Who knows maybe the expansion will give us art defines for that stuff.

Shaders are (feel free anyone to correct me if I'm wrong) the data structures that associate the two dimensional texture images (if you look at the texture for a rifleman, for example, the image itself is flat) with the meshes of the 3D models so that it appears as a 3D object in the game with visual details.

The existing art defines for the basic features in the game (forest, marsh, ice, etc.) aren't in the game database (or at least I haven't been able to find them). But if you've got the Viking DLC (I think it's the Viking one?), you can see Firaxis added a new feature called Hadrian's Wall. They used the ArtDefine_Landmarks table to create the art define for that feature and I've had success with the game recognizing new features that use art defines from that table. The primary limitation is that the feature has to be placed before the game's graphics are loaded (so, by a mapscript, or InGameUIAddin that runs immediately), otherwise it requires a save+reload for the terrain graphics to update.

Resources are handled much more sensibly by the graphics DLL than features, and the approach of creating a fake resource and then updating the UI components so it doesn't report it as a 'resource' will definitely work graphically. But that creates compatibility issues with other mods (there are a lot of UI files that would need tweaking so it didn't talk about this 'feature' as a resource).
 
I now have code to export direct to Milkshape TXT from Nexus Buddy. It works even for the 29 mesh and 828 bone Napoleon leader model. Still need to crack the bone/position rotation, but everything else seems to be working.


Awesome work! :D
 
Fixed the bone position/rotation issues with my export! :) I've made a new file format called NB2 that is based on Milkshape TXT but uses quaternions instead of Eulers for the bone orientations. Helpfully, Blender has built in functions for handling quaternions so I'm able to get units into Blender with everything in exactly the same position.

Forest Elephant in Granny Viewer:



Forest Elephant in Blender:



Giant Death Robot - Granny Viewer / Blender:



Leaders too - although I've run into some issues with Blender 2.49 in that it only supports bone names up to 31 characters which is too short for a lot of leaderheads and some units.



I should probably write a new version of my NB2 import for Blender 2.6+ - they completely re-wrote the API for the later versions so that will take more time.

Anyway good progress. A diagram of the new and improved process:



I'll look to release a new version of Nexus Buddy 2 with this stuff on Monday.
 
Wow, really great work here Deliverator you have just made the whole process so much easier and more efficient. :)

A quick note in case any one else has the same problem. If your file path is to long you will get a dot net error as in screen shot. To fix just move your working folder closer to the root of the drive (like 1 or 2 folders deep).
 

Attachments

  • dot net error.png
    dot net error.png
    24.3 KB · Views: 276
Leaders too - although I've run into some issues with Blender 2.49 in that it only supports bone names up to 31 characters which is too short for a lot of leaderheads and some units.

I should probably write a new version of my NB2 import for Blender 2.6+ - they completely re-wrote the API for the later versions so that will take more time.

I'll look to release a new version of Nexus Buddy 2 with this stuff on Monday.

Damn that is some awesome progress. weird about the 31 characters even weirder that the civbones go beyond that. Are you sure 2.66 can handle that? The one issue with 2.66 fbx exporter is that it doesn't manage the rotations or let you name the root bone.
 
weird about the 31 characters even weirder that the civbones go beyond that. Are you sure 2.66 can handle that?

In the African Forest Elephant unit, for example, there are bones called "Base Elephant_LLegFRONTCollarbone" (33 Chars) and "CHARACTER_REORIENT_01_unique_unique" (35 chars). These get truncated by Blender 2.49 to "Base Elephant_LLegFRONTCollarbo" and "CHARACTER_REORIENT_01_unique_un" respectively.

This is a problem for using the vanilla animations since they will refer the full original bone name.

Another example, in the Napoleon leader model there are a couple of really stupid bone names that are padded with spaces e.g. "<space>FACIAL_RIG_WORLD<25 spaces>" (42 chars!). In this case I don't think these bones are used in the animation, but still it's a bit messy.

I guess this was not an issue that people ran into much with Civ 4 because the bone names were generally shorter, "BIP L Clavicle" instead of "Base HumanLCollarbone".

I am going to put a hack fix into my import/export scripts so that a mapping from the shortened name to the full name gets stored in the Armature data on import and extracted again on export. This relies on the first 31 characters of the each bone being unique for each one, but that should be true in most cases.

I've just checked and Blender 2.66 supports bone names up to 63 characters, so the longer term fix is write a new NB2 import for the later versions.

The one issue with 2.66 fbx exporter is that it doesn't manage the rotations or let you name the root bone.

Under the hood the majority of the older and newer FBX export scripts are the same. My latest FBX script automatically does the world bone part anyway and should be relatively simple to bring across any necessary changes.

Once I configured the interface in 2.66 to be the same as what I was used to 2.49 I found it much nicer to use and it would be good to move to the latest version. The only thing that probably won't get updated for 2.66 are the NIF scripts, but you can always do your NIF import in 2.49, save the blend and use the built-in append function in 2.66 to merge files.
 
Might I ask, is it imperative to export to .blend at all? Could NB2 not be written more simply to convert GR2 to FBX and FBX back to GR2? Then just use the FBX importers that most modern 3d software already provides to work on the file?

Or do you do the .blend step because that's the major program modders here use.
 
Once I configured the interface in 2.66 to be the same as what I was used to 2.49 I found it much nicer to use and it would be good to move to the latest version. The only thing that probably won't get updated for 2.66 are the NIF scripts, but you can always do your NIF import in 2.49, save the blend and use the built-in append function in 2.66 to merge files.

We really don't need the nifscripts because NIFviewer lets you export it as an obj. and since we can do multiple meshes now I don't think we need to do all tha baking stuff either.
 
Might I ask, is it imperative to export to .blend at all? Could NB2 not be written more simply to convert GR2 to FBX and FBX back to GR2? Then just use the FBX importers that most modern 3d software already provides to work on the file?

Or do you do the .blend step because that's the major program modders here use.

Blender can really do anything that you'd want to do for 3D modding and has the big advantage of being free. If there is another tool that is as powerful for free I'd be surprised. Supporting Blender keeps modding accessible to anyone with a willingness to learn.

FBX is a much more complex file format than Milkshape 3D ASCII which my NB2 format is based on. Generally FBX files are about 3 times the size of the corresponding NB2. Writing an FBX exporter would be much more work. You can export to FBX from Blender anyway so it's only one more step if you wanted to use another 3D software.

We really don't need the nifscripts because NIFviewer lets you export it as an obj. and since we can do multiple meshes now I don't think we need to do all tha baking stuff either.

Yeah, multi-mesh support means that you don't need to do texture bake or joining textures anymore. The ogre unit I linked to above has two separate meshes and textures which I was able to use without editing any texture or UV maps. Definitely good for Civ 4 conversions.

On the NIF scripts, the problem with OBJ is that you don't get bones or vertex groups. For human units importing from NIF is better as it preserves Vertex Groups. I can then use a new Blender script I have to one-click rename the Civ 4 bones to Civ 5 bone names. This really speeds up the rigging as I don't have to completely rig the mesh from scratch - I can just alter the vertex groups that need it. Also, it is handy sometimes to have the old skeleton to help line things up.
 
New version released!

Changelog: Beta 5 - 9th June 2013

+ New NB2 export allowing most 3D GR2 assets, including leaders, to be extracted into Blender without a glitch.
+ Added FBX > GR2 x5 and FBX > GR2 x20 functions to the existing FBX > GR2 x10.
+ Warning: View (open in Granny Viewer) and Export to NB2 will now automatically save your current file first. This is to eliminate errors when first opening the original game GR2 files.
 
New version of Nexus Buddy 2 that finally provides an alternative to the world of pain that is FBX importing. Sorry about the brief information - I will provide more in depth info when I have a chance. See the opening post for the latest downloads.

Latest Changelog: Beta 6 - 27th June 2013

The instability of the FBX import has been made creating custom 3D art for Civ 5 frustrating so far. I now create a new file format, BR2, that can be exported from Blender and imported to GR2. So far direct import from BR2 only works for Units, but the format can also be used to overwrite meshes in an existing GR2 allowing new custom Leader graphics to make use of existing animations.

Other changes/improvements in this version:
+ View and Export to NB2 no longer automatically save you current GR2 - you will need to do this manually again.
+ NB2 export no longer relies on a separate C++ executable - it is all now written in C# code
+ Several functions have been removed as they have been superseded by BR2 import/overwriting.
+ Floating point decimal places in both NB2 export from Nexus Buddy and BR2 export from Blender is now 8 digits rather than 6.
+ Globalisation issues with export files being created with commas for decimal points should now be fixed.
+ Mesh and Bone names that are too long for Blender 2.49 are stored in the Armature Object by the NB2 Import and retrieved by the BR2 Export Script.



A customized Wu made using the Overwrite Meshes feature:

 
Though it could work before reinstalling Win 7. Because betta5 also doesn't work now.
 
Yes. I have .NET Framework 4. And I "have" something from Visual Studio 2010 to work with ModBuddy. Before reinstaling I had Telerik utils to work with Nexus. And full Visual Studio 2011.
 
Top Bottom