Blender 2.49 Tutorial (By a Beginner)

LPlate2

Warlord
Joined
Dec 27, 2018
Messages
299
Hi,

I'm not an expert at Blender. I've only made a few models and I have to refer back to video tutorials everytime I do. The tutorials I found most helpful in getting going with Blender were Ira Krakow's tutorials for Blender 2.49. This tutorial is as much an aide memoire for me, so I can more quickly do my 3D edits, as it is a tutorial for anyone else.

The Key Hotkeys
These are the main hotkeys that I find myself using when editing (some of these are only going to work when in Edit Mode). I'll probably add to this list, if I do more Blender work.
A Select/Deselect all
B This is used to select specific nodes. Pressing twice will give the little targetting circle and if you press the RMB (right mouse button) you select the nodes within the circle. The circle can be scaled by rolling the MMW (Middle Mouse Wheel). By pressing B once, and then dragging the mouse, while pressing LMB (Left Mouse Button), you can select a rectangle's worth of nodes.
E Extrude. This is used to grow new faces and vertices out from your existing model. Press LMB when finished. This will leave the newly extruded nodes still selected.
G Grab. This is used to move the selected nodes. By default it will move the nodes along the plane of the selected view. By pressing, X, Y or Z after G, you can limit the movement to just along the particular axis. Note: if you select two linked nodes, you are also selecting the associated Edge and if you select multiple linked nodes, you are also selecting the related faces. Press LMB when finished.
H Hide. This hides the selected nodes. This is particularlly handy if you want to make sure you're not accidentally selecting and editing nodes in a part of the model you are not currently wanting to work on.
AltH Show hidden. Reveals the hidden nodes.
R Rotate. By moving the mouse the selected nodes can be rotated in the plane of the view. The X, Y, and Z buttons can be used to define the rotational axis. Press LMB when finished.
S Scale. By moving the mouse this will cause the selected nodes to scale in size bigger or smaller. The X, Y, and Z buttons can be used to limit the scaling along one axis. Press LMB when you've reached the size you want.
U UV Unwrap. Unwraps your model onto the UV/Image Editor. Only use this after you've marked the seams.
W Gives dropdown with a number of options. The ones I've used most are Subdivide and Flip Normals. Flip Normals is what you use when the textured side of a face is facing the wrong way (e.g. the inside of the wall has a texture but the wall is transparent when viewed from outside).
X Delete. Obviously any edges/faces that depend on a node are removed when the node is deleted.
AltM Merge. This is used to combine nodes to minimise the number of polygons that are being used. I usually just merge At Centre. I've found that its helpful to do a sweep through the model before marking the seams for the UV unwrapping and selecting each "node" in turn and merging at it to tidy up those locations where there are multiple nodes co-existing close together.
CtrlE Mark Seam. This is used to define where you want the cuts to be made in the model for the UV unwrapping.
CtrlZ Undo. There isn't an infinite number of undos you can do so remember to save often, when you've made progress you are satisfied with.
1, 3, 7 Used to quickly switch the views to a specific plane in a window.

Most or all of those functions can also be reached by pressing on the Mesh button and working through the dropdown menu. There are additional functions, which I haven't use as much, available there.
Meshdropdown.PNG


Setting up the Views
By moving the mouse to the top of side of a window, and pressing the RMB when the bidirectional arrow appears, you get the option to "Split Area". Press this and then move the grey line to the desired split point and press LMB. This splits the window into two windows.
The windows can be recombined by moving the mouse to the divide between them and pressing the RMB when the bidirectional arrow appears, giving the option to "Join Areas". Select an arrow and press LMB to combine the windows into 1.
When editing, I typically would use two windows in 3D View side by side with the Buttons Window underneath.
viewsetup.PNG

Pressing the MMB (Middle Mouse Button) and moving the mouse allows you to rotate the view in a window. The 1, 3 and 7 buttons come in useful here also. Two different views of a model should be enough to get a clear view of what you want to work on.

Editting
Plan what you want the 3d shape to look like.
Select the Edit Mode.
ModeSelection.PNG

Either use the starting cube to work with or select it and delete it and select an alternative starting mesh.
AddingMesh.PNG

Select the nodes you want to work on using A or B. Then apply the applicable edit you want to apply; grabbing, rotating, extruding, etc.
One tool which I found particularly useful is the mirror modifier which can halve or quarter the work you need to do.
Select all in Edit Mode (A).
Use F9 to get the buttons window to Editting panel.
Under the Modifier tab, click Add Modifier and select Mirror.
AddMirrorModifier.PNG

Click the X, Y and/or Z to select the axis around which the object will be mirrored.
MirrorModifier.PNG

Do whatever edits you want mirrored. When finished, click the Apply button on the Modifiers tab.

Skinning
When you have the 3D model in the shape that you want, you'll move on to skinning
I recommend merging nodes where multiple nodes are in the same location. Flip faces if necessary so that the textures are going to be applied on the desired side.
Use CtrlE to mark the seams. These are the lines along which the image will be cut when unwrapped.
Switch one of your windows to UV/Image Editor.
In the 3D View window, in Edit Mode, select All and then unwrap (U). Polygons will appear on the UV/Image Editor.
Note: Only faces that are selected on the 3D View window will be visible on the UV/Image Editor.
Open the image that you are going to use for the skinning. Select Open on the Image dropdown on the UV/Image Editor.
OpenImage.PNG
Then select the file you wish to use and Open Image.
The selected image will appear on the UV/Image Editor.
I found it useful to have an additional window open at this point; so there's 3D View (with Wireframe Draw Type), 3D View (with Textured Draw Type), UV/Image Editor and Buttons Window.
Select your seamed regions, just one or two at a time on the 3D View. Reposition the associated polygons on the desired part of the image in the UV/Image Editor. The same hotkeys work for manipulating the nodes on the UV/Image Editor, as are used on the 3D View. In the window with the textured draw type, you should see the section(s) you are working on acquiring the desired skin. Work through until all of the required faces have had the correct skin applied.

On the Buttons panel, with Shading (F5) (the ball like icon) and Texture buttons (F6 (The yellow and black checkerboard pattern icon), on the Texture tab, click on the dropdown under Texture Type and select Image.
SelectImage.PNG

On the Image tab that has now appeared, press Load and then select the image that you are using for the skinning and press SELECT IMAGE.
 

Attachments

  • SelectImage.PNG
    SelectImage.PNG
    27.1 KB · Views: 45
  • lockinginimage.PNG
    lockinginimage.PNG
    116.2 KB · Views: 52
... continued
The Image tab will now have information populated into it.
Imagetab.PNG

Note: The dds file you are using should typically be smaller than 512x512. IIRC 64x64 is typically used for most units.

Conversion
Up until now you will have been saving the file as a blender file, .blend.
Now that it has the shape and skin that you want, its time to convert it into a nif that can be used by CivIV.
In the File dropdown, select Export and then select NetImmerse/Gamebryo (.nif & .kf & .egm).
Export.PNG

Select the folder and write in the name you want to save the file as on the File Browser window which appears. Then select Export NIF/KF.
Make sure that Civilization IV is selected on the Python Scripts window that appears. For static models, e.g. improvements and buildings, select Export Geometry Only (.nif). I haven't dealt with animating a model in this tutorial so if following (only the above) then you won't select an option to export animations. Select Ok.
Pythonscripts.PNG


Using it
Put the nif file and the dds file that you used for the skinning in a folder and put this in an appropriate location in the Assets/Art folder of your game.
You could examine the model using Nifskope if you want.
Edit the applicable ArtDefines xml to refer to the new artwork. Edit whichever xml files are needed to refer to your new ArtDefine.
Start your mod and see if it appears in the game. Sort out the size of the model when in play first by adjusting the fScale value in the ArtDefines xml. When that's good, adjust the fInterfaceScale value so that the model appears a reasonable size in the pedia.
 
Just a quick post on models that you want to animate. @tantanmen, this might be relevant for what you are trying to do.

1 If importing a model from another game, remove any existing skeleton and export the remaining unit as an obj file.
2 Take an existing similar unit from Civ IV. e.g. if you are trying to import a new humanoid unit, then take the warrior nif as a starting point. Strip everything out of this just leaving the skeleton. (save as a blend file)
3 Then import your new model object into this file.
4 In Object mode in Blender, right click on the body and then shift right click on the skeleton.
5 Use either Ctrl P (or else navigate on Object drop down to Parent/Make Parent).
6 Select Make Parent to Armature and then pick the Name Groups option.
7 Right click on the body in Object mode and switch to Edit mode.
8 Then pick a few vertices at a time and assign them to the applicable bones.
linkmaterials.PNG

The names of the bones in Civ are fairly self explanatory. If not sure what's what you can switch to Edit mode on the skeleton and toggle the Names button
Armatures.PNG
.

9 When you have all of the vertices assigned to bones, export the nif.
Note: the export is not going to work if you've missed a vertex. If this happens, go through each Vertex Group on the Link and Materials tab and Select and then Hide (H) it. Use select all (A) to find the unassigned vertex after hiding all of the assigned vertices.

If you're lucky and the model you are importing is set up in the same star jump shape as the Civ IV units (or something suitable for the non humanoid units), once you've assigned all the vertices to bones, your model will work with an existing kfm.
If you are not importing a model but are creating one yourself, then I'd suggest taking an existing model(s) as your starting point so its already in the right layout for the skeleton.

Here endeth the lesson.

---

If the model you are importing is in a completely different position to the standard layout as happened with my Greater Unclean One demon, then you'll need to rework the bones (between step 6 and 7 above). Essentially, position the standard CIV IV bones, so that they make sense for the body you've imported. After this you'll need to go about creating your own kf and kfm as the standard ones will not work (at least not well) in such a case.
 
Here endeth the lesson.
Here beginneth my boundless admiration :worship: Thank you for making this simple, straightforward, and painless.

I made it to step 8. However, I’m struggling to assign the vertices to the bones. I’ve tried to border select (the right foot, for example), but idk what to do here. Can you or someone else please elaborate on selecting and assigning vertices?

Thank you very much LPlate2!
 

Attachments

  • How do I assign vertices to bones 02.png
    How do I assign vertices to bones 02.png
    194.7 KB · Views: 56
  • How do I assign vertices to bones 01.png
    How do I assign vertices to bones 01.png
    238.7 KB · Views: 61
  • Clubman Project part 6 LP2 method.7z
    127.3 KB · Views: 27
For example select the vertices associated with the right foot, as you've done in the previous post.
On the Link and Materials tab, clicking on the little arrows beside the identified Armature (under Vertex Groups),
1667942896818.png
will make all of the available armatures appear. Select the one you want, which in this case would be BIP R Foot.
Press the Assign Button under New. This assigns those vertices to the armature.
To see if its working, press A to deselect all.
Now press the Select button and all of the vertices assigned to BIP R Foot will be selected again. Desel. stands for deselect.
If you accidentally assign some incorrect vertices to an armature, select them and then press Remove for that Armature.

Just work through assigning the vertices to the various armatures.
 
Thank you very much for your patience and help!

Just work through assigning the vertices to the various armatures.
Ah okay, my bad, sorry about the handholding, it's exactly as you said in the previous post. I guess it didn't seem like anything was happening when I went thru the selections. Idk what I was expecting 🤷‍♀️

Selecting and assigning vertices: for a first go, this was brutal 🤪

But I got him in game!

Spoiler spoilered for brevity :
mangled.JPG


... mangled. Eh, room for improvement. (and I gotta resize that flag 😓)

Blender 2.79 has really spoiled me. If you don't mind, I have a few follow-up questions for 2.49b. Sorry if you mentioned it above, but my brain is melted.

(1) Is there a way to deselect nodes in case I make a slight mistake with B-select?

(2) I've noticed sometimes my mesh shows pink when I load a blend file. Super embarrassing, but how do I add or re-add textures in 2.49b?

(3) I saw some extra vertex groups for the new mesh. Is it safe to ignore those?

(4) What do I do with extra accoutrements? This dude has a fanny pack. I split its vertices between BIP Spine1 and BIP Pelvis.

edit:
5) Do I need to delete the civ4 weapons / shields?

take the warrior nif as a starting point.
6) I think I made the mistake of using the civ4 Swordsman vertex groups as my model (because I wanted Swordsman anims). For melee units, Is it usually preferable to use the civ4 Warrior as the baseline, regardless of the animation intended?

Sorry, that's a lot of questions. But my most important question: How can I improve on assigning vertices? Will this be trial and error? The civ5 Warrior is a little more intricate / articulated, so I guesstimated. Now I can see all kinds of defects: his wrist turns funny, he gets anatomically incorrect popeye bulges in his upper arm - and his knee has completely disconnected from his robe / kilt :cringe:

edit 2: I think I also must have made a mistake by performing a Set Smooth AFTER I assigned vertices. There are two other civ5 warriors - I'll be tidier in my next pass-through.


In short, thank you, this is amazing! I'm forever grateful for all your help and guidance :king:
 

Attachments

  • blend files with textures.7z
    128.5 KB · Views: 32
  • Civ4ScreenShot1232.JPG
    Civ4ScreenShot1232.JPG
    126.2 KB · Views: 61
  • Civ4ScreenShot1233.JPG
    Civ4ScreenShot1233.JPG
    126.1 KB · Views: 60
  • Civ4ScreenShot1234.JPG
    Civ4ScreenShot1234.JPG
    141 KB · Views: 61
  • Civ4ScreenShot1235.JPG
    Civ4ScreenShot1235.JPG
    141.6 KB · Views: 60
Last edited:
Congrats (I'll be sure to use your units when you're finished them).

1) B and then Middle Mouse Button to deselect selected vertices.
2) Not sure but check the end of the first post and start of the second on how to load an image.
3) If there are vertices in the model that you are not using then you could delete them. On the skeleton there's some nodes which help position the unit within the game so I would not delete anything from the skeleton.
4) Assign them to whatever bone makes most sense. If its a completely separate object, you could delete it.
5) If you're not using an object you could delete it. If the objects aren't linked to a bone, they won't show up anyway but its clutter. Once you've got your basic model working as you want there are tutorials on swapping/adding weapons if you want to change any of them.
6) As far as I know the skeleton for the warrior and the swordsman are the same. You should be able to use the same kfm for warriors, swordsmen, scouts, etc. You could have used any of them as the source for the skeleton.

I don't know any shortcut for assigning vertices. Typically I might start at the end of a limb, assign the first set of vertices to a bone. Then deselect the vertices at the interface with the next part of the limb. Hide the vertices associated with that first bone that are still selected. Then repeat with the next part of the limb.
You can always reassign some vertices to try and get the model to look a little better when it moves.
It could be that there's a slight misalignment in the way the CIV V model is and the skeleton is set up. Again, I'd leave the skeleton as is, to avoid messing up the movements more but you might reposition some of the vertices in the model (if that makes sense), so for example the node linking the upper and lower arm is positioned where the elbow is
 
Hi
Dear LPlate2, I take the liberty of interrupting you, I have something I would like to ask. I got Blender 2.49 b with the NIF plugin. But when I use it to open the project file exported by Blender 2.79, I can't convert it to NIF with 2.49b, and the system says Python Script Error :Check Console. I don't know what went wrong, if you have a similar situation, I hope you will answer it for me.
 
I’ve never used 2.79, as @MightyToad advised me, 2.49 is the version where the stars aligned and the plugins all work for the most part.

You could check the Converting CIV V Units to CIV IV thread, as some of the real graphics gurus contributed to that and their guidance may help you, for example,
In Blender 2.79, if you save your .blend file with "Legacy Mesh Format" checked then you be able to open it in Blender 2.49 to do NIF export.

Or just use .nb2 import script for Blender 2.49.
 
I’ve never used 2.79, as @MightyToad advised me, 2.49 is the version where the stars aligned and the plugins all work for the most part.

You could check the Converting CIV V Units to CIV IV thread, as some of the real graphics gurus contributed to that and their guidance may help you, for example,
Oh, thanks for your reply. I actually got 2.49 from Tantanmen, and he could export NIF with 2.49, but I couldn't。I don't know what the problem is.
 
Dear LPlate2, I tried binding the model with your method but failed, he is a black twisting shadow in the game, but can see that it is doing action, I don't know why this happens, I hope you can answer for me
 
Upload your files and I’ll see if I can work it out.
(I’d been taking a break from 3D modelling atempts as my latest effort also ran into a problem where half the model is just grey. Hopefully, if I can resolve your issue, I’ll have a better idea of how to fix my own.)
 
I'm sorry LPlate2, I didn't see your message, I remastered one later, this time it's not black, but weird
QQ图片20221207112331.png





I also have a question, when I import a model with a very small file in blender, delete some of its faces and export it, its file file becomes much larger?
 

Attachments

  • khmer musketman.zip
    314.2 KB · Views: 29
Last edited:
Hi,

On seeing distorted musculature, the two things that I'd suspect are:
1) vertices assigned to the incorrect bone (or multiple bones) or
2) model mesh and bones not in aligned positions from the start.

I can definitely see some misalignment immediately on opening the blender file, so it looks like 2) is applicable.
arm.PNG
I'd suggest repositioning the vertices in the arms so that they are aligned with the bone. As it is the bone is behind the associated body part that is to moved.

As regards 1), vertices should be generally only be assigned to the proximate bone. At the joint, you might have some vertices that are assigned to two bones but I would not expect a typical vertex to be assigned to more than one bone or to be assigned to a bone which is not one of the proximate bones. I went into edit mode on your mesh and just started selecting each bone. This is what is assigned to BIP01 Hand.R, .
forearmassignedtohand.PNG
Most of the forearm is assigned to the hand bone, so the forearm will be distorted whenever the hand bone has its own movement. Try to assign the meshes so that the switch from one bone to the next coincides with the position of the joint. For info, this is what is assigned to the right hand bone in one of the existing CIV IV warrior models,
warriorrighthand.PNG


I suggest that you reposition the limbs slightly to align with the bones and assign the vertices to the most suitable bone.
Good luck. You're almost there.
 
Last edited:
Hi,

On seeing distorted musculature, the two things that I'd suspect are:
1) vertices assigned to the incorrect bone (or multiple bones) or
2) model mesh and bones not in aligned positions from the start.

I can definitely see some misalignment immediately on opening the blender file, so it looks like 2) is applicable. I'd suggest repositioning the vertices in the arms so that they are aligned with the bone. As it is the bone is behind the associated body part that is to moved.View attachment 647056

As regards 1), vertices should be generally only be assigned to the proximate bone. At the joint, you might have some vertices that are assigned to two bones but I would not expect a typical vertex to be assigned to more than one bone or to be assigned to a bone which is not one of the proximate bones. I went into edit mode on your mesh and just started selecting each bone. This is what is assigned to BIP01 Hand.R, . Most of the forearm is assigned to the hand bone, so the forearm will be distorted whenever the hand bone has its own movement. Try to assign the meshes so that the switch from one bone to the next coincides with the position of the joint. For info, this is what is assigned to the right hand bone in one of the existing CIV IV warrior models, View attachment 647061View attachment 647062

I suggest that you reposition the limbs slightly to align with the bones and assign the vertices to the most suitable bone.
Good luck. You're almost there.
Thank you, I have another question, why is the file I exported large and the model looks angular?
 

Attachments

  • QQ图片20221212085108.png
    QQ图片20221212085108.png
    30.7 KB · Views: 44
Last edited:
Not sure what would cause the size difference. Iirc your model looked like it had a similar number of polygons to existing Civ IV units.

Regarding angular nature, when zoomed in on a model, you’ll see all the straight lines. Same for any model. Does it look alright in game though, where you won’t have such a close up view?
 
Thank you LPlate2, actually my problem has been solved, thank you for your help I completed the first conversion unit.
Do you have any plans for the near future?
 
I've been slowed down a few times trying to get my transparency to work. There are times it appears transparent in Blender but in Nifskope and the game, there's a black box where it should be transparent.

To fix add the transparency in Nifskope (at least this worked this time):
1 Right click on the image to select the block of interest.
2 Right click on the selected NiTriStrips block in the Block List.
3 Select Node, Attach Property
4 Select NiAlphaProperty
Job done
 

Attachments

  • 1 SelectBlock.PNG
    1 SelectBlock.PNG
    320.9 KB · Views: 28
  • 3 AttachProp.png
    3 AttachProp.png
    974 KB · Views: 30
  • 4 NiAlphaProperty.png
    4 NiAlphaProperty.png
    987.7 KB · Views: 30
  • WAlpha.PNG
    WAlpha.PNG
    359.7 KB · Views: 28
Top Bottom