Import gr2 skeleton

Got it to export - one problem though. It doesn't ask for the name of the root during the export process- it exports the scene with a root called, 'Scene_Root' when we need it to say 'WORLD_center'. Not sure how to fix this though.

EDIT: Never mind, I figured out how to get it named correctly in Blender. I compared the two gr2 files (standard civ5 unit vs. the converted new one) in grannyviewer, and only noticed one wierd thing: The new one has 1 new bone (though I can't figure out which one). I tried it in game and the gunship is scattered all over the screen:

Spoiler :


EDIT 2: Attached is my version of the converted model.

hmm. I wonder if the 266 fbx has selected objects as default instead of all objects. did you select all?


Edit: If it was invisible it mmaybe a rotation issue. I used to get that a lot. try rotating it and bringing closer to the platform. I'll try myself tonight.
 
I cant believe it take naterialhacker to make a gr2, grnreader to make a smd, milkshPe to make an ascii, blender 249 to make a blend, blender 266 to make an fbx, and finally nexusbuddy to make a gr2. :lol:
Would be nice if one of you experts would write a fresh tutorial on this at some point. I've got to get some 3D unit art into my mod eventually. Sadly, there are no fantasy fans among the 4 or 5 people that have mastered this stuff.
 
Yeah, I think there's an extra bone in there somewhere. I selected the entire setup for export, not sure if an extra one got thrown in. I really hope this works, in the off chance though I think I've finally figured out enough in blender to make my own units from scratch. I'm going to start on an AH-64 Apache just in case either way...
 
Yeah, I think there's an extra bone in there somewhere. I selected the entire setup for export, not sure if an extra one got thrown in. I really hope this works, in the off chance though I think I've finally figured out enough in blender to make my own units from scratch. I'm going to start on an AH-64 Apache just in case either way...

There is already the civ4 model so I'd go with that.

I think worst case we now can see the bone structure and location of.the bones. We can use this info to modify a danrell template.

I do wonder if there is something buggy with the gunship gr2 because you guys had problems before. It maybe worth extracting a jetfoghter or some unit we know we have a good template to compare the export skeleton.

Forgive any typos I'm using a blackberry on a plane now.
 
Thanks snafusmith. I tried your game files and it was invisible still so I think my unit art sql file might be wrong.
 
Sorry guys, I realize my mistake and you have brought up a valid point. I forgot to say I renamed the first bone to scene root as it was MilkShape 3D Skeleton when exported into blender. So after what you posted I re-opened the smd file in milkshape 3d and noticed that WORLD_center is the parent bone.
 

Attachments

  • BonesMS3d.png
    BonesMS3d.png
    3.1 KB · Views: 316
  • BonesBlender.png
    BonesBlender.png
    41.6 KB · Views: 311
Here is a untouched imported blend file. One again sorry guys.
 

Attachments

  • GunshipUntouched.zip
    117.3 KB · Views: 227
SnafuSmith can I ask a favour? Can you please attach your sql file as I am missing something and no matter what I do the unit is invisible? Thanks
 
I can give you my mod. its kind of ugly but I just got the unit to show in game. Here is a quick report



GOOD NEWS - We don't need blender 2.66. Once I edited the armature to remove the extra bone it exported to fbx with 249 and I could convert that fbx to a gr2. (i did this by comparing it to a danrell template and then clicking the body and going to edit mode

GOOD NEWS - after I re-parented the "base" bone to the main bone. renamed that to WORLD_CENTER and deleted the world center. I was able to export an fbx that had the same number of bones (in 266).

BAD NEWS - Later when I tried an export out of 249 (when I guess that armature was an issue) the gr2 that resulted out of tat had anextra bone again.

GOOD NEWS - I looked at my models that used danrell's jet fighter template and they had 33 bones but the base game jet fighter had 23. So bone count doesn't matter.

BAD NEWS - when I got my guinship in game it was all distorted which reminds of the earier template issue.

GOOD NEWS??? - well maybe. When I did my jet fighter templated units I only rigged the tail and the body. So instead of rigging all the gunship pieces I think if you just rig the model to the fuselage and the tail you could get a working unit.


I would try it now, but its getting late and I got work tomorrow. i'm attaching my last blend/art work rar, my unit test mod rar, and a picture of how to edit the bone structure.

g'nite all!

 

Attachments

  • armature-edit.jpg
    armature-edit.jpg
    152.6 KB · Views: 689
  • UnitTest.rar
    256.9 KB · Views: 196
  • gunshiptemplate_ekmek.rar
    255.1 KB · Views: 242
Another thing I noticed with the export from blender 2.66 was that it added animation to the file. Don't know if this will affect it or not.
 

Attachments

  • Anim.png
    Anim.png
    367.7 KB · Views: 352
I tried but all I got was a invisible unit. I think it because the base bone it still there but I don't know how to delete it. Maybe you will have better luck.
 
I messed around andrigged it only to the fuselage and the tailbone but it would somehow cut the unit in half between those two rigged parts and rotate them both 90 degrees.

I tried only rigging it to the base, only to the fuselage, and only to the tailbone. when I did those it became invisible 9except the propeller animation.

something is realy up with this unit. What i think i'm going to try next is to do a milkshape export f a unit we already have a working base for (the jet fighter) and do a comparison. I have a feeling something is wrog with the gunship animation or skeleton.
 
Thanks Ekmek, attatched is the files for the gunship.

I had to first open the *.gr2 then save it in indiestone nexus buddy or it would fail the smd conversion. Extract the grnreader98 zip and navigate to it in command prompt and enter grnreader98.exe "<path to re-saved gr2 folder>*.gr2" -a -t which will create the *.smd file. Install trial of Milkshape 3d and import into Milkshape 3d (using the first one on list - Half-Life SMD) then export as a Milkshape 3D ASCII file. Import Milkshape 3D ASCII file into blender and you have the skeleton and mesh then re-attach texture. That's as far as I got but I could not get the mesh to stick to skeleton when I exported to *.FBX.

I'm trying to replicate what you did but blender 249 will not import a milkshape txt of the gunship I make or or the one you provided. What version of blender did you use? anything else you did?

EDIT - thats weird its invisible in blender in object model but I can see it in edit mode.

EDIT2 - It looks like when I smd a gr2 it does get all the bones. Any idea why?
 
Yeah I use 2.49b and noticed it was invisible until I went into edit mode but thought it was just the way it imported it. I played with grnreader98.exe a bit again and noticed that you need the -a which from what I can see exports an SMD file with all submeshes, the vertex weights, and the skeleton information (bones + hierarchy).

Here is list of switches.

Command Line Switches
-----------------------

-h Displays this information;
example: 'grnreader98 -h'

-a Runs grnreader98 with default User Selection Options (see below);
example: 'grnreader98 <GR2 file name> -a'

-r Reverse the order of the vertex indices of the triangles;

-t Switch off the default RH to LH coordinate transformation;

-x Negate skeleton x transposition;

-z Negate skeleton z transposition;

You don't need the -t but it make the gr2 come out upside down without it. I might try with -x & -y on and see if that does anything.

As for why it gets all the bones I don't know but if you don't have -a on it exports the skeleton to a ms file which I can't see how to open.

EDIT: It would not accept the -x or -y but I did notice what you where talking about before when it exports to smd there are only 26 bones.
 
I messed with this some more. I added modifiers and corrected the mesh object to all be correct but I keep getting the unit cut in half and on its side.

I then went with the jetfighter and made the same fixes (so I can get a working fbx that I can export) and it too came out deformed.

I'm stumped for now. Hopefully danrell or bernie will show up and take a shot at it unless I think of something else.
 
I'm attaching my last gunship blend file.

I've also attached danrell's jetfigther template and my jetfighter_SMD_modified file. The SMD_modified file is a modification of the SMD blend to get rid of the default action, add texture, remove the world center bone and rename the skeleton to world. it exports fine but in game its messed up see pics below:



and the helo

 

Attachments

  • SMD blends.zip
    334 KB · Views: 223
  • Civ5Screen0073.jpg
    Civ5Screen0073.jpg
    45.1 KB · Views: 253
  • Civ5Screen0072.jpg
    Civ5Screen0072.jpg
    28.2 KB · Views: 614
Top Bottom