Weapons with Milkshape
From NibleWiki
Aim
Making a Weapon for Oblivion with Milkshape
Needed Software
Milkshape with NIFLA-Exporter
The Gimp with NormalMap-Plugin and DDS-Plugin
NIBLE starting with version DB 05 20070303
Step by Step
| First we need a weapon model we want to make useable with Oblivion. I chose a somewhat excentric staff i made for morrowind some time ago, but it really doesn't matter what kind of meele weapon you design. This is no basic modeling tutorial, so you have to know how to get this far or use a custom model for Morrowind.
Please note that Bethesda won't allow the usage of original Morrowind material for Oblivion plugins! The first step is to export the model, using the Milkshape NIF-Exporter for Morrowind (!). | |
| Now we open the Mesh in NIBLE. A Milkshape-exported Mesh will be directly convertable (the Conversion Button will be active), with other sources you might need to remove blocks like Particles and animations first. Now hit the button to start conversion. | |
| Contrary to Morrowind, Oblivion insists on well structurated Texture directories, so we need to sort the textures to sub folders and change the link in the Nif accordingly. Nible's Texture manager will help you with this. If you're using old Morrowind material you might need to convert the textures to the DDS-Format using the Gimp. Besides from that, you'll have to clear the filenames of underscores, because Oblivion uses underscores to link Normal maps or glow maps. I | |
|
Talking about Normalmaps: they can't be omitted for Oblivion, since it happens that Oblivion will display meshes without Normal map in an odd way, or even not at all. First part of creating a Normal Map is the gloss map - open the Texture you need to generate a normal map from in the Gimp and add a Layer mask to it. A good way to start is the usage of the Grey scale-copy of the texture. Then use Paintbrush and Airbrush tools to darken the map where you want to make the object matte and lighten it up where you want the object to shine. in this case, i want the skull to shine, but not the cloth or the eye holes. This can be accomplished with a map like in this picture. | |
|
The Normal Map Plugin for GIMP does the rest: used on the normal texture, it will calculate an emboss effect for darker parts and will let brighter parts stick out. Of course you can edit your texture prior to using the plug in to create interesting effects like ornaments which can only be seen in the right lighting. The Plug in itself (under Filters/render/Normal Map) allows to set an overall scaling (lower values for flat stuff like cloth, higher for things like engraved reliefs on metals. If the texture is Wrapping around, you'll have to check the "wrap" option aswell. Save the normal map under the same name as the basic texture, but add an "_n" to the name. When asked for the dds-format, dtx3 and "generate Mipmaps" are appropriate options. | |
|
Time for the Construction Set: This article doesn't want to explain the adding of a new weapon there are other tutorials for that. Instead we need to orientate the weapon to fit gripping positions. Put the new weapon and a stock weapon of the same type (a staff in this case) at exactly the same coordinates (e.g. 0/0/0). Now move and rotate the new model in the CS to fit the spots of interest, note down the values and return the mesh to the original position. Now use the geometry controlls in Nible, using the values you've got in the CS. Save your changes and refresh the view in the CS with F5 to see if you fit the gripping positions - if not, do some fine-tuning. It may happen with some rotations, that the model will look inside out (in the midle of the picture). in such case, use NIBLEs function Flip all TriShape Triangles in the tools menu to fix it. | |
|
Oblivion Meshes need a Havok Model to handle Collision. The demo mesh in this is too complex to be convertet to a colision shape. so we need to approximate it with shape primitves. Go to the topmost node and hit create primitive in the Havok section of the block details. | |
|
Instead of the suggested box, we want to use a capsule shape - that's a cylinder with two half sphere caps at the end of it. Choose "Capsule shape" from the listbox and hit "replace". | |
|
Now fit the parameters of the capsule shape - the coordinates of the half-sphere caps and the diameter - to the cylindrical part of the staff. In the CS you can have a look at the collision mesh by pressing F4. | |
|
A single form will not be enough here - lets wrap our capsule in a list shape (you'll find the button in the screenshot above) and add another Shape to the list - this time we'll use a box. Make a crude guess on the size of the staff's head and enter it in the shape parameters. A look at the result in the SC will show that the box is centered at 0/0/0, but we need to move it to the skull part. This can be acomplished by wrapping the Box Shape in a Transform Shape with a click on wrap in Shape Transform. | |
|
Position and Rotation of the Box can now be edited, just use the CS and F5 to verify. Of course you can add more shapes to the List, but please don't forget performance. The professional Artists at Bethesda rarely use more then two shapes, e.g. two capsules for swords or a capsule and a box for axes. I'd vote for keeping it at the capsule and the box. | |
|
To tell Oblivion to really use the Collision info, we need to add another block: choose the base node and add Oblivion/Extra Data/BSX-Shape to it. The BSX (Bethesda Softworks Extension? ) Flags help Oblivion to quickly sort meshes by function, symbolized by a code value. We need to change this value to 3:Mobile Havoked Item to activate the Havok collision. Another extra data block for the base node will tell the game where to put the weapon when not drawn - find the variants again in the Oblivion/Extra Data Section of the Library. | |
|
For the other fine tuning on the physic parameters (in the RigidBody-Object) just take a look at the values for compareable objects from the base game. Especially the center will affect the behavior of your object and has to be placed carefully. If you like, you can of course change the color of the collision mesh to weapons(orange) instead of the default clutter (light blue), but that doesn't really matter for the game, it just helps you when orienting in the CS with collision meshes active. | |
|
Well, that's it. It might be a good idea to check the weapons placement in the game in different animations - sneaking, running, jumping, blocking... in 1st and 3rd Person view - you might need to refine it once more - one can spend ages with this. Another finetuning potential: The Havok material setting, which will decide on things like hitting sounds and swimming behavior - metal will drown, wood will swim. Anyway: enjoy your new weapon! |
