[REQ] Step by step instructions on changing bounding box in

Post » Tue Apr 20, 2010 4:47 am

Hey there,

I was wondering if anyone would be able to give me a break down on how to modify/change/alter the bounding box of an item in nifskope.

I have a staff that i made but it floats in them iddle of the air when placedo n the ground O_o
User avatar
Astargoth Rockin' Design
 
Posts: 3450
Joined: Mon Apr 02, 2007 2:51 pm

Post » Tue Apr 20, 2010 4:25 am

What is a bounding box? :unsure: And what's a collision node? I have the sinking feeling that I might need to know what these are in order for some items I made to work properly. >.<
User avatar
Floor Punch
 
Posts: 3568
Joined: Tue May 29, 2007 7:18 am

Post » Tue Apr 20, 2010 12:15 am

Weapons don't use bounding boxes, or even have collision for that matter, just move the weapon mesh around in NifSkope.
User avatar
Tinkerbells
 
Posts: 3432
Joined: Sat Jun 24, 2006 10:22 pm

Post » Tue Apr 20, 2010 6:20 am

My understanding is that a bounding box is the space around an object that defines the edge of the object so that collision can be detected. That's what's used to keep you from walking through a table, for example. I think the rectangular box lines you see around an object when you click on it in TES CS is the bounding box. I'm guessing the game engine makes some determination about whether or not it pays attention to bounding boxes. You can't walk through a table, but you can walk through miscellaneous objects you leave on the floor. (Whereas, in Oblivion, if you walk near a bottle on the floor you actually kick it.)

Weapons don't use bounding boxes, or even have collision for that matter, just move the weapon mesh around in NifSkope.


If weapons don't have collision, how does the game engine figure out when you've hit an enemy? Does it just notice distance from the enemy and direction of a swing and then calculate the odds of a hit?
User avatar
Britney Lopez
 
Posts: 3469
Joined: Fri Feb 09, 2007 5:22 pm

Post » Mon Apr 19, 2010 7:04 pm

First, NifSkope isn't the right program to alter bounding boxes. Sure it can be done, but it is so much more work than in a real 3D application. Bounding boxes on weapons are not a must. Collision will be detected automaticall by the mesh itself. It just makes sense to have an additional bounding box, in case the geometry of the weapon makes collision detection in fight kinda difficult (very small weapon, unusual shape...).


TheDaywalker :rock:
User avatar
Dark Mogul
 
Posts: 3438
Joined: Tue Feb 20, 2007 11:51 am

Post » Mon Apr 19, 2010 9:11 pm

Does it just notice distance from the enemy and direction of a swing and then calculate the odds of a hit?


Yeah, it also detects when you've hit an enemy using a note key in the animations.
That's also why you have to enter how far the weapon can reach in the weapons properties in the CS (so you could wierdly make a dagger reach as far as a spear). The weapon doesn't actually hit the opponent.

In the latest versions on NifSkope editing bounding boxes is easy, IIRC you just right click on the bounding box node, and select Edit->Bounds.
User avatar
Chica Cheve
 
Posts: 3411
Joined: Sun Aug 27, 2006 10:42 pm

Post » Tue Apr 20, 2010 1:44 am

Yeah, it also detects when you've hit an enemy using a note key in the animations.
That's also why you have to enter how far the weapon can reach in the weapons properties in the CS (so you could wierdly make a dagger reach as far as a spear). The weapon doesn't actually hit the opponent.

In the latest versions on NifSkope editing bounding boxes is easy, IIRC you just right click on the bounding box node, and select Edit->Bounds.


Though when I downloaded and used the latest version of NIFScope recently, it could not properly open any of my older nifs made by Morrowind modders. Just showed a sort of skeletal framework. I have an older version that was pre-Oblivion, and that works fine.
I've had trouble getting NIFScope to work with my Morrowind nifs ever since a version was released that was also for Oblivion nifs. I think the program keeps trying to see the Morrowind nifs as Oblivion nifs so will not load them right.
User avatar
Vahpie
 
Posts: 3447
Joined: Sat Aug 26, 2006 5:07 pm

Post » Tue Apr 20, 2010 6:08 am

Hmmm... the skeletal framework is the nodes. You can change the default .nif version to Morrowind's, if you think that'll help, although it probably wont.
I'm not sure what's going on tbh, I have no problems with the latest versions, but you could try pming Alphax about it, he's a developer for NifSkope.
User avatar
Yama Pi
 
Posts: 3384
Joined: Wed Apr 18, 2007 3:51 am

Post » Mon Apr 19, 2010 11:25 pm

Weapons don't use bounding boxes, or even have collision for that matter, just move the weapon mesh around in NifSkope.

Interesting. Most jewelry meshes don't have a collision node, but the artifact rings (Phynaster, Khajiit, etc) do have a collision node.

How does the game know that the handle of a weapon goes in the hand? As opposed to: upside down, slightly to the left/right/up/down, sideways? I haven't tested any of my new weapons in-game yet, so I don't know if they will be held properly. All the throwing weapons appear correctly, though...

Another question: some of the belt meshes -> the lower part of the belt will clip with the ground/surface. How could I go about changing that? Would simply editing the coordinates (move the mesh "up") in Nifskope do the trick? :wacko:
User avatar
JLG
 
Posts: 3364
Joined: Fri Oct 19, 2007 7:42 pm

Post » Mon Apr 19, 2010 7:40 pm

Hey there,

I was wondering if anyone would be able to give me a break down on how to modify/change/alter the bounding box of an item in nifskope.

I have a staff that i made but it floats in them middle of the air when placed on the ground O_o


Did this question actually get addressed? I altered the scale of some creatures in NifSkope and now I'm seeing them run in mid-air. If there is a way to correct this, I'd certainly appreciate that step-by-step. Again, I don't know about Migetalien, but since I use Nifskope, I'd really prefer to hear how it's done in Nifskope, unless it is utterly impossible.
User avatar
meg knight
 
Posts: 3463
Joined: Wed Nov 29, 2006 4:20 am

Post » Tue Apr 20, 2010 12:37 am

A "bounding box" is nothing than a simple wireframe type mesh, which is named "bounding box". It can be easily altered, meaning scaled or relocated in any 3D application. In nifskope it can be relocated and proportionally scaled by the transform options. If it has to be scaled in a non-uniform way, the single vertices have to be moved by changing their x,y,z coordinates manually, which is really not the work you want to do. :P

Anyway, here is all you need to know, if you still want to do it within nifskope:

http://niftools.sourceforge.net/wiki/Morrowind/NifSkope_Alchemy


PS: In case of the weapon I'd suggest to just get rid of the bounding box completely or alter it's position as long as the weapon lies on the ground. It should make no big difference. In case of the creature bounding box should be scaled proportional to the scale of the creature, so that both match again.

I can't speak for the newest nifskope versions though, cause I can't run them on my system, because of some unknown issue!!!


EDIT: I'd rather encourage you people to learn the basics of Blender than doing it the complicated way in nifskope. I've seen some guys spending hours and hours on changing meshes in nifskope, which could have been done in seconds in Blender. Nifskope is a great program, but it is not thought for doing 3D modeling!!! ;)


TheDaywalker :rock:
User avatar
nath
 
Posts: 3463
Joined: Mon Jan 22, 2007 5:34 am

Post » Mon Apr 19, 2010 6:58 pm

Thank you, TDW. That was very helpful.
User avatar
victoria johnstone
 
Posts: 3424
Joined: Sat Oct 14, 2006 9:56 am

Post » Tue Apr 20, 2010 1:10 am

Oh yes, before I forget: The position of a creature also is stored in its animation, so just scaling in up and down will most likely result in a failure. We had that problem some time ago with MA's "Vissed"- creature. Only way to correct this problem would be to adjust the animation itself, which is rather advanced kinda work.


TheDaywalker :rock:
User avatar
Taylah Illies
 
Posts: 3369
Joined: Fri Feb 09, 2007 7:13 am

Post » Mon Apr 19, 2010 11:54 pm

The weapon doesn't actually hit the opponent.


I think that actually it does. But what is “opponent” for MW game engine? That is definitely not body/clothes/armor meshes. That can be, probably, “Bounding Box” structure/node in x.nif skeleton files from PC/NPC animation and creatures files. Another candidates could be “Tri QuadPatch01” node.
For other objects (but not for some lights, effects, miscellaneous, etc.) game engine generates collision structures automatically when they are not specified in corresponding nifs (“Bounding Box” node, RootCollisionNode, NiStringExtraData “NCO”). BTW, it does that not always correctly and it is better to add these structures for some game objects “manually”, specifically for static, terrain, inner cells structures. However, unlike in Oblivion there is generally no need of bounding boxes/collision structures in weapons’ nifs - MW does not have Havok, or other physics.

ALL (including recent) NifScope versions are working perfectly with MW nifs. I guess you have to configure it accordingly:
http://niftools.sourceforge.net/wiki/NifSkope/Setting_the_Texture_Search_Path

complicated way in nifskope


Depends on a user: Blender hotkeys UI is more complicated for me than Chinese ABC. Moreover many things are very easy and fast to achieve in NifScope than to use 3D modeller.

Creatures: you have to edit skeleton x.nif (main.nif is used only in TESCS preview). But it is safer to change scale via scripts.

:)
User avatar
Jade Barnes-Mackey
 
Posts: 3418
Joined: Thu Jul 13, 2006 7:29 am

Post » Mon Apr 19, 2010 8:55 pm

all morrowind weapons have at least one bone in them. just to tell game where to put them. those are the little solid white boxes you see in nifskope. i would look up the wkik page for more. and the blender wiki page has more info on morrowind meshes and how they work.
User avatar
Anthony Diaz
 
Posts: 3474
Joined: Thu Aug 09, 2007 11:24 pm

Post » Tue Apr 20, 2010 6:16 am

You can call that “bone”:
http://tech-artists.org/wiki/Bone
http://tech-artists.org/wiki/Skeletal_animation

but more formally that is a weapon scene/nif pivot point that is attached by the MW game engine to the “Weapon Bone” bone node in the animation files when a weapon is equipped. This works like prop in 3D modelers.

:)
User avatar
Vivien
 
Posts: 3530
Joined: Fri Apr 13, 2007 2:47 pm

Post » Tue Apr 20, 2010 12:21 am

but more formally that is a weapon scene/nif pivot point that is attached by the MW game engine to the “Weapon Bone” bone node in the animation files when a weapon is equipped. This works like prop in 3D modelers.

:)

:eek:

Wow! Okay, so how would I go about removing and/or adding one in Nifskope? Is it as simple as attaching a type of Node? Because I've added parent nodes to stuff before, so I'm sort of familiar with how to add properties. Sort of.
User avatar
Blessed DIVA
 
Posts: 3408
Joined: Thu Jul 13, 2006 12:09 am

Post » Mon Apr 19, 2010 5:15 pm

As far as I understand NifScope developers, they do not recommend to transform nif “Scene Root” node (but I was doing that without problems). If not to use 3D applications (usually I modeling with imported original prototype and deleting these “old” meshes before export) I would find a suitable original nif (e.g. sward) and copy/paste all NiTriShape nodes (or branches) form the nif interest and adjust their position/scale using original handle of this sward as a reference. Than delete all unnecessary old meshes (NiTriShapes). Save file.

:)
User avatar
Angelina Mayo
 
Posts: 3427
Joined: Wed Jan 24, 2007 4:58 am

Post » Tue Apr 20, 2010 7:19 am

Though when I downloaded and used the latest version of NIFScope recently, it could not properly open any of my older nifs made by Morrowind modders. Just showed a sort of skeletal framework. I have an older version that was pre-Oblivion, and that works fine.
I've had trouble getting NIFScope to work with my Morrowind nifs ever since a version was released that was also for Oblivion nifs. I think the program keeps trying to see the Morrowind nifs as Oblivion nifs so will not load them right.


That would be a long time ago. I'm currently the main developer and I don't have Oblivion, so I would have noticed :)

Hmmm... the skeletal framework is the nodes.


Agreed. Can you post a screenshot of what it looks like? :unsure:


As far as I understand NifScope developers,


We don't understand ourselves either :P

they do not recommend to transform nif “Scene Root” node (but I was doing that without problems). If not to use 3D applications (usually I modeling with imported original prototype and deleting these “old” meshes before export) I would find a suitable original nif (e.g. sward) and copy/paste all NiTriShape nodes (or branches) form the nif interest and adjust their position/scale using original handle of this sward as a reference. Than delete all unnecessary old meshes (NiTriShapes). Save file.


Any transforms on the "Scene Root" node (node 0) are ignored by the NetImmerse engine - that is why we say "don't do that" :)

When modelling I often import another NIF to use as a scale comparison, get the handle of a weapon correct, etc.
User avatar
Vahpie
 
Posts: 3447
Joined: Sat Aug 26, 2006 5:07 pm

Post » Tue Apr 20, 2010 6:39 am

I think that actually it does.
:)


Ha, discussion time.
If the weapon hits the opponent using the mesh's collision, is the reach range in the weapon's properties in the CS a multiplier or addition?
I don't really think so, 1.8 seems too high for a spear, I think it's determined merely by range, no weapon collision, but it's easy enough to test.

About opponent detection, I don't think it's the bounding box, creatures and NPCs have them but they seem to be used for detecting where they are in the game world correctly, while they play walking, running and other animations.
I had a creature I made a few days ago, which had an ill parented bounding box, which wouldn't move with the creature, and so the creature couldn't use it's walking and running animations correctly.
However, in order to attack the creature, I think I still had to attack the mesh (I know I had to point at the mesh in order to loot it). :shrug:
If I can find the .nif files I'll send it you later, if you're interested, not sure about NPCs though.
Ha, I bet Hrnchamd'll post something now and makes us both look stupid. :hehe:

@Alaisiagae: usually I just copy and paste my mesh into another weapon.nif, then copy that weapon's placement and delete it.
User avatar
Tikarma Vodicka-McPherson
 
Posts: 3426
Joined: Fri Feb 02, 2007 9:15 am

Post » Mon Apr 19, 2010 8:58 pm

Ha, discussion time.


Knowledge is great but can we use that (MW “hit detection” system) somehow? I don’t know.

Honestly my assumptions (“I think that actually it does”) were based on my experiments with “Bounding Box” modifications and not-combat animation. So did NOT perform in-combat/loot tests (stupid!? Oh, that’s not new!). When I placed an NPC “Bounding Box” above (Z +300) other NPCs/PC start to look up (head rotation) and he looks on them down (in the game everybody were on the same level). Z-300 causes an opposite effect. Moreover, PC and other NPCs can go though this “Z+/-300” NPC. His animations and collision detection of static/terrain structures was “normal”. When I scaled down “Bounding Box” (X,Y are OK; Z scaling causes CTD) it was possible to come closer to this NPC. The goal of these experiments was to find the way to trick game collision detection system for animations like sitting on a chair or NPC “close contact” animations.

You have convinced me: you are right (“The weapon DOESN’T actually hit the opponent.”), I was wrong. My “Bonding Box” observations have nothing to do with combat/hit detection system. MW game engine does not have combat physics and there are no formal reasons to detect hits (there is NO hit detection system in MW). The cheapest from the programming point of view way is: when in combat and maybe within a certain distance from a target pivot point to calculate a certain probability/values (based on PC skills, weapon properties, some random factor(s), etc.) of a hit result after an execution of every combat animation hit loop (this loop execution can be controlled by a gamer). This is especially valid for ranged attacks: arrows, bolts, spells.
“I still had to attack the mesh.” I think that we are attacking/looting not a mesh, geometry that is occupying certain game 3D space, but a nif scene root (pivot point or whatever) that is actually represented by a point and some (may be fixed in the engine) volume/plane around it. It would be “expensive” to detect real geometry/shape. Have you tried to enable collision and collision boxes in you ill creature test (console TCL and TCB)? I have noticed that MW engine is able to correct some nif mistakes: e.g. with some crazy “Bounding Box” parameters that were set in NifScope in the game I was able to see a correct “default” (this box has different parameters than the one in original nifs) “Bounding/Collision Box” structure.

:)
User avatar
brenden casey
 
Posts: 3400
Joined: Mon Sep 17, 2007 9:58 pm

Post » Tue Apr 20, 2010 9:01 am

:blink:

:huh:

:bonk:

:ahhh:

:dead:

That pretty mich sums me up. All of this is going way over my head lol. Though its making for intresting read :D
User avatar
Kayla Keizer
 
Posts: 3357
Joined: Tue Dec 12, 2006 4:31 pm

Post » Mon Apr 19, 2010 10:29 pm

:blink:

:huh:

:bonk:

:ahhh:

:dead:

That pretty mich sums me up. All of this is going way over my head lol. Though its making for intresting read :D


Axel was pretty much stating that the MW engine doesn't actually check to see if your weapon struck your opponent. The animation where you 'strike' is just eye candy.

Instead, it calculates the probability that you hit your opponent based on your skill level with the weapon, how close you are to your opponent, and the angle with which you are facing him. I would hope that the engine at least takes the length of the weapon into account, though. Otherwise, you could create a dagger with the same reach as a long sword!
User avatar
Rob
 
Posts: 3448
Joined: Fri Jul 13, 2007 12:26 am

Post » Mon Apr 19, 2010 8:07 pm

Midgetalien, I have to apologize for being so unclear and actually off-topic. :blush:
Morovir, thank you for translation. :hugs:

“Bounding Box” and combat game mechanics have nothing to do with you weapon modeling problem. Please, check posted recommendations for repositioning/rescaling your meshes in NifScope. That’s doable.

The animation where you 'strike' is just eye candy.



I think so. Dirnae convinced me. Moreover, this interpretation is consistent with my observations from other games/engines.

how close you are to your opponent, and the angle with which you are facing him. I would hope that the engine at least takes the length of the weapon into account



“How close”, distance between PC and attacker. Probably this is constantly checked (monitored) by the game engine. I cannot recall that I have seen in MW crazy situations that are happening so often in MMORPGS including those based on Gamebryo engine: a melee monster can make damage to an avatar that has just run far away from the attacker.
I am not sure that “angle” is also monitored. This could be too complicated and resources consuming.
Weapons’ “length” can be simply determined by one value in TESCS weapon type. I do not think that it is somehow tracked or has any relation to nif geometry. So, a long sward (mesh, nif) can be set as a dagger in the TESCS. In-game combat animations will be for a dagger but equipped will be a sward (mesh).

:)
User avatar
Shelby Huffman
 
Posts: 3454
Joined: Wed Aug 08, 2007 11:06 am


Return to III - Morrowind