Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Making a custom mesh holdable


Loony
 Share

Recommended Posts

Hello all,

I've made a couple of custom meshes, detailed, and textured them and I want to put them in game now. Usually i'd just open a mesh with a similar form and use its skeleton but this time my mesh looks pretty weird and I think it's about time i learn how to do this the right way.

How can I make a custom mesh:

1. Holdable

2. Equip-able

The item is oval shaped flat and small. The player can hold it in one hand, and I want him to be able to throw it/drop it when he presses the left mouse button when it is equipped.

What do i need to do to make the mesh holdable/equip-able and have him drop/throw the item on click?

If someone knows a tutorial on this can you please point me in the right direction?

Thanks a lot for the help

Link to comment
Share on other sites

Hmm, as far as I know you can't. You would have to set it up as one of the items that the game recognizes as holdable. Off the top of my head thats weapon, shield, and torch.

To set it up as a weapon you'll need to copy you're mesh into a weapon NIF and allign it properly then setup a new sword in the CS pointing to your NIF.

For a shield or torch same idea but make new armor and assign it to either the torch or shield slot.

To drop it on mouse click the only way I know requires OBSE. You could place a GetButtonPressed (or similar) in the OnEquip block of a script assigned to your object to see when the player presses the mouse button. Then have the script unequip and drop the item (I believe the two actions have to be seperated by at least a frame). Willie may know a way to do it without OBSE though.

I'm at work now so just working from memory. If you decide on a particular course of action say so and I can give you more detailed instructions from home.

Good Luck.

WT

Link to comment
Share on other sites

Oh damn i thought you could.

Hrm, it's a rather small object actually so If i do pursue the hand held point of view i guess daggers would be the way to go. The problem is the item is a lot wider than all dagger hafts. It's oval shaped. Is there a way to augment the way the player will hold the object?

If that's not do-able I guess i'll just give it its own physics mesh and make it an item you can pick up but not equip (like soul stones) and if the player wants to drop it he'll drop it from his inventory... I was hoping to avoid this though.

Could someone remind me of the pipeline? What i remember was create the simple physics mesh around the object and set that as a collision box in 3DMax then export the Nif. Do I need to do anything special to make the object pick-up-able? (if that's even a word hehe)

Link to comment
Share on other sites

Quote

Alright so I did that and placed the object in game, the player can pick it up and whatever BUT whenever he "drops" it it seems to only hang in mid air like gravity doesn't affect it. How do i fix that?
The key is in the bhkRigidBody or bhkRigidBodyT block.  Often the best bet is to copy over a bhkRigidBody(T) from an existing clutter object of about the same size and shape.  Also, make sure that BSX flags is set to 3.  Usually that's enough, although sometimes you'll get the "hanging in the air" the first time you try to drop it, although it will drop properly after that.  In that case, you need to add a 'NiStringExtraData' block.  I'm not at my Oblivion computer right now, so that may not be the exact name of the block.  If you look at vanilla Oblivion clutter objects, you'll see what I mean (there's a long string of data text like "Mass = 0, bla, bla").  Don't forget to make it a child of the root node.
Link to comment
Share on other sites

Okay something weird is going on.

I loaded my mesh into 3DMax and imported the beef.nif model, deleted the beef mesh, resized my mesh around the beef collision and saved out the nif.

I loaded it up in game but there was something wrong

i re-opened the nif and checked the flag value of the BSXFlag and it was 2

so i changed it to 3 and saved it out and threw it in game

First thing that happened was the area where i placed the new object lost its physics mesh, after tricky acrobatics i managed to jump and grab my mesh, i then fell into the sea, got to land and tested dropping it. Now it drops! BUT it drops INTO the floor creating a hole where it fell that kills all physics and everything goes freefall

I added a screeny of my nif settings incase i did something wrong

SCREENY:

blackhole.JPG

Link to comment
Share on other sites

Unfortunately, what you describe (where the collision in the cell goes whacky) is typical of what happens when there's a problem with a clutter collision.  As I think I mentioned somewhere else, clutter collision is especially tricky.  The problem is almost certainly with the bhkRigidBodyT block.  If you let 3ds Max create a new one, try copying over the bhkRigidBodyT from the original beef .nif.  The only other thing I could suggest is to find a bhkRigidBodyT block from a similar clutter object from vanilla Oblivion.  If the Translation and Rotation in the block are all zeros, you could use a bhkRigidBody block from a vanilla object.  Good luck, you'll need it.

Edit: I should have noted that the only difference between a bhkRigidBody and a bhkRigidBodyT block is Translation and Rotation values only make a difference in a bhkRigidBodyT block.  There are completely ignored in a bhkRigidBody block.

Link to comment
Share on other sites

Hello again

I didn't really get what you said so I started experimenting. I initially wanted to create my own physics mesh and use that for picking up/dropping/and collision with other objects. That went nowhere so I then tried to copy a collision shape into my made nif and that went nowhere either or causing black holes aa_tongue.gif , just now i thought "Why not paste the NiTriStrips node with all the mesh content INTO the beef.nif and delete the old NiTriStrips of the beef.nif and save it out as my new nif?" I did that then scaled down my object to fit inside the physics box inside nifscope and I tested it out.

Results:

The mesh has physics instantly, can get kicked around, bounces off things, can be picked up.

Basically it works perfectly.

I'm still a little edgy and worried that this might have caused a problem somewhere else so I'll test this out a lot more Sunday morning.

Could you guys read over what I did and let me know based on your experience if anything will go wrong?

If everything is A-Ok I'll post out a small Tutorial somewhere on how I did it in case someone runs into the same problem.

Thanks for the help

Link to comment
Share on other sites

You shouldn't have any problems. That's the exact method I've used many times. If you still want you own Havok mesh you can do the same thing. Just copy the mesh portion out of your exported file's Havok  and replace the Havok mesh inside the beef.nif with it. I'm at work and don't remeber what the block is called, but basicly copy whatever is inside your files BhkRigidBodyT and replace whatever is inside beef.nif's BhkRigidBodyT. That way all the physics setting for the beef.nif will still be there avoiding whatever issues are stemming from the physics on your exported Havok.

BTW. If you're ever using the Havok from a nif that has a BhkRigidBody instead of a BhkRigidBodyT and you need to move it. Just add the T to the block name in nifscope and you can move it around however you want. :ninja:

WT

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...