Floating logs from blender and or Nifskope

Post » Sat Feb 19, 2011 5:42 am

I am working on making planks of wood that bob and float in the water. At first I just made a misc item using a blender modified mesh with normal collision on it. However this only made it so you could pick it up (it did not float in water).

The reason I tried this first is because I could swear I saw objects floating in the water in some parts of the game. Today I realized that I DID SEE THIS, they are arrows! So here is my idea.

Make a set of non playable arrows that LOOK like logs or planks of wood. With an on-activate script that will not allow the player to pick up the item this should work right?

Has anyone else seen any other object other than dead bodies float in water? Why only arrows? Is it possible to take the "floating in water" data from an arrow and put it on a misc item rather than do this in my Hack Hacky McHackish way with pseudo arrows/logs?
User avatar
Kate Norris
 
Posts: 3373
Joined: Mon Nov 27, 2006 6:12 pm

Post » Fri Feb 18, 2011 9:04 pm

I don't think you have to use something special. Static items will float. See for example: http://i164.photobucket.com/albums/u28/VinceB_photo/RowBoatFinish.png. I made the rowboat pictured several years ago and can't find a .nif of it with the final collision right now. I think the waterline matches the center of gravity (Center value in the bhkRigidBody/T). Like the vannila one, I had to add a false floor just above the waterline. Both use regular static collision.
User avatar
Gemma Flanagan
 
Posts: 3432
Joined: Sun Aug 13, 2006 6:34 pm

Post » Fri Feb 18, 2011 6:31 pm

er...but.. that is not floating, it is just hanging in space at the waterline right? I mean if you hit it or push that it will not sail (swim? wade? what word would you use for this...) thru the water ...no?

Arrows like bodies will bob up and down in the water.

I don't think you have to use something special. Static items will float. See for example: http://i164.photobucket.com/albums/u28/VinceB_photo/RowBoatFinish.png. I made the rowboat pictured several years ago and can't find a .nif of it with the final collision right now. I think the waterline matches the center of gravity (Center value in the bhkRigidBody/T). Like the vannila one, I had to add a false floor just above the waterline. Both use regular static collision.

User avatar
Marcus Jordan
 
Posts: 3474
Joined: Fri Jun 29, 2007 1:16 am

Post » Sat Feb 19, 2011 3:47 am

er...but.. that is not floating, it is just hanging in space at the waterline right? I mean if you hit it or push that it will not sail (swim? wade? what word would you use for this...) thru the water ...no?

Arrows like bodies will bob up and down in the water.

I don't know. I don't remember if the boats bobbed up and down or not. This seems like a good case for experimentation.
User avatar
Leilene Nessel
 
Posts: 3428
Joined: Sun Apr 15, 2007 2:11 am

Post » Sat Feb 19, 2011 5:36 am

Ok, my idea worked....but with issues that may kill the immersion of my "floating log" project.

It floats and bobs in the water perfectly, push it and it "swims" thru the surface of the water.
All as I planed...except for one thing.

It spins on its y axis like a whirling dervish, its just fast enough to break the illusion. This actually happens with normal arrows so it is not something I can fix I think.

:cry:
User avatar
Taylor Thompson
 
Posts: 3350
Joined: Fri Nov 16, 2007 5:19 am

Post » Sat Feb 19, 2011 5:41 am

I've been doing some experiements and, so far, have not found anything that floats on the water's surface. I tried walking into a river, about ankle deep, and dropping an arrow (using Shift-Left Click). It was a vanilla Daedric arrow and it sank to the bottom! I haven't tried a dead body yet. :D

EDIT: I was posting as you were. What exactly did you do to get it to float? As noted above, when I dropped an arrow it sank.
User avatar
Honey Suckle
 
Posts: 3425
Joined: Wed Sep 27, 2006 4:22 pm

Post » Sat Feb 19, 2011 1:27 am

WOOD arrow!

same thing happen to me when I first made the plank because the havok was set to metal. I changed it to wood. and Vanilla "wood" (steel,silver the ones with wood shafts ) arrows float.

I've been doing some experiements and, so far, have not found anything that floats on the water's surface. I tried walking into a river, about ankle deep, and dropping an arrow (using Shift-Left Click). It was a vanilla Daedric arrow and it sank to the bottom! I haven't tried a dead body yet. :D

EDIT: I was posting as you were. What exactly did you do to get it to float? As noted above, when I dropped an arrow it sank.

User avatar
Michael Korkia
 
Posts: 3498
Joined: Mon Jul 23, 2007 7:58 pm

Post » Fri Feb 18, 2011 10:36 pm

I wonder if I can force the thing to not spin with set angle x script, but this is getting ridiculously complicated just so I can have a few planks of wood floating freely in the water in my mod.


wait a minute.....

.... I have a student that just drop by now for help on a project, so I got to go for now.

Thanks for helping.

...If you figure this out while I am "gone" please post it OK?

edit:
OK she had most of the project planned out already to my surprise. High school physics. I am not a high school teacher but I am knowledgeable in applied physics (like most people in special effects). I am happy that she had it mostly done herself because I want her to start doing most of her work now on her own. She just needed some help on how to gather a few sections of the needed information.

Anyway I am back to modding now. Trying to finish my Combat Magic Mod before next weekend.
User avatar
Maria Leon
 
Posts: 3413
Joined: Tue Aug 14, 2007 12:39 am

Post » Fri Feb 18, 2011 6:33 pm

Well if you want to prevent something from spinning around a specific axis, you can alter its inertia matrix in the mesh (NIF). It's the moment of inertia...
User avatar
Wanda Maximoff
 
Posts: 3493
Joined: Mon Jun 12, 2006 7:05 am

Post » Fri Feb 18, 2011 7:02 pm

I made a wooden plank and used its .nif to define a new arrow. I used a BSX Flags value of 11 and a bhkRigidBody from a vanilla arrow. When I dropped it in the water I got the same action as spookyfx; it floated, but rotated wildy. If I dropped it on land, it bounced very high, as if it had a coefficient of restitution much greater than 1.0! I experienced a similar problem with some weapons I exported from Blender. They would behave normally most of the time, but bounce very high if dropped. I solved that problem by substituting a bhkRigidBody from a similar vanilla weapon. I believe the floating plank answer (if any) lies in the block details of the bhkRigidBody. 'Last time I checked, there were 27 unknowns, so it may not be all that easy.
User avatar
Harinder Ghag
 
Posts: 3405
Joined: Wed Jan 17, 2007 11:26 am

Post » Fri Feb 18, 2011 9:26 pm

Since spooky said she was knowledgeable in applied physics, I figured she would know what the moment of inertia is. I'm a mechanical engineer. :) You can alter the inertia matrix to customize the response of objects in the game. For example, if you want something to settle nicely and not bounce around, you set a mass for it, lower the centre of gravity (phyically along the z axis) and set the x and y axes of inertia to about 10 times the mass. If you want to prevent something from spinning around a particular axis, you set the corresponding axis of inertia to about 100 times the mass. So if you've got something spinning like a top around the z axis, set the z axis of inertia (m33) to 1000 for something that weighs about 10 units. These are rough guidelines - I will tweak these numbers until I get the behaviour I'm looking for. I mess about with these values a lot for IFR (see my sig) because I want the player to be able to carry large objects, but also have them easy to shift into position once they are dropped on the ground. Carry something like a sofa and you'll really see the effect of the inertia matrix!
User avatar
Christine
 
Posts: 3442
Joined: Thu Dec 14, 2006 12:52 am

Post » Sat Feb 19, 2011 7:29 am

This did help! But still needs more tweaking, but thanks for the heads up on this.

I have put too many hours in this small floating plank project, I need to get the actual quest done. Then I will revisit this later this week.

BTW, I think you somehow misinterpreted my use of the word "she"...I would make a very ugly girl, so it is a good thing I am not! :biggrin:

Well if you want to prevent something from spinning around a specific axis, you can alter its inertia matrix in the mesh (NIF). It's the moment of inertia...

User avatar
Krystal Wilson
 
Posts: 3450
Joined: Wed Jan 17, 2007 9:40 am

Post » Sat Feb 19, 2011 5:54 am

This did help! But still needs more tweaking, but thanks for the heads up on this.

I have put too many hours in this small floating plank project, I need to get the actual quest done. Then I will revisit this later this week.

BTW, I think you somehow misinterpreted my use of the word "she"...I would make a very ugly girl, so it is a good thing I am not! :biggrin:


I was trying to guess by your alias actually. :) I have no idea why I thought spooky was female... But turn about is fair play: I get called a "he" all the time and while I wouldn't make a pretty man, it's a very good thing I'm not. :lol:
User avatar
Charlie Ramsden
 
Posts: 3434
Joined: Fri Jun 15, 2007 7:53 pm

Post » Fri Feb 18, 2011 10:27 pm

I could not help myself, I went back to the floating plank project. It seems to be working, I did one more tweak in NifSkope based on your recommendations and it is good enough for now. I am sure if I follow your exact recommendations it will be perfect. But that will need to come latter.
Thanks again.


I was trying to guess by your alias actually. :) I have no idea why I thought spooky was female...


Spooky F/X (spookyfx.com) is a small special effects shop I run.


But turn about is fair play: I get called a "he" all the time and while I wouldn't make a pretty man, it's a very good thing I'm not. :lol:



:facepalm: oops...

I hope I was not being disrespectful with that "women need to be pretty" comment.. :sad:

I will not attempt to backpedal with lame ramblings about how most of my friends are women, all of them college educated, my best friend is a marine biologist and my last girlfriend (we are still friends and see each other every day) is a chemist in the medical field (far smarter than I am). I guess the fact is that as an immature peter-pan male type personality, I can be shallow on my bad days er...ok most days.

However I do apologize for my insensitive joke if it offended you even in the slightest way.

I am just going to shut up now...
User avatar
Anthony Santillan
 
Posts: 3461
Joined: Sun Jul 01, 2007 6:42 am

Post » Fri Feb 18, 2011 11:09 pm

Spooky F/X (spookyfx.com) is a small special effects shop I run.





:facepalm: oops...

I hope I was not being disrespectful with that "women need to be pretty" comment.. :sad:

I will not attempt to backpedal with lame ramblings about how most of my friends are women, all of them college educated, my best friend is a Marine biologist and my last girlfriend (we are still friends and see each other every day) is a chemist in the medical field (far smarter than I am). The fact is that as an immature peter-pan male type personality, I can be shallow on my bad days er...ok most days.

However I do apologize for my insensitive joke if it offended you even in the slightest way.

I am just going to shut up now...


Oh, no, I wasn't offended! :lol: No worries - seriously. I didn't mean anything by my pretty man comment other than simply countering your ugly woman comment. I didn't even think about it. :rofl: I've been married 23 years - I don't worry about crap like that anymore!

Edit: One thing I forgot to mention about the inertia matrix: somewhat counterintuitively, if you zero out the inertia matrix, your object ain't budging! So that's a cut-off in the modelling of the game engine physics: an object with a zero moment of inertia won't just keep moving - it doesn't move at all. You'll see a lot of static meshes have values for the inertia matrix, but they will set the mass really high to keep the object from moving. Well that's not really necessary - you can leave the mass at whatever value you like and just zero out the matrix. Now you need to set the rest of the attributes of the mesh properly so that game world objects with interact properly with yours - as you discovered with the material property, for example, but you can take that shortcut to make something stationary. I don't think you'll get the proper behaviour from your log in doing that though - I don't think it's a completely static object.
User avatar
Matt Terry
 
Posts: 3453
Joined: Sun May 13, 2007 10:58 am


Return to IV - Oblivion