Mass?

Creating new content for Trespasser!

Moderators: TresCom Support Team, TresCom Board Managers, TresCom Developers

Post Reply
User avatar
TheIdiot
T-Rex
T-Rex
Posts: 4345
Joined: Thu Feb 20, 2014 9:13 pm
Location: Canada, eh?

Mass?

Post by TheIdiot »

Does anyone know what specific unit of measurement is used for the "float Mass =" T-Script value? I'm trying to configure my objects with realistic weights but I'm unsure as to exactly what the value represents.

I belive I heard that a Trespasser distance unit is roughly equal to 1 meter, so presumably each unit of Mass equal to a kilogram if the game is universally using Metric measurement? I have a barrel with its Mass set to 2.000000 and it seems to be very light for Anne to carry, which makes me wonder if a Trespasser kilogram is actually 0.1 Mass unit, as objects start to become heavy beyond a Mass of 5.000000 (50kg, or 110lbs).
User avatar
Draconisaurus
T-Rex Killer
T-Rex Killer
Posts: 14046
Joined: Mon Dec 06, 2004 5:21 pm
Antispam: No
Location: Isla Sorna
Contact:

Re: Mass?

Post by Draconisaurus »

Hmmmm. I never quite looked into this, but back in the day, it seems RexHunter99 determined that both Mass and Density are variable in Tres depending on the object's actual scale value. I was confused about details beyond this, I believe the two values do work differently but perhaps to little consequence. But in general if you want to Mass-manage in Tres I am sure the first thing which is to be done is use a 3D app to set all applicable object's scales to zero. Only then may consistent results be had. Oh, and I imagine the source code has something.
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Mass?

Post by machf »

Draconisaurus wrote:the first thing which is to be done is use a 3D app to set all applicable object's scales to zero.
I guess you mean "one" (1.0) rather than "zero" (0.0), as that would actually collapse everything into a single point...

Density is used to calculate mass from the object's volume, Mass is used to set it directly instead.

Looks like Density = Mass/Volume/1000 and Mass = Density*Volume*1000

For water, that would make Density = 1.0 if Mass is in Kg and Volume in m^3 (1 liter = 0.001 m^3 = 1 dm^3 = 1000 cm^3, 1 liter water weighs 1 Kg = 1000 g, water has a density of 1 g/cm^3 = 1 Kg/dm^3 = 1 Kg/l)

Default Density value is 0.1 (lighter than water)
Moveable objects somehow get assigned a Density of 10.0 (heavier)
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
User avatar
TheIdiot
T-Rex
T-Rex
Posts: 4345
Joined: Thu Feb 20, 2014 9:13 pm
Location: Canada, eh?

Re: Mass?

Post by TheIdiot »

machf, would I be better to just set Mass directly and leave Density out of my T-script if I want to make it so that my barrel weighs 12kg by setting Mass = 12.0? Or, if not, is there some kind of combination I could use to directly equate it so that, say, 1.0 unit of Mass equals 1 Kg across all of my Moveable objects?
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Mass?

Post by machf »

Set the mass directly then.

But as Drac mentioned, I think the Scale factor may play a part in it too...
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
User avatar
TheIdiot
T-Rex
T-Rex
Posts: 4345
Joined: Thu Feb 20, 2014 9:13 pm
Location: Canada, eh?

Re: Mass?

Post by TheIdiot »

machf wrote:Set the mass directly then.

But as Drac mentioned, I think the Scale factor may play a part in it too...
Understood. I'll have to take a look and play around with it in my test level first, then.
User avatar
tatu
-=TresCom Website Manager=-
-=TresCom Website Manager=-
Posts: 5088
Joined: Fri Jun 24, 2005 9:40 pm
Antispam: No
Location: Sweden
Contact:

Re: Mass?

Post by tatu »

I believe I remember that the bigger the object is, the heavier it becomes with the Density script, even if it is the same mesh.

I might be wrong, but I think Mass was more commonly used in the earlier builds?
Active project: Trespasser: Isla Sorna
Status:
BE-PH1: Released
PH2-IT: Pre-released
PL-SUM: In production

"...there used to be more benches, but InGen's workers removed them during the evacuation in the name of framerate."
User avatar
TheIdiot
T-Rex
T-Rex
Posts: 4345
Joined: Thu Feb 20, 2014 9:13 pm
Location: Canada, eh?

Re: Mass?

Post by TheIdiot »

tatu wrote:I believe I remember that the bigger the object is, the heavier it becomes with the Density script, even if it is the same mesh.
Hmm, does that apply to Mass, then, as well?
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Mass?

Post by machf »

Don't think so. Given that Mass is calculated by multiplying volume by Density (if you use Density), of course the larger the volume, the higher the Mass will become. If you increase the scale by a factor of 2, the overall volume will be increased by a factor of 8 (height, width and length, 2*2*2=8), and therefore, so will the Mass. (Incidentally, this is why giant ants or spiders like those in crappy horror movies can't exist, at least not in our Earth with its current gravity, because though the volume and mass increase by the cube of the increase in scale, the area of the "soles" of their feet on which all that weight must rest only increases by the square of the increase in scale, so if the ant is scaled up by a factor of 2, its volume and mass are increased by 8, but the area upon which it rests only by 4, so that means each leg must now support proportionately twice as much weight as it did previously, and it may collapse as it had not been 'designed' to do that.)
If instead you just set the Mass value directly, it will stay constant, regardless of scale (at least, I hope it works that way).
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
Post Reply