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

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.

A lot of tiles like Plantations and the like are real complex because they use the resource graphic too.

But there are simpiler ones that just have a built, half built (HB), and pillage graphics (i think trade posts are what I used) and it looks like they don't have skeletons.
 
I'm having trouble getting an atlatl unit to work... Can someone have a look? It doesn't seem to load the model/textures, and usually crashes shortly after I start.

Also, I keep winding up with tons of vertex doubles. It's not hard to fix, I just hate trying to select a bunch of things only to find out I haven't gotten all the vertices I thought I did.
 

Attachments

  • inca_atlatl_final2.rar
    126.3 KB · Views: 63
I'm having trouble getting an atlatl unit to work... Can someone have a look? It doesn't seem to load the model/textures, and usually crashes shortly after I start.

I did the following:
1) Exported your blender session to BR2 format.
2) Made a copy of the vanilla Atlalist unit.
3) Opened the copied unit in Nexus Buddy 2.
4) Used Overwrite Meshes from BR2 to overwrite the models meshes.

I then tested it in Granny Viewer and the animations seem to work fine with your unit.

Crashing is usually down to your Mod or fxsxml not being properly set up. For example, if not all your graphics files fxsxml, gr2 and dds textures have Import to VFS set to True or your fxsxml file has an error in it. It's worth double checking your set up maybe comparing your test mod to one of my recent ones such as the Lion.

I've attached my .br2 and .gr2 file. If you attach your textures in Nexus Buddy 2 and set up your mod and fxsxml OK it should work in game.
 
But there are simpiler ones that just have a built, half built (HB), and pillage graphics (i think trade posts are what I used) and it looks like they don't have skeletons.

Even the trading posts have skeletons if you look. Even the simplest tile only trading post .gr2 has one mesh and one bone.

I really don't think there is an obstacle to creating custom wonders or improvements. Danrell's guide still gives an outline - all it needs is for someone to do an updated tutorial on how to make a simple custom building as a mod. I haven't had to the time to try this yet myself and I'm more interesting in doing some testing what can be done with particle effects first.
 
Alright, so it looks like my problem was that Firaxis has misspelled "atlatlist" in most places, and I wound up with different spellings between my FXSXML file and the file call in SQL. Thanks for checking my work though!
 
Hi guys, right so I finally managed to get my completely custom unit to appear in the game, but the animations are not playing. It looks like it's frozen on one frame and not playing through the different animations I've done. They work fine in Granny Viewer though.
Could anyone be kind enough to have a look maybe if any of you have time, I've attached the build of my mod to this post. Cheers!

Here's 2 screenshot of how the unit appear in the game. It looks as well like appart from the weels being on the ground, the whole body of the truck is pulled down a bit, which is a bit weird.
Spoiler :

Spoiler :
 
This might be a lot simpler if you rigged the model to existing animations rather than creating new ones, at least at first.

I think the problem is probably that you don't have all the animation .gr2 files that you need to properly run the civilian state machine. For example, in your UnitCombats, you enable Idle, Death, BombardDefend, and Run, but there are no animations specified for Death and BombardDefend in the .fxsxml.

Also, the BoneUsage tag in the .fxsxml is used for effects, I believe. You probably shouldn't need to call it at all for an 18-wheeler ;)

Not required, but I strongly recommend reducing the vertex count; there's no reason it should be over a few hundred for units. There's a lot of vertex doubles, so remove vertex doubles in blender and you'll knock out a lot of them. Likewise, the textures need to be scaled way down. I'd recommend 128x256. If there are parts that need to be higher resolution though, you can learn how to bake a new texture here.
 
Thanks hangman, I will look into this. I don't know where the vertex doubles come from, as I don't have them in Maya, but I can see my vertex count goes up when I see the model in Granny Viewer.
I found out why the animation didn't work, it's because I misspell the animation files in the fxsxml. I corrected them and I got back to a point where my model is animated, but exploded. I read on Deliverator's new tutorial for Full Conversion that there's a scale problem, so that might be the problem. I'll do some test on that.

And Ekmek, I was going to do this at first, but the late era caravan only have 2 set of wheels, when I had 4 (2 extra in the middle). I might try to rig it to the caravan model ignoring these extra wheels to start with, just to see what happens.
 
Yeah, the wheels from afar won't be noticeable anyway, its a good idea to rig it to the Late Caravan. You could also rig it to the old modern great artist model (four wheels and you can completelly ignore the artist itself), but the late Caravan is better I think.
 
And Ekmek, I was going to do this at first, but the late era caravan only have 2 set of wheels, when I had 4 (2 extra in the middle). I might try to rig it to the caravan model ignoring these extra wheels to start with, just to see what happens.


you can rig them to the same wheel bones so they will turn, they just won't be lined up to the bone when you do it.
 
I read on Deliverator's new tutorial for Full Conversion that there's a scale problem, so that might be the problem. I'll do some test on that.

The scale problem is resolved if you're following the latest tutorial and using the latest versions of Nexus Buddy 2 and the scripts.
 
So with a bit of fiddling around between my mod versions, and re testing an older version of it, it suddenly works perfectly fine. I just re loaded the version where the animations were exploded, and now, without changing anything, it works perfectly (which is quite confusing to be honest, as I don't really know what I did different). The animation are playing correctly, in the right order, the textures are displaying perfectly and it's all looking fine (apart the model being a bit in the ground, it seems like my lowest point is the center of the wheels, I'll correct this soon). Although it's working perfectly in the game, when I open it in Nexus viewer, it doesn't display the texture correctly, and I can't read any animation, and it says "can't open fx_triggers/animations files because path is incorrect). But all I care about is that it's working in the game.


So I can proudly say that, after months of massive fails, I finally managed to get a completely new unit inside the game, without rigging it to another existing unit, with a custom skeleton, custom model and custom animations done from scratch, and it finally works. I've done it using Maya and exporting as FBX, and then followed Deliverator's excellent guide for Civ 4 full conversion (ignoring the BR2 step, as I'm not working in Blender) and thanks to Nexus Buddy and all the help from you guys, I finally did it!

Many thanks guys, I'll finish the animations that remain to be done and I'll upload it. Once I'm done with it, I'm gonna try to make brand new units from the request thread and see how that goes!
 
Awesome work, dude! And Deliverator for providing these amazing tools!

Completely custom units from scratch is something I'd been wondering if had become possible based on compositing the tutorials on here (and with some serious 3D graphics skills)! If you open up a request thread, I'm sure you'll be swimming in fantasy unit requests. :D
 
So here it is.





So it works fine, with custom model, custom skeleton and custom animation. I'm happy to know that creating units from scratch works fine, thanks to all the efforts of people in this forum!

I did some tests with a couple of things with this unit. I did tests for Materials, Textures, and a bit with the Fx_triggers file.

Concerning the materials, I found out that it doesn't make any difference in the way the material reacts to specular whatever MaterialTag you choose in the UnitArtDefine. It's a bit of shame, and I don't know why we can choose different type of material if they all react the same, but that's what I found out.

Concerning the textures, I worked specially on the SREF file and found out that the color channels drive the intensity of the reflection (Black 000=No reflection, White 256=Full Reflection), and the Alpha channel drives the Glossiness of the Reflection, in other words, how blurry the reflection is (Black 0=Full Glossy and Blurry, White 1=Full Sharp, like Chrome).


And concerning the DIFF file, I'm sure you all already know that the alpha channel drives the CivColor on the unit, so any part that is Black in the alpha channel of the Diff is going to be replaced (actually more multiplied) with the color of the Civ you're playing. If on your color channels, these areas are white, it's going to put the color of the Civ at 100%, and if there's already a color there, it's going to multiply it.


Concerning the fx_triggers, I was messing around with it a bit, trying to put smoke coming out of the exhaust of the truck, and I found that most of the smoke are leaving a trail of smoke behind the bone it's connected too (don't forget to put the bones you need to triggers fx in your Bone_Usage in the fxsmlf). So I've got smoke coming out of the exhaust when the unit is moving, but not when the unit is Idle unfortunatly. I've looked for smoke effects in the fx_triggers of different existing units like MobileSam, Bombers, Nuclear bomb (this one was pretty funny!) and I finally found that the Fighter one worked the best. It was interesting seeing how these different effects react. Here's a little video oh how it looks.


It's using the Civilian_State.fsmxlf for now, and it seems to not play the Death when the unit dies, but when I switch to a OMNI_State, its visible, so if someone knows why that might be, I would like to know =) it looks like Civilian units dont show their death animation, but I might be wrong.
Here's a video of what the death animation looks like


So that's it, that's all the conclusions to my tests, hope this is hopefully for someone!
You can download the unit here!
http://forums.civfanatics.com/downloads.php?do=file&id=22390
 
Please pardon the very basic questions, but...

1. How do I add the python scripts to Blender?
2. On what menu do I find "Scripts -> Import -> Nexus Buddy 2" ?
 
Please pardon the very basic questions, but...

1. How do I add the python scripts to Blender?
2. On what menu do I find "Scripts -> Import -> Nexus Buddy 2" ?

1. In explorer type %appdata% and press enter then go Blender Foundation -> Blender -> .blender -> scripts and you will find the scripts there.
2. In the file menu
 
Thanks...

Arrrrrghh... I installed Python 3 something instead of 2 something. Does that mean I need to wipe my hard drive and start over from scratch now? (I tried all this a year ago and gave up after many hours of installing and uninstalling...)
 
Top Bottom