Collision box needed for an activator?

Post » Thu Jun 21, 2012 10:31 pm

I want to use the Data\Meshes\Magic\MAGInvParalyze.nif as an activator.

I swapped this model for the invisible activator model, but it does not activate in game.
I assume it is because it has no collision.

Anyone care to help me out by either making the model work as an activator or telling me what I need to do?

Thanks.
User avatar
Siobhan Thompson
 
Posts: 3443
Joined: Sun Nov 12, 2006 10:40 am

Post » Thu Jun 21, 2012 5:04 pm

I'm not sure that there's a way to actually make collision yet. Right now, I think people just copy and paste the "bhkCollisionObject" branch (the collision) from a vanilla mesh into their own mesh in NifSkope.

But I don't really know much about modelling, so take that info with a grain of salt.
User avatar
Mackenzie
 
Posts: 3404
Joined: Tue Jan 23, 2007 9:18 pm

Post » Thu Jun 21, 2012 5:32 pm

Tried the copy and paste thing...
read bunches and bunches of posts and such...
after 10 hours, I giving up for now...
I guess I'll just have to use two objects instead of one.
Doesn't sound bad until you consider I'm placing several hundred x 2...
User avatar
Penny Flame
 
Posts: 3336
Joined: Sat Aug 12, 2006 1:53 am

Post » Thu Jun 21, 2012 8:23 pm

Yes, you can create custom collision with 3DSMax, but it's kinda dramatic. It's much easier to do by finding a similar shaped Vanilla mesh and copy-pasting the entire bsFadeNode over. Then you delete the unwanted visible geometry (the niTriShapes, not the bhkCollisionObject)... but AFTER you adjust the bsFadeNode to be in the correct position.

I have been very successful doing this with my Gokstad ship mod... though that version isn't quite ready for upload yet. But an example is my sail while it's still all folded up. I took a dockColumn and copy-pasted it in; scaled, rotated and translated the bsFadeNode to position the column over my sail, then delete the visible column. Works like a charm.

If you wanted to try custom collision in Max, check out this thread. Be warned that concave collision is not possible (that I know of)... which means you can't have a bowl-shape or a wall with a window; unless you use more than one collision object (all of them being convex, then pieced together).
http://niftools.sourceforge.net/forum/viewtopic.php?f=38&t=3308&p=22619#p22619
User avatar
Makenna Nomad
 
Posts: 3391
Joined: Tue Aug 29, 2006 10:05 pm

Post » Thu Jun 21, 2012 6:58 pm

Can you not use a primitive trigger box akin to the mannequins and set its activate parent (with activate parent only) to the un-activatable activater?
User avatar
OJY
 
Posts: 3462
Joined: Wed May 30, 2007 3:11 pm

Post » Thu Jun 21, 2012 9:17 pm

A simple box or sphere would be more than enough for what I want. (Using a visual effect as an activator.)
And again, I'm working on the assumption that collision is needed in a nif for it to be used as an activator...
The other thing that seemed odd was the BSX node. In the effects nif it is BSX[4], in the invisible activator it is BSX[1].
Maybe I'll try again after a day or two once I've "rested up".
User avatar
Ashley Campos
 
Posts: 3415
Joined: Fri Sep 22, 2006 9:03 pm

Post » Thu Jun 21, 2012 3:40 pm

Can you not use a primitive trigger box akin to the mannequins and set its activate parent (with activate parent only) to the un-activatable activater?
I'm doing that in essence now...
I'm placing a DefaultInvisibleActivator rotated and scaled below a MAGInvParalyze static.
It works fine in game, but I was hoping to combine the two together. That would make it so much easier to position in cells.
Not to mention cut the stuff added by half.
User avatar
Josh Sabatini
 
Posts: 3445
Joined: Wed Nov 14, 2007 9:47 pm

Post » Thu Jun 21, 2012 10:48 am

For "BSX[#]", the "#" just represents the string index in the NiHeader->Strings. Say it's "2", the string index will be like: 0="blah", 1="blahblah", 2="BSX". On working activators, they have a "BSXFlags" entry which has a little flag that can be right-clicked under Interger Data to select "Flags". The first two are neccessary for collision I believe: "Enable Havok" and "Enable Collision". There are also usualy 3+ "bhk*.*" entries which make up the actual collision primitive in the nif (bhkRigidBody, bhkCollisionObject and others depending on the shape/complexity). Have a look at "Dungeons\Nordic\Doors\TempPortStone01.nif" which is fairly simplistic.

Edit:
I think "BSXFlags->Enable Havok" may only be needed for movable objects.
User avatar
Beulah Bell
 
Posts: 3372
Joined: Thu Nov 23, 2006 7:08 pm

Post » Thu Jun 21, 2012 9:29 am

I'm pretty sure you need a collision box and a name on your item, search for the coffin thread I made a week ago or so.
User avatar
Rhysa Hughes
 
Posts: 3438
Joined: Thu Nov 23, 2006 3:00 pm

Post » Thu Jun 21, 2012 9:00 am

I'm pretty sure you need a collision box and a name on your item, search for the coffin thread I made a week ago or so.
I knew about the name.
I guessed at the collision box when the effect nif wasn't clickable in game.
Then I looked at the invisible activator which does have collision - says so right in the name... lol
The effect nif has no collision.
Which brings me back to my original thought...

I must be doing something wrong.
I cannot seem to get the bhk to parent to the nitrishape.
It seems I can only attach to a new parent ninode.
And the new ninode won't parent to the bsfadenode.
User avatar
Laura Hicks
 
Posts: 3395
Joined: Wed Jun 06, 2007 9:21 am

Post » Thu Jun 21, 2012 9:56 am

I'm no nif master by any means, but I've done it a few times for Oblivion, and I think you can copy branch /paste branch from one nif to another and insert the collision that way.
User avatar
IM NOT EASY
 
Posts: 3419
Joined: Mon Aug 13, 2007 10:48 pm

Post » Thu Jun 21, 2012 5:35 pm

If you're using a trigger or collision box, that adds to the necessary code and number of objects in the area... which may lead to performance issues. I think you're on the right track in wanting to get the collision inside the NIF; and you're correct, without collision - a NIF needs a trig/coll box proxy hooked up to it for Player to be able to interact with it. For just a simple box-shape, I would try using basicBook01.nif under clutter/books. You would use the procedure below, subbing in that niNode for where I say bsFadeNode (then, I would recommend converting that niNode to a bsFadeNode just to be sure... I think it has something to do with the object properly fading/popping from LOD to closeby).

Here's a section from my actual notes on how to do this...

(NIF) with collision for an activator that moves:
- copy/paste over the appropriate collision WITH it's visible geometry (the whole bsFade node)
[place that bsFadeNode under the root node (so it adds one extra child to the root)]
- translate/rotate/scale that bsFadeNode as needed (to place the collision)
[in the spliced bsFadeNode, delete the visible geometry after it's positioned (the niTriShapes/etc, but LEAVE the bhkColl and the bsxFlags if there is one)]
- needs a bsxFlags (130 works)
[I'm not sure if the root AND the spliced bsFadeNode need it, but mine works when they both have it]
- if it isn't already, convert the collision's 'body node' to a bhkRigidBodyT (regular rigidBody won't work.. no collision)

[EDIT: by the 'entire' bsFadeNode, I don't mean the book's root node, I mean the bsFadeNode which contains the bhkColl. In THIS case, it's actually a niNode (bone01[3]).]
User avatar
SaVino GοΜ
 
Posts: 3360
Joined: Mon Sep 17, 2007 8:00 pm

Post » Thu Jun 21, 2012 8:37 pm

I'll give it a whirl. Thanks!!
User avatar
Vivien
 
Posts: 3530
Joined: Fri Apr 13, 2007 2:47 pm

Post » Thu Jun 21, 2012 7:40 am

Wellll......
While it appeared that I was succesful in splicing the bsFadeNode from the egg.nif (sphere) into the effect nif, it did not work in-game.
So, obiviously I missed something. But at least now I have a bit more to work with - maybe I'll hit on the correct combination the next time I dike around with it.
Thanks SLuckyD.
User avatar
Sarah Edmunds
 
Posts: 3461
Joined: Sat Jul 08, 2006 8:03 pm

Post » Thu Jun 21, 2012 6:39 pm

I'm not sure which egg.nif you're talking about.. but looking at both the chaurus and bird eggs, they're the same. They are havok enabled, so that may be something which causes problems (though I'm not sure how).

Something else that may be the problem... you said you're trying to put it in an effect? I haven't messed with those at all, so they may have some kind of specific data that you may need to add or change for it to work properly. From what little I've seen about the effects I use is that none of them have collision; but that's not to say none DO.. just the ones I tried - so maybe you can't collision in an effect because of hard-coding or some kind of limitation. If this is the case, create your object as a movable static instead of an effect - then script it's appearance/whatever as you normally would, adding code to eventually delete it if that's what is desired.

Here's how I would do it with the egg though..
- copy over the entire root bsFadeNode of the egg into your NIF
- add it as a child to your current root node
- if needed, rotate/translate to place the egg where you want it to be in your mesh (the rot/trans is below 'controller', 'flags', and 'unknown short 1')
- expand the egg bsFadeNode
- delete the bsInvMarker (this is data telling Skyrim how to show the object when looking at it in Inventory; and may be what's causing problems if left behind)
- delete the niTriShape (this is the visible geometry, no big deal if left behind... simply cosmetic)
- add a bsxFlags to your root node (if there isn't one already), don't forget to add it to the 'num extra data list'
- either test it with it's current state, or change all the bsxFlags to 130 (or even 1, I think that's worked for me before)
User avatar
Dan Scott
 
Posts: 3373
Joined: Sun Nov 11, 2007 3:45 am

Post » Thu Jun 21, 2012 10:57 pm

It was the chaurus egg.
I finally got it to work - pretty much using your steps, but I had to add / change other stuff before it actually worked.
Among other things, I finally figured out I had to rename the inserted bsfadenode to ninode.
Then I changed individual flags, material, and such to match the settings of the invisiblecollision01.nif

Looks pretty trick in-game, if I do say so myself.
Thanks for your help in pointing me in the right direction.
User avatar
Cagla Cali
 
Posts: 3431
Joined: Tue Apr 10, 2007 8:36 am


Return to V - Skyrim