Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Starman01 on April 21, 2006, 04:05:13 pm

Title: Question regarding object mass, density and collission damage
Post by: Starman01 on April 21, 2006, 04:05:13 pm
Hey there,

could someone please give me some insight into the combination of these three values ? There are currently a few unwanted combinations in our data.

a) Nearly no collision damage
b) A fighter coliding with a capitalship can push it away a few meters

I don't know why I started that once, but I edited the mass that PCS has been calculated. Currently I have

fighters with 5000 to 15000
transports and small cap around 100.000 to 200.000
destroyers  300.000 to 400.000
cruisers 500.000 to 600.000   (in the WC-Universe cruisers are bigger than destroyers)
carriers 700.000 to 900.000

What I want to have it the following :

a) Fighers and small explosions shouldn't be able to push away bigger ships
b) Some collisions should be deadly for the player. Crashing into a capship or an asteroid with more than 50% speed should be killing the player
c) collision for the player with less than 50% speed should at least damage the player really hard.
d) fighter collision between Player and AI should at least deal more damage to the player
e) AI-Fighters should not be destroyed by those collisions with capships(since the AI is so dump and collides all the way)

Can someone give me a few hints here ? Thanks :)

Starman
Title: Re: Question regarding object mass, density and collission damage
Post by: Trivial Psychic on April 21, 2006, 11:15:40 pm
Regarding explosions and impacts pushing cap-ships, that may be less of an issue with mass, and more of an issue with Moment Of Inertia, or MOI for short.  You can't edit MOI in PCS, but you can edit it in MODview.  In the same tab that displays the mass and eyepoint, theres a button called "moment of intertia".  Selecting that will bring up a box with spaces for 9 figures.  Setting all of these to "0" will prevent any odd spinning out.  Some moders however, prefur to import MOI data from existing Freespace ships to retain a certain degree of whack-ability to all craft (fighters especially), and since FS ship models are tried and true, they can be relied on.
Title: Re: Question regarding object mass, density and collission damage
Post by: Starman01 on April 23, 2006, 01:13:50 am
Worth a try, but this pushing can also be related with the object mass and the explosion blast. What about the rest, can anyone help me with that ? :)
Title: Re: Question regarding object mass, density and co
Post by: aldo_14 on April 24, 2006, 06:43:53 am
MOI settings are somewhat of a black and arcane art, sadly.  I don't think anyone has ever figured out where the values come from, beyond IIRC being related to tensors or something.
Title: Re: Question regarding object mass, density and co
Post by: StratComm on April 24, 2006, 12:49:17 pm
A couple of people have come up with the formula for it actually, the trouble is that calculating it requires an algorithm that no one's quite sure how to impliment.  Why it's not just done on the global bounding box beats me, since that's where I'd think it would be easiest and least likely to royally break anything, but then I'm not writing the max exporter or PCS.  And it's sure not something you want to figure by hand.
Title: Re: Question regarding object mass, density and co
Post by: aldo_14 on April 24, 2006, 02:25:52 pm
A couple of people have come up with the formula for it actually, the trouble is that calculating it requires an algorithm that no one's quite sure how to impliment.  Why it's not just done on the global bounding box beats me, since that's where I'd think it would be easiest and least likely to royally break anything, but then I'm not writing the max exporter or PCS.  And it's sure not something you want to figure by hand.

Define algorithm - surely if there's some sums on paper we can at the very least work up a crude app to calculate it 'manually' outside of conversion.
Title: Re: Question regarding object mass, density and co
Post by: Wanderer on April 24, 2006, 02:37:37 pm
Something like the stuff found from this thread (http://www.hard-light.net/forums/index.php/topic,32201)? Seems like Bobboau knows (or atleast knew) something about these...
Title: Re: Question regarding object mass, density and co
Post by: aldo_14 on April 24, 2006, 02:44:10 pm
Something like the stuff found from this thread (http://www.hard-light.net/forums/index.php/topic,32201)? Seems like Bobboau knows (or atleast knew) something about these...

Hmm.

Hmmmmmmm.

Hmm.

Mmmm....

Hmm.






Bugger.  That.
Title: Re: Question regarding object mass, density and co
Post by: karajorma on April 24, 2006, 03:21:09 pm
Well CP is back now. Let him have a go at it :)
Title: Re: Question regarding object mass, density and co
Post by: aldo_14 on April 25, 2006, 03:49:41 am
Well CP is back now. Let him have a go at it :)

He'd probably find a way to make it more complicated.





:D
Title: Re: Question regarding object mass, density and collission damage
Post by: BES on April 25, 2006, 10:57:57 am
WOW that was some stuff that just stunned me, I got a D in math,but it seems to me that the fighters mass is set too high if they collide with a larger ship it will move them,even changing a rockeye missiles mass to 15000 will move a very large ship a few feet, so I dont think its that complicated.

on the fighters should blow up on impact with a bigger ship, I thought that had to do with the fighters hull strength,speed,mass..mybe there is a way to alter the ships repair speed so it will lose subsystems when colliding with an astroid etc.

fighter vs fighter collision damage depends on fighter speed,mass,hull strength, etc

another AI could be made that could tell enemy ships to not collide all the way as you put it

(I like python scripts, the math isnt as complicated when it comes to collisions etc, mybe some sort of python script plug-in could be made to fix the collision thing)<---not an expert in that area but I think it may be easier..
Title: Re: Question regarding object mass, density and collission damage
Post by: Starman01 on April 25, 2006, 11:42:32 am
I have read somewhere that $density is related to the collission damage, but I forget where and can't find it anywhere
Title: Re: Question regarding object mass, density and co
Post by: karajorma on April 25, 2006, 12:22:10 pm
(I like python scripts, the math isnt as complicated when it comes to collisions etc, mybe some sort of python script plug-in could be made to fix the collision thing)<---not an expert in that area but I think it may be easier..

You should learn Lua then and script it for us :)
Title: Re: Question regarding object mass, density and co
Post by: StratComm on April 25, 2006, 02:34:21 pm
It would probably be possible (and the math much less nasty) to calculate MOI off of the bounding boxes rather than the individual polygons.  Maybe not the master bounding box, but whatever the proper term is for those green things that show up in PCS when you turn on "bounding box debug".  As long as the ship is of uniform density, it seems like those should give a rough approximation of shape.