Looking for a way to do a visual momentum test

Discussions about UT99
Post Reply
Meindratheal
Average
Posts: 61
Joined: Thu Jun 03, 2010 3:53 pm

Looking for a way to do a visual momentum test

Post by Meindratheal »

Basically, I'm looking for a way to see the momentum imparted by weapons. I have tried with boulders in a practically empty cube, but the damn boulders won't move, and half the time they don't even fall to the ground from where they were placed.

I got the idea from Feralidragon's YouTube test of his NaliWeapons (speifically the superweapons), but I' looking to test some weapons out myself. Any ideas of how to get boulders (or similar) to be affected properly?

I don't want to find out by looking at the code, that would just be boring and I wouldn't know where to look anyway :P
User avatar
Saya-chan
Adept
Posts: 446
Joined: Mon Jun 02, 2008 10:46 am
Personal rank: Former UT99 modder
Location: Vigo, Galicia
Contact:

Re: Looking for a way to do a visual momentum test

Post by Saya-chan »

I sometimes use a map filled with book actors aligned to the grid. Even if the meshes are simple I recommend to replace them with simple sprites to improve performance.
Image
  ~♥~ Bless the Cute Emperor ~♥~
gopostal

Re: Looking for a way to do a visual momentum test

Post by gopostal »

The best way is make a simple mod that logs the momentum imparted when TakeDamage is called. Then just load it up on a simple DM game, spawn all the weapons you want to check and then something static to shoot at like a vase or barrel. This will return all the values you are trying to collect.

I understand your wanting to do it another way but many factors will affect your values, some being called from the native code that you cannot see. For instance I wouldn't be surprised if vector directly changed this value, as well as gravity being a modifier too. Doing this in a controlled map with no Z-axis involved will give you a nice baseline to work from.

If you do go through the trouble of this do us all a favor and report your findings. This might be useful information to keep handy. I'll help if you need it.
User avatar
Feralidragon
Godlike
Posts: 5498
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Looking for a way to do a visual momentum test

Post by Feralidragon »

Here:
MomentumBoulder.zip
(3.21 KiB) Downloaded 85 times
Compiled + source code to see how it's done.

The MomentumBoulder will act like you want (it will respond to the momentum applied to it), and when tweaking their DrawScale, their mass will be modified accordingly (so bigger boulders get more difficult to "throw" away than little ones), but you can also modify their base mass (on the Mass property), and it's located under the normal Boulder.

I also think gopostal's idea regarding logs is a good one, so I implemented the possibility to see logs regarding those builders:
- Just go to MomentumBoulder > GenerateLogs and set it to True. Each MomentumBoulder with GenerateLogs=True will generate its own logs.

Their logs should looks like this:

Code: Select all

MomentumBoulder_Log: ___________________________________________________________
MomentumBoulder_Log: Boulder ID: ctf-facemomentum.MomentumBoulder4
MomentumBoulder_Log: Mass = 15.000000
MomentumBoulder_Log: Damage Taken = 45
MomentumBoulder_Log: Damage Type: shot
MomentumBoulder_Log: Momentum Direction = -0.555474,-0.820383,-0.135720
MomentumBoulder_Log: Momentum Force = 30000.000000
MomentumBoulder_Log: Weapon Used: Sniper Rifle
MomentumBoulder_Log: -----------------------------------------------------------
MomentumBoulder_Log: ___________________________________________________________
MomentumBoulder_Log: Boulder ID: ctf-facemomentum.MomentumBoulder6
MomentumBoulder_Log: Mass = 7.500000
MomentumBoulder_Log: Damage Taken = 45
MomentumBoulder_Log: Damage Type: shot
MomentumBoulder_Log: Momentum Direction = 0.241998,-0.959860,-0.141797
MomentumBoulder_Log: Momentum Force = 30000.000000
MomentumBoulder_Log: Weapon Used: Sniper Rifle
MomentumBoulder_Log: -----------------------------------------------------------
MomentumBoulder_Log: ___________________________________________________________
MomentumBoulder_Log: Boulder ID: ctf-facemomentum.MomentumBoulder5
MomentumBoulder_Log: Mass = 7.500000
MomentumBoulder_Log: Damage Taken = 29
MomentumBoulder_Log: Damage Type: RocketExplosion
MomentumBoulder_Log: Momentum Direction = 0.733471,0.671628,0.104576
MomentumBoulder_Log: Momentum Force = 31663.667969
MomentumBoulder_Log: Weapon Used: MultiMissile Launcher
MomentumBoulder_Log: -----------------------------------------------------------
MomentumBoulder_Log: ___________________________________________________________
MomentumBoulder_Log: Boulder ID: ctf-facemomentum.MomentumBoulder0
MomentumBoulder_Log: Mass = 15.000000
MomentumBoulder_Log: Damage Taken = 45
MomentumBoulder_Log: Damage Type: RocketExplosion
MomentumBoulder_Log: Momentum Direction = 0.974493,0.175461,0.139915
MomentumBoulder_Log: Momentum Force = 48980.988281
MomentumBoulder_Log: Weapon Used: MultiMissile Launcher
MomentumBoulder_Log: -----------------------------------------------------------
MomentumBoulder_Log: ___________________________________________________________
MomentumBoulder_Log: Boulder ID: ctf-facemomentum.MomentumBoulder3
MomentumBoulder_Log: Mass = 30.000000
MomentumBoulder_Log: Damage Taken = 70
MomentumBoulder_Log: Damage Type: RocketExplosion
MomentumBoulder_Log: Momentum Direction = 0.117549,-0.958997,0.257888
MomentumBoulder_Log: Momentum Force = 75059.085938
MomentumBoulder_Log: Weapon Used: MultiMissile Launcher
MomentumBoulder_Log: -----------------------------------------------------------
MomentumBoulder_Log: ___________________________________________________________
MomentumBoulder_Log: Boulder ID: ctf-facemomentum.MomentumBoulder5
MomentumBoulder_Log: Mass = 7.500000
MomentumBoulder_Log: Damage Taken = 100
MomentumBoulder_Log: Damage Type: None
MomentumBoulder_Log: Momentum Direction = 0.000000,0.000000,0.000000
MomentumBoulder_Log: Momentum Force = 0.000000
MomentumBoulder_Log: Weapon Used: Not Used
MomentumBoulder_Log: -----------------------------------------------------------
MomentumBoulder_Log: ___________________________________________________________
MomentumBoulder_Log: Boulder ID: ctf-facemomentum.MomentumBoulder3
MomentumBoulder_Log: Mass = 30.000000
MomentumBoulder_Log: Damage Taken = 99
MomentumBoulder_Log: Damage Type: ThermicExplosion
MomentumBoulder_Log: Momentum Direction = 0.180539,0.982919,0.035709
MomentumBoulder_Log: Momentum Force = 51082.218750
MomentumBoulder_Log: Weapon Used: MultiMissile Launcher
MomentumBoulder_Log: -----------------------------------------------------------
MomentumBoulder_Log: ___________________________________________________________
MomentumBoulder_Log: Boulder ID: ctf-facemomentum.MomentumBoulder3
MomentumBoulder_Log: Mass = 30.000000
MomentumBoulder_Log: Damage Taken = 500000
MomentumBoulder_Log: Damage Type: Electrified
MomentumBoulder_Log: Momentum Direction = 0.623465,-0.780834,-0.039873
MomentumBoulder_Log: Momentum Force = 85000.000000
MomentumBoulder_Log: Weapon Used: Super Bolt Rifle
MomentumBoulder_Log: -----------------------------------------------------------
EDIT: These boulders will only move when they receive any damage, so if you want them to fall from where you place them right at the beggining of the map, set their Physics to PHYS_Falling.
gopostal

Re: Looking for a way to do a visual momentum test

Post by gopostal »

Nice job Ferali! I will run every weapon and chart out the results today. The timing of this couldn't be better as I have a sniper rifle that imparts way too much negative X on hitting you and this will be nice to see what the default and adjusted values really are.
Meindratheal
Average
Posts: 61
Joined: Thu Jun 03, 2010 3:53 pm

Re: Looking for a way to do a visual momentum test

Post by Meindratheal »

Just what I was looking for! Thanks, I'm looking forward to testing the weapons later.

@gopostal: I'm gonna try this using a projectilespawner (if I can find one, I'm sure I have one somewhere) from different angles, just as a little experiment. TBH I don't have a clue if angle/gravity etc will affect it, maybe we'll find out :)
User avatar
Feralidragon
Godlike
Posts: 5498
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Looking for a way to do a visual momentum test

Post by Feralidragon »

gopostal wrote:Nice job Ferali! I will run every weapon and chart out the results today. The timing of this couldn't be better as I have a sniper rifle that imparts way too much negative X on hitting you and this will be nice to see what the default and adjusted values really are.
Just remember one thing though: instant hit weapons will be always accurate regarding momentum and damage, but splash weapons (like flak, rockets, etc) won't have always the same results (since it depends on the projectile hitlocation and affecting radius, in other words, the splash effect itself).
So the projectile might have a max momentum of 80.000, but then appearing something like 23.791 or so in the logs.
Post Reply