How to: Unglue a hat/etc. from a LH

dutchking

Deity
Joined
Apr 30, 2007
Messages
3,317
How to: Unglue a hat/etc. from a Leaderhead.
NOTE: this tutorial is slightly out of date (new blender versions, streamlined imports, etc.) I'll be updating it when I get the time.
Ok, this is the tutorial I've been promising to write for about a month now. Have you ever wanted to use a leader's hat? But it was glued onto the leaders body? Well, this tutorial will teach you how to unglue these parts.
What you will need:
Blender 2.45
Blender NIF Scripts v2.1.19
Python 2.5
PYFFI
And the DDS Converter from the skinning tutorial.
All those are just to run the scripts, if you have problems with running them I might be able to help, but I'm currently running all of that except they deleted the old version of PYFFI which I use. (the scripts usually are very shaky)

Ok, I assume you can run the scripts well now (if you can't just ask for help). So we'll move on to the actual process of ripping off a hat, etc. First import the leaderhead you want to separate. For this tutorial I'll separate Bismarcks helmet off his head. So if you want to see your textures while you work (HIGHLY RECCOMENDED), you'll have to convert Bismarck_DIFF.dds or Bismarck_NONSHADER.dds to .tga using the DDS converter. For this I'll use the Nonshader, because first of all almost 100% of the time the nonshader works on import, and second is that I don't have to add shaders after I export from blender (shaders are lost on import with the regular one if the regular one even works). So now before you import, I assume you have Blender set up to import, and your textures ready in TGA format.
You select Bismarck_NONSHADER.NIF:
1.jpg

And then you'll go back to and select the "..." and SELECT BISMARCK_NONSHADER.TGA!!!
2.jpg

Ok, now you import and you're in object mode. Switch to UV Face Select mode. If your textures were configured correctly it should look like this:
3.jpg

Now all you have to do is select all the faces of the object you want to separate. Do this by Right Clicking while holding down shift to select multiple faces. (this is just started out you have to select every face on his helmet):
4.jpg

You can change the view, zoom in, etc. to do all this. After you've selected all the faces, go into edit mode, make sure all the faces are pinkish (if you make a mistake you can click control z to undo a deselect) and right click then go to Edit>Edges>Mark Seam. After that all the borders will turn orange. Then simply click Edit>Verticies>Separate. Voila, you're almost done. Then go into object mode, select the separated hat. Then export a 3Ds (it goes really quick) to your desktop. Now open Nifskope in a new LH such as napoleon or something, and import the 3Ds into the nif. You might have some trouble finding it, but that's because its been scaled down by 10. Right click when you find it, click transform>edit and scale it up by 10. Your hat should be there, but the texture will probably be messed up. Select the hat, and then click view>block list. Now go to my tutorial here called "Graphics Basics" and follow the instructions there on how to change the texture back to normal. Then go to my other tutorial called "How to add a hat etc..." and do that to add the hat to the LH.
YOU'RE DONE. Its really confusing so just post here if you have questions. I've used this method many times before, its a good one in my opinion. But it's hard at first. For an example of how I used Bismarck's hat look at my Kaiser LH.
5.jpg

:p
 
If you click accidentally without shift, you can always just click ctrl+z and it reselects all your faces! :p

And I may have a boneless napoleon suit, let me check when I get back home.
 
dutchking,

Have you discovered this: I was looking for an Asian peasant hat and found that if I follow rabbit, white's unit tutorial with the sword that it works for leaderheads too! granted they may not be as detailed but I first opened my leaderhead in sceneviewer then added the unit file and took the hat. then back in blender I had to rotate it etc 9its easier there IMO) and then export it. I'm still messing with it, but this could open new possibilities!
 
Err...Ekmek you can take objects from any single NIF. :p

I used a French Helmet from a unit one time in a LH I never released a few months back, and a Roman Helmet on another. They aren't that detailed but still fairly useful.
 
So now before you import, I assume you have Blender set up to import, and your textures ready in TGA format.
You select Bismarck_NONSHADER.NIF:
1.jpg

And then you'll go back to and select the "..." and SELECT BISMARCK_NONSHADER.TGA!!!
2.jpg

Ok, now you import and you're in object mode.
Ta da... :p
 
I have a question about attacking other leaders hats and accessories to other units. Ok I was trying to give Abe Lincoln Churchill's hat, so I dragged all the stuff necessary and then saved and loaded it up, but Abe moved and the hat stayed in the same spot? Do you have any clue of what I'm doing wrong? :confused:
 
you do it in blender?

if so you need to go to edit then select all the faces of the hat. then, in object mode, merge the objects (hat to body). then go back to edit mode and look to the right corner and see b_whatever. pick b_head then hit assign. then deselect it to know its there and then select again.

see bernies RIG tutorial for pictures etc


if you are trying in sceneviewer - i don't do it there but you may need to drag the orange trishape for hat to the ninode thing that says head then you have to go to properties and mess with te local translation until it lines up right (harder in my view, thats why i don't do it). hope it helps.
 
Ekmek...
NO.
You don't need to rig anything.
HOW TO: Add a Hat/Helmet/Sword to NIFS
Chapter 1, What you will Need:[/align]
1. NifSkope
2. NifViewer
For installation of the NifViewer just give the 3DsMax 7 scripts their own folder, you dont' need 3DsMax for them to run as a separate application.
[align=center]Chapter 2, What is a NIF?[/align]
A NIF is a 3D object that a .dds texture file wraps around. Every 3D object in Civ IV is a NIF. It's basically as simple as that. We already covered .dds files in the last tutorial, so this is the next step in 3D modeling!
[align=center]Chapter 3, Let's start Simple:[/align]
Ok, so lets just start simple, and add a hat to a leader. For example, let's add Winston Churchill's tophat to Gandhi's head! :cool:
[align=center]Step 1:[/align]
Copy the folders "Winston Churchill" and "Gandhi" from:
C/Program Files/Firaxis Games/Sid Meier's .../Warlords/Assets/Art/Leaderheads/WinstonChurchill
AND
I'm assuming you have the assets to Civ IV (vanilla) unzipped. Read up on it there if you don't. After (or if they are already) unzipped the directory is Assets/Art/Leaderheads/Gandhi.
To your desktop.
[align=center]Step 2:[/align]
Open Nifskope, and take Churchill's Hat and copy it into Gandhi's NIF using NifSkope:
user_68_screenshot1_1193622195_797346.png

Do NOT close NifSkope and Click "load" and select Gandhi.nif (not Gandhi_noshader)
The textures may appear white but that's just because nifskope has Churchill's textures loaded and not gandhis, nothing to worry about.
user_68_sreenshot2.png

Now Save the NIF and close NifSkope. For now. :wink:
Copy "Churchill_DIFF.dds" from WinstonChurchill and paste it in Gandhi. For the texture.
After you're done with all of that it should appear like this (gandhi.nif):
user_68_screenshot3.png

So now you're almost done, you can get rid of the winston churchill folder if you like because you're done with it. Now you'll need to copy "Boundshape.nif" and "Boundshape.tga" from wherever you put the Sceneviewer folder to Gandhi's folder. I dont' know why Nifviewer needs this to open files but it's glitchy, and all we've got!
[align=center]Step 3:[/align]
Open the NifViewer, don't right click and press open as on gandhi.nif or you'll get some weird loading error, if you do anyway ignore it. Don't be scared if it doesn't show up.
When you first open it up it should look like this:
user_68_screenshot4.png

Now, all you need to do is this:
Select "m_winston_churchill_hat" and move it to the ninode "head" (click and drag). This will make the hat appear in game! :lol:
user_68_screenshot5_1193620453_487863.png

Now you need to Save it, make sure you're overwriting the original file (or else it'll get messed up).
[align=center]Step 4:[/align]You're almost done!
Now you need to reposition the hat:
user_68_screenshot6.png

(Using NifSkope)
Just right click transform edit, and then reposition it, it's fairly simple to understand.
Now you're done! You've added a hat to Gandhi! Wanna see it in game? It's your lucky day, Make a new MOD:
Just make a new mod, bolded folders means make a new folder:
My Games/BTS/MODS/Gandhi'sHat/Assets/Art/LeaderHeads/PUT GANDHI HERE (the whole folder)
Now load it up and see!
Well, BTS JUST GOT SCREWED UP SO NOW I HAVE TO RE INSTALL IT! WHAT A PLEASURE! :roll:
The finished Screenshot will be posted soon...
15 hours later...
[align=center]TAdA!
user_68_screen24.png

:lol: [/align]
This same method works with pretty much everything else in the game too. :twisted:
Oh, and the "noshader.nif" is like the noshader.dds and it's only for people with crappy graphics cards, you can edit this if you like but keep in mind not to make the files too big or it'll crash their graphics card. :razz: and also make sure to copy things from nonshaders to nonshaders for LH making. :cheers:
Also, this is important and will save you time. A "ninode" is something that controls an object in it's animation, if you just copy and paste something into the nif it won't work in game. And the way we took a hat and put it in "ninode_head" is the way you must put a...ring for example on a "ninode_finger". You guys are pretty bright I'm sure you get it. :wink:
 
Ekmek...
NO.
You don't need to rig anything.


:confused: so just dragging it to the ninode in sceneviewer would attach it? I guess that works for hats, but scalps, hair etc I was not so lucky. I prefer rigging though , that way i avoid the tedious transformations in scneviewer...oh the hassle with eyes
 
Scalps and hair work too. Just attach it to ninode head. That's less tedious than rigging. Its not tedious at all. You can just copy the object and paste it in a node with nifskope.
 
Back
Top Bottom