Quote:Originally posted by Jinix_the_Elder
For me, collision has to be the hardest thing to do. I can make ONE thing have collision, but if the model has two things the collision doesn't work for me. I have tried with 3Dmax8 but still cannot get it right.
I think it's time for me to try this Blender program and your instructions will help me get into it as I have used Nifskope a lot so I think it'll be possible for me to follow your outline here.
My use of Nifskope as been only for re-texturing as the whole thing is like trying to read an ancient script - the words are almost meaningless to me with all the abbreviations and numbers. I'm afraid simple algebra is even beyond me ( I left school at 14 and never took up the subject).
I'll learn it with the need to do it but if someone can explain the steps , a 1,2,3, HOW to combine all the 'pieces' of a model to have just 1 collision mesh, I will certainly appreciate it.
I tried really hard to follow a 'how-to' on Youtube but it's just much too blurry for my old eyes to see.
Hello Jinix,
Let me see if I can put the collision making and exporting info into a more user friendly format....
1) So once you finish putting your custom nif together, you'll have to import that nif into Blender ( "File" -> "Import" {then choose "Nif" format})
2) Next, select all mesh pieces (click on one mesh, then click "A" until all pieces are highlighted in pink outline).
3) Next "duplicate" all those mesh pieces (be in "Object Mode" then go to "Object" -> "Duplicate".....or just click "Shift + D"), then before clicking off those meshes, press "CTRL + J" to join those duplicates together (be sure to click on "Join Selected Meshes" in the pop-up window)
Object Mode Screenshot :
http://img43.imageshack.us/i/objectmode.jpg/
"Duplicate" screenshot :
http://img511.imageshack.us/i/objectduplicate.jpg/
4) Then, you'll see a button with three arrows - click it. Then click the other button that appears to the right of it, that also has three arrows. Under "Draw" click "Bounds" in the left-most column, and "Wire" in the right-most column, so that both buttons become darker shade, meaning that they have been selected and clicked:
http://img843.imageshack.us/i/threearrowsbutton.jpg/
5) Then go to the button that looks like a pacman face, and click on it. Click on the button that says "Bounds", and select "Triangle Mesh" in the field next to it (this will make bhkMOPPBvtreeShape type collision)
Step 5a -
http://img809.imageshack.us/i/pacmanbutton.jpg/
Step 5b -
http://img35.imageshack.us/i/collisionchoice.jpg/
Go to "Export" and choose "Nif" format. Give your exported nif a new name, then click "Export Nif/Kf". You'll get another window with various options (choose these options for "Static" meshes):
http://img690.imageshack.us/i/blenderexp...ngs4s.jpg/
You should now have a nif on your PC with your mish-mash of nif pieces, and "quick and dirty" collision for them. The collision might not be low-poly (low-poly is preferred for collision), but it'll do for reg. meshes that were already of acceptably low-poly level to begin with.
To Optimize You Collision Mesh - aka "Make It Lower Poly"
1) If the collision is still too high-poly, you can go back into your Blender scene with the single collision mesh, click on the collision mesh (the"three arrow button" will tell you if you've selected the collision mesh, because it'll have "Bounds" and "Wire" darkened for that selected mesh, like mentioned in "Step # 4" above). Then go into "Edit Mode" (the selection above "Object Mode", in that drop-down window).
2) Go to "Mesh" -> "Scripts" -> "Poly Reducer" ...you'll get a pop-up window:
http://img220.imageshack.us/i/polyreducescript.jpg/
Make sure you have all the non red-circled fields in that pop-up window, the same as in my screenshot. I think those fields are default, however, so they should already be chosen as such. The part I circled in red, is the field whose number values is focused on mainly, in this window. A value of .500 - this will decrease the number of polies in your collision mesh by half. (.500 is half of a whole 1.000 ; the values are based off 1.000, which represent a whole, undecimated collision mesh. A decimated mesh is one that has had polygons removed to some extent, in order to optimize it).
The lower the decimal value, the more polygons that are removed from the mesh, and the more optimized it becomes. You have to be careful, though, because it is fully possible to have too many polygons removed, to where your reg. mesh is not properly enough covered by the collision mesh, in certain areas. It's best to experiment with the values, until you get a good result.
Also, you can "weld" vertices together manually, to further reduce polygons in your mesh. If you are in "Edit Mode" with your collision mesh, you can click on two or more vertices. Let's say you click on "two vertices" one is clicked first, then the other is clicked on second (hold "Shift" key down while selecting the vertices ; "Shift" key allows you to select more than one object with mouse button). Then select "Alt + M", and choose either "At First", "At Last", or "At Center":
"At First" = makes it so that all the other vertices are welded to the "first vertice that was selected in sequence". Basically it looks as if all the other vertices jumped to where the first selected vertice is located, and have become one with it.
"At Last" = makes it so all the other vertices jump to where the last vertice selected is located, and have become one with it.
"At Center" = makes it so all the vertices selected, meet at a point that is midway between all of them.
To Export Multiple Collision Meshes:
There is another method, where you don't have to join the duplicated meshes together. If you make different collision meshes, to use on different parts of a regular mesh, and especially if these different collision meshes use different collision shapes (bhkBoxShape vs. bhkSphereShape vs. bhkCapsuleShape vs. bhkConvexVerticesShape vs. bhkMoppBvTreeShape ...), you start with "Step # 4" above after making your collision mesh parts, and follow the step to "Step # 5, but stop at the part where you "select the Triangle Mesh".
Depending on the shape of the reg. mesh piece you're wanting to cover with collision, you can choose any of these other collision shapes in the drop-down window (I'm not sure if "Cone" is Oblivion friendly, though). "Convex Hull", makes a bhkConvexVerticesShape, in Nifskope, when exported. Box, Sphere, Capsule, Convex - these shapes are more optimized than MOPP collision, a good deal.
Suppose you have a square table with four square legs - you can use five "Box" shapes, on each leg and one for the table's top ; then don't join them, but export them while they're still separate.
Upon export, under "Collision Options", you'd choose "Use bhkListShape" also, in addition to the settings in my export screenshot above. Then export. You will end up with a single bhkCollisionObject, with a bhkListShape somewhere within it, with the 5 bhkBoxShapes furthest within, with or without bhkTransformShapes/bhkConvexTransformShapes. This nif might even end up being lesser in filesize and game impact, than if the boxes had been joined together and exported as "Triangle Mesh" , since the box/sphere/capsule/convex collisions are more performance friendly (than "Triangle Mesh", also known as bhkMoppBvTreeShape in Nifskope). Test out exporting collision for a table like this using both methods, and see what results you get. I, myself, have come across such differing results before, however.
If you had not chosen the "Use bhkListShape" export option, and still kept the 5 box shapes separate, all five box shapes would have exported, but instead, four of them would be under four separate NiNodes, called "CollisionDummy" or something like that. Basically, you'd end up with 5 different bhkCollisionObjects, each with one bhkboxshape - this just makes the nif bigger in filesize and is not optimal in the game. Sometimes this method is necessary, like for nifs that use multiple NiNodes for animation, and/or nifs that use constraints.
Koniption