[3DS] Collision Tutorial
|
06-15-2006, 10:20 PM,
|
|||
|
|||
[3DS] Collision Tutorial
The information here is outdated (though it might still be useful...). See here for a new tutorial.
I had trouble with the template I first selected (the column jumped wildly in-game and in the havok simulation :eek: X(). So the screenshots don't show what you will see, when using the attached template. They should still help you with the text. [TITLE]Max setup and collsion mesh creation[/TITLE] Create a hull around your model which roughly resembles the shape of your object. Keep it low-poly. The "Optimize" modifier does a great job at it in most cases, though the result might need some minor tweaking. [gally]tutcollision02.jpg[/gally]
The collision object needs to have a material assigned which isn't used by other objects, so that the exporter doesn't group it with other objects. Select a blank material in the material editor and assign it to your collision mesh. Merge your objects into a single mesh and group it with the collision object. We want to have all the parts of the model and the collision object arranged under one NiNode after export, because we have to copy/paste it from the exported .nif into a template. You cannot paste between two instances of NifSkope, so this would involve loading your model, copy, loading the template, paste, saving the template for each NiTriStrips branch. It would also require more changes to the template. You can clearly see that this will save you a lot of trouble. [TITLE]Cooking a .nif[/TITLE] Fire up NifSkope and load your imported .nif. Right click on the NiNode branch, where your mesh is and select "Block->Copy Branch". [gally]tutcollision03.jpg[/gally]
Now load the attached template. Then paste your mesh into it by right clicking on the tree and selecting "Block->Paste Branch". [GALLY]tutcollision04.jpg[/GALLY]
First we will replace the existing geometry with ours. Make sure you have "Block Details" checked in the "View" menu (F2). Select the root node and find the "Children" property in the block list. Expand it and double click on the "Value" column of the child reference. Change the existing number to the block number of your imported mesh's NiNode (block numbers are listed left of the node name in the tree view). [GALLY]tutcollision05.jpg[/GALLY]
On to the collsion info. Find the block number of the "NiTriStripsData" branch that was generated from your collsion object. Expand the "bhkCollisionObject->RigidBodyT" branch. Left click on the "bhkNiTriStripsShape" node. Change the "Strips Data" reference in the "Block Details" window to the block number of your collision strip data. [GALLY]tutcollision06.jpg[/GALLY]
As you can see in the screenshot the havok object is not oriented properly. Select the "bhkRigidBodyT" node and adjust its "Translation" and Rotation values to align it to the model to fix that. [GALLY]tutcollision07.jpg[/GALLY]
Now you need to set the material to make stone act like stone, etc. Select the "bhkNiTriStripsShape" node and change the "Material" value in the "Block Details" window. Possible values are:
You can also set the object's Layer by selecting the "bhkRigidBodyT" node and changing the "Layer" value in the "Block Details" window. This will change the color it is displayed in the CS. I do it for the sake of consistency. You can get a list of possible values by hovering your mouse cursor over "Name" column in the "Layer" row. The last step is cleaning up the mesh by right clicking on all the nodes not attached to the root node and selecting "Block->Remove Branch". That's all, you're done. If you want to change the model later, you can make a backup of the resulting .nif somewhere safe. When you re-export, you only need to copy/paste/relink the new geometry into the saved template. |
|||
06-16-2006, 02:39 PM,
|
|||
|
|||
Thanks gundalf! I'll be sure to test out your tutorial in practice soon. It gets a bit complex in the "Cooking a .nif" section, but that's probably because all I've ever done in Nifskope is 'find the flowers, paste the folder path, rince, repeat' he he. I'm sure that when I scrutinize your explanations and screenshots and compare them to what's going on in the program it'll all make sense.
I have a question though. How do I make an object have collision in the sense that the game recognizes that the player is looking at it, but still allow the player to walk through it? Because I'd like to let the player do that for as good as all the plants, like Bethesda did, but I still want the player to be able to pick ingredients from them.
¤ How to add images or files to your post ¤ Silgrad's UBBCode
My pet peeve: huge images in img code. I reserve the right to make any such image into a clickeable thumbnail whenever I see it. Angel mired in filth |
|||
06-16-2006, 02:57 PM,
|
|||
|
|||
Quote:Originally posted by RazorwingYes it's quiet confusing first, but when you got a little practice it's quiet easy. Quote:Originally posted by RazorwingHmmm, don't know. I'll investigate. Hah, that was easy: set the "Layer" and "Layer Copy?" values of the "bhkRigidBodyT" node to 15 (non collidable), seems the layer is used for more than coloring in the CS. |
|||
06-16-2006, 04:26 PM,
|
|||
|
|||
Bump for answer... =)
|
|||
06-16-2006, 08:45 PM,
|
|||
|
|||
Quote:Originally posted by gundalf Good call, I didn't notice the edit Perfect, I'll keep that in mind when setting up the collision on plants. First I'll finally put together the new Alpha though, so folks can mod tombs with your set. Unfortunately some RL stuff got in the way, plus I felt I had to get a few things in there, but I've settled for that I'll never be able to get all the updates I wanted in it in a timely fasion. Those things'll just have to wait for the next alpha
¤ How to add images or files to your post ¤ Silgrad's UBBCode
My pet peeve: huge images in img code. I reserve the right to make any such image into a clickeable thumbnail whenever I see it. Angel mired in filth |
|||
06-17-2006, 05:32 PM,
|
|||
|
|||
I followed your tutorial up to the point where I was going to paste my copied NiNode branch into your template. Then I got this error, and NifSkope crashed.
The cause of it seems to be... that my Civ4 exporter is somehow older than yours? Could that be it? Strange if that was the case, because I got it from this post and it doesn't seem to have been updated lately. Oh, and I'm going to go out on a limb and offer a little tip that could potentially be helpful to some, but because I haven't been able to complete the tutorial just yet I wouldn't swear by it. If you give the material on your collision mesh an Opacity of 0 it becomes easier to see the underlying model in Max. Since the collision mesh should be invisible in-game in either case I figure it wouldn't cause any problems, but I'm not sure.
¤ How to add images or files to your post ¤ Silgrad's UBBCode
My pet peeve: huge images in img code. I reserve the right to make any such image into a clickeable thumbnail whenever I see it. Angel mired in filth |
|||
06-17-2006, 08:34 PM,
|
|||
|
|||
The difference between 20.0.0.5 and 20.0.0.4 are very small. I think 20.0.0.5 is used by civ4 but it can also get sticked in TES. I'm not sure but Zoo tycoon 2 is using one of those versions. I was wondering if we can use it since the exporter has full support. I mean we can get ready with animations. Anyways great tut dude. So is this the most waited havok support? I'm just a little confused.
If you can't get someone out of your head maybe they're supposed to be there.
|
|||
06-17-2006, 09:11 PM,
|
|||
|
|||
Razorwing: The warning can be ignored. It's normal, should have mentioned in the tutorial. Strange that your NifSkope crashed, mine crashes sometimes when removing branches, but when trying again it does it fine. Have you tried more than one time?
horodnicdragos: No, not full Havok support. |
|||
06-19-2006, 02:30 AM,
|
|||
|
|||
Aah, ok. No I only tested once, because I thought I somehow had an outdated Nif exporter and that I needed to update it. I'll try a few more times, and as you say, I'm sure it'll work then. =)
¤ How to add images or files to your post ¤ Silgrad's UBBCode
My pet peeve: huge images in img code. I reserve the right to make any such image into a clickeable thumbnail whenever I see it. Angel mired in filth |
|||
06-20-2006, 03:10 AM,
|
|||
|
|||
Oki, it didn't crash this time around.
Perhaps it was because the first time I tried it, the nif template wasn't in Oblivion's dir? I dunno, that's the only thing I did different this time. You lost me at "Select the root node and find the "Children" property..." and onward from that. hrug: Perhaps you could describe more in-depth what it is that's happening, and what the tecnical terms you use means. The screenshots doesn't seem to exactly match the template, which in this case adds more confusion to an already dumbfounded Razorwing hehe. Or I dunno, maybe I'm just crosseyed from a five hour stint in Max, but the lack of replies from others could indicate I wasn't the only one who thought that part of your tutorial was too succinct.
¤ How to add images or files to your post ¤ Silgrad's UBBCode
My pet peeve: huge images in img code. I reserve the right to make any such image into a clickeable thumbnail whenever I see it. Angel mired in filth |
|||
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)