Jump to content
The Dark Mod Forums

Huh? Now where'd that go? (Picking pockets)


grayman

Recommended Posts

Thanks Arcturus, that's really illuminating. It also means we probably can't remove the frames by simply parsing the text file.

 

I did a couple of experiments. Reducing precision to 6 decimal places cuts the file size by 30% as Sotha observed above. Removing repetition (same bone/parameter in successive frames) shaves off another 200kb, but it's not very impressive and I have no idea whether it would still work -- this was just a test to see whether the file size would reduce much. Well, it doesn't.

 

NB Sotha your files are not out of proportion with the existing ones. The pickpocketing animation is 250 frames whereas the next biggest one is about 500kb at 120 frames. If you strip down your precision to 6 decimal places, you'll have the same frames/kb ratio as many existing ones.

Link to comment
Share on other sites

Here are examples of typical frames from MD5.anim.

 

From Blender's 2.49 exporter. 71 lines, 6 decimal places:

 

 

frame 0 {
0.000001 -0.000000 0.000000 0.489916 0.512917 0.509884
43.289040 1.209966 0.688437 0.690601 0.723230 -0.002010
0.000002 0.000002 -0.000000 -0.000000 0.000000 0.000000
-0.001614 0.006395 -0.312555 -0.020007 -0.005177 -0.000002
0.902702 -0.468251 -1.875062 0.000000 0.000213 -1.000000
0.000005 0.000021 -3.104001 -0.059406 0.035939 -0.693699
8.040618 -7.098244 0.000007 0.000000 -0.000500 -0.000500
8.144547 6.600901 -0.065803 -0.002984 -0.002340 -0.033368
19.400002 0.001057 0.000021 0.000622 0.004876 0.059467
9.346615 -7.112816 0.000010 -0.000000 -0.000556 -0.000555
17.464394 -1.545430 0.016042 -0.011721 -0.051655 -0.517591
7.605110 -0.960040 -0.022030 -0.000187 -0.000376 -0.311259
5.820003 -0.000247 0.000000 -0.000000 -0.000000 -0.000000
8.062489 13.751354 -0.360310 -0.007633 -0.005395 -0.076718
0.902703 -0.469848 1.874648 -0.000213 0.000000 -0.000000
-0.000002 -0.000010 3.104001 0.041682 -0.042116 -0.834967
-5.433825 8.842611 0.273228 -0.017303 -0.002995 0.177362
-7.957880 -5.645960 0.000006 -0.000000 0.000500 0.000500
-19.400003 0.001358 0.000016 0.006558 0.109063 0.303345
-7.186826 12.477015 -0.570744 0.007357 0.006873 0.086694
-17.456549 1.525735 0.014622 0.059907 -0.091367 -0.496380
-7.588328 0.979128 -0.015286 0.000052 -0.000046 -0.275666
-5.820028 -0.000181 -0.000001 -0.000000 0.000000 -0.000000
-9.408999 -7.121773 0.000008 0.000000 0.000500 0.000500
0.948324 3.533714 0.000342 0.706936 0.707276 -0.000951
5.093697 -0.000005 0.006403 -0.000124 0.000632 0.217279
1.849117 -0.000026 0.002053 -0.001983 0.006643 -0.151360
7.017838 0.352979 -0.035833 -0.001713 0.000880 -0.133664
4.552682 0.129049 1.439322 0.682041 0.731299 -0.000102
2.037683 1.098709 -0.545099 -0.000000 0.000000 -0.000000
-2.507992 -0.148781 -3.552461 -0.000000 0.000000 -0.000000
1.043776 -1.653386 -2.909999 0.674689 -0.625212 0.185343
8.381285 0.000005 0.000529 -0.000953 0.028446 0.040651
3.907568 -0.000002 -0.000523 -0.250209 0.087436 0.072416
9.057848 0.000005 0.000009 -0.215734 0.671950 0.201478
1.963895 0.453924 -4.992181 0.036636 -0.731941 0.071062
1.480307 -0.002533 -0.001268 -0.029349 -0.035485 0.208597
0.980043 -0.002594 -0.001056 0.109056 0.668820 0.149218
-0.000000 0.000007 -1.238342 -0.000000 0.000000 0.000000
-0.098690 0.451701 -4.921852 0.120393 -0.688208 0.169657
1.855385 -0.004887 0.000244 -0.034276 0.007876 0.290148
1.046395 -0.004932 0.000463 -0.034615 0.006217 0.243795
1.505553 0.000008 -0.000000 0.000000 0.707107 0.000000
2.186786 -0.935987 -2.336121 0.021350 -0.640529 0.126915
1.674172 -0.003639 -0.004642 -0.012464 -0.208984 -0.058667
1.270734 -0.002594 0.000242 0.001127 0.707107 0.000321
10.271383 1.335419 -0.013162 -0.999121 0.041891 -0.000244
2.706249 -0.000002 -0.000002 0.000000 0.000000 0.707107
4.552370 0.131187 -1.466081 0.731314 -0.682041 -0.000293
-2.037683 -1.098704 0.545102 -0.000000 -0.000000 -0.000000
2.507996 0.148795 3.552458 -0.000000 -0.000000 -0.000000
-1.043775 1.653463 2.909998 0.597037 -0.704500 0.221952
-8.381293 -0.000001 -0.000517 -0.012984 0.070098 0.115644
-3.907542 -0.000013 0.000529 -0.286077 0.101371 0.060344
-9.058268 -0.000001 0.000009 -0.279247 0.661659 0.255726
-1.913442 -0.464118 4.959751 0.036628 -0.731941 0.071055
-1.477959 -0.005820 0.001135 -0.029184 -0.035677 0.208588
-0.976235 -0.005740 0.000192 0.109094 0.668705 0.149133
0.001133 -0.000000 1.238399 -0.000001 -0.000000 0.000000
0.151565 -0.467376 4.892794 0.120436 -0.688282 0.169597
-1.858466 -0.007977 0.002717 -0.034150 0.007645 0.290144
-1.046373 -0.008110 0.001447 -0.034591 0.006008 0.243787
-1.505536 -0.000014 0.001180 0.000010 0.707101 -0.000012
-2.152309 0.936416 2.290546 0.023211 -0.640771 0.127360
-1.669052 0.004114 -0.015072 -0.012189 -0.208897 -0.059643
-1.270782 0.000030 0.001167 -0.000000 0.707107 0.000000
1.097790 6.556234 4.857024 0.682026 0.731314 -0.000099
1.096672 6.563387 -4.873529 0.516910 -0.482115 -0.517324
8.203238 -0.011052 8.318960 0.682026 0.731314 -0.000102
8.201311 0.001192 -8.346775 0.731314 -0.682041 -0.000293
3.531819 5.334026 0.004858 0.706935 0.707279 0.000451
}

 

 

From Blender's 2.70 exporter. 71 lines, 10 decimal places:

 

 

frame 0 {
 0.0000005689 0.0000000000 -0.0000009537 0.4899162948 0.5129172802 0.5098844171
 43.7252388000 0.3814070821 -0.2715058625 0.6778246760 0.7350054979 0.0099854767
 -0.0000003407 -0.0000029286 -0.0000001967 0.0000000252 0.0000000238 0.0000001645
 0.0000049141 0.0000082251 -0.0000001136 0.0000000055 -0.0000000355 -0.0000006299
 0.9027029872 -0.4682501256 -1.8750613928 -0.0000000463 0.0002130903 -1.0000000000
 0.0000047982 0.0000008841 -3.1039981842 -0.0008270434 0.0005289838 -0.7268698215
 8.0406122208 -7.0982456207 0.0000096783 0.0000002864 -0.0005003497 -0.0005004414
 7.9633851051 5.7216815948 0.0000110865 0.0000001735 -0.0004997264 -0.0004996326
 19.3999996185 0.0010597706 0.0000221469 -0.0002543379 -0.0015237636 0.0176093429
 9.3466176987 -7.1128120422 0.0000096262 0.0000004073 -0.0005555751 -0.0005554599
 17.4612693787 -1.5466263294 0.0148375863 -0.0145735256 0.0094260471 -0.4902182221
 7.6051125526 -0.9600360990 -0.0220304225 -0.0001738616 -0.0003809126 -0.2760353982
 5.8199996948 -0.0002456793 0.0000001537 -0.0000000170 -0.0000000060 -0.0000000152
 9.4341831207 7.1592798233 0.0000101607 0.0000003193 -0.0005553970 -0.0005552629
 0.9027037621 -0.4698416889 1.8746477365 -0.0002129256 -0.0000001049 -0.0000000605
 -0.0000041723 -0.0000008902 3.1039996147 0.0007688346 -0.0004401783 -0.7229061127
 -8.0266141891 7.1510229111 0.0000070594 0.0000002922 0.0004997224 0.0004995781
 -7.9578766823 -5.6459622383 0.0000057239 0.0000001688 0.0005003976 0.0005002924
 -19.4000053406 0.0013593733 0.0000148658 0.0002510106 0.0014727459 0.0154151013
 -9.3418388367 7.1315026283 0.0000074282 0.0000003310 0.0005000224 0.0005001440
 -17.4579906464 1.5232698917 0.0155502083 0.0143360868 -0.0090233888 -0.4936583936
 -7.5883288383 0.9791296721 -0.0152858403 0.0000515785 -0.0000463318 -0.2756661177
 -5.8200273514 -0.0001799936 -0.0000007139 0.0000000184 -0.0000000034 0.0000000182
 -9.4089994431 -7.1217732430 0.0000085030 0.0000001945 0.0005000746 0.0005001953
 0.9483287334 3.5337178707 0.0004224125 -0.7069344521 -0.7072787881 -0.0006018505
 5.0936808586 0.0001731435 0.0064126169 0.0166929346 0.0041468716 0.2416714579
 1.8491438627 -0.0000015326 0.0020534960 -0.0002840769 0.0030765722 -0.1421765536
 7.0179080963 0.3530227542 -0.0358323865 -0.0001087946 -0.0029024663 -0.0493990146
 4.5526776314 0.1290461123 1.4393219948 -0.6820407510 -0.7313141227 -0.0002287703
 2.0376832485 1.0987101793 -0.5450991988 0.0000004315 -0.0000000035 -0.0000001895
 -2.5079913139 -0.1487817019 -3.5524592400 -0.0000000512 0.0000000099 -0.0000001360
 1.0437759161 -1.6534022093 -2.9099957943 -0.0598492250 -0.7906382680 -0.0208184198
 8.3812828064 0.0000153482 0.0005289316 -0.0000029021 0.1138971448 -0.0223572701
 3.9075613022 0.0000029802 -0.0005213022 0.0000002515 0.0584396087 -0.0114699882
 9.0578565598 -0.0000039190 0.0000038147 -0.0000008940 0.7077418566 0.0000005822
 1.9653536081 0.4564497471 -4.9927058220 0.0000130249 -0.7071068287 0.0000130438
 1.4808206558 -0.0000101589 0.0000055432 -0.0000005345 -0.0000000211 0.1336748451
 0.9798831940 -0.0000030361 0.0000026226 0.0759127140 0.7030206919 0.0759132355
 0.0000024140 -0.0000019316 -1.2383348942 -0.0000000615 0.0000000033 0.0000000191
 -0.0985832214 0.4564631581 -4.9232544899 0.0428970791 -0.7058045268 0.0428970940
 1.8562524319 -0.0000055730 0.0000064373 -0.0000004351 0.0000008217 0.1480341405
 1.0458331108 -0.0000117719 0.0000021458 -0.0000007746 0.0000003276 0.1002748385
 1.5055484772 0.0000017881 0.0000030994 -0.0000001235 0.7071068287 0.0000000833
 2.1932001114 -0.9392758012 -2.3367719650 0.0950121284 -0.4673316181 0.1559369862
 1.6791399717 -0.0053407475 0.0003270805 0.0003184843 -0.0000003641 0.0005640612
 1.2707326412 -0.0025943816 0.0002402663 0.0011275341 0.7071069479 0.0003202221
 10.2714281082 1.3354145288 -0.0131633161 -0.9993928075 -0.0348413624 0.0000274818
 2.7062480450 0.0000003592 -0.0000023141 0.0000003021 -0.0000003015 0.7071065903
 4.5523610115 0.1311843991 -1.4660809040 -0.7313138843 0.6820409894 0.0002932907
 -2.0376801491 -1.0987259150 0.5451022983 -0.0000000317 0.0000000080 -0.0000001639
 2.5079972744 0.1487917751 3.5524587631 -0.0000000698 -0.0000001317 0.0000004699
 -1.0437734127 1.6534632444 2.9099993706 -0.0539899804 -0.6962701678 -0.0187211800
 -8.3812942505 -0.0000223517 -0.0005157590 -0.0000018300 0.0073915711 -0.0009158780
 -3.9075458050 0.0000036955 0.0005275011 0.0000008703 -0.0067653102 0.0008406652
 -9.0582675934 0.0000015944 0.0000066161 0.0000000766 0.7077412605 0.0000012927
 -1.9121544361 -0.4593883753 4.9633364677 0.0000059724 -0.7071068883 0.0000059860
 -1.4807908535 -0.0000049472 0.0022563338 0.0001801516 -0.0001797157 0.1336770803
 -0.9799047709 0.0000132397 0.0011368990 0.0759938061 0.7029331923 0.0758288130
 0.0011337996 -0.0000082627 1.2383981943 -0.0000004888 -0.0000002505 -0.0000002848
 0.1516737342 -0.4593994021 4.8907318115 0.0429521613 -0.7058664560 0.0428288095
 -1.8562837839 -0.0000022203 0.0025047064 0.0001731116 -0.0001777093 0.1480363309
 -1.0458583832 0.0000013784 0.0010343194 0.0000889750 -0.0001020593 0.1002774239
 -1.5055379868 -0.0000004396 0.0011820793 0.0000103919 0.7071009874 -0.0000124566
 -2.1439986229 0.9361816049 2.3077945709 0.0967207849 -0.4675110877 0.1567665935
 -1.6791086197 -0.0000092983 0.0014935732 0.0000000130 -0.0000000224 -0.0000002570
 -1.2707815170 0.0000353456 0.0011672974 0.0000003398 0.7071065903 0.0000000105
 1.0977841616 6.5562319756 4.8570232391 -0.6820408702 -0.7313140035 -0.0002286899
 1.0966740847 6.5633859634 -4.8735303879 0.5169103146 -0.4821133614 -0.5173234940
 8.2032384872 -0.0110543538 8.3189620972 -0.6820411682 -0.7313137054 -0.0002287007
 8.2013149261 0.0011892784 -8.3467769623 -0.7313139439 0.6820409298 0.0002933707
 3.5318071842 5.3340291977 0.0048584193 -0.7069344521 -0.7072789669 -0.0004513948
}

 

 

From Maya (?). Number of lines varies, but it's lower than 71, meaning that not every bone needs coordinates. Here are 28 lines, sitting animatios have only 21. There are 10 decimal places too. What's interesting is that sometimes there is only one coordinate per bone.

 

 

frame 0 {
 0
 41.6122550964 0.769297421 -0.4957777858 0.6761199236 0.7347832322 0.0210316759
 1
 -0.0444499068 0.0288944356 -0.8427051902
 -0.0434568822
 -0.0055048619 -0.0195548926 -0.389732033
 -0.2757701278
 0.0714182556 0.0657634214 -0.5895010829
 0.1319703609
 -0.0008709683 0.0017415748 -0.4402806759
 -0.5848475695
 -0.7069346309 -0.7072789669
 -0.0093006892 0.0277884528 -0.1304504871
 0.6820412874 0.7313135266
 -0.0871557444
 0.4217270315 -0.5494616032 0.4736625254
 0.0758535862
 -0.1830575615 0.5944208503 0.1412809342
 0.9993928671 0.0348406509
 -0.7313135266 0.6820412874
 -0.0871557444
 0.4218722582 -0.4942265749 0.4430260956
 -0.0250596683 0.49504897 0.0142860003
 0.6820412874 0.7313135266
 -0.7313135266 0.6820412874
 0.6820412874 0.7313135266
 -0.7313135266 0.6820412874
 0.7069346309 0.7072789669
}

 

It's only a model...

Link to comment
Share on other sites

I wrote an ASE importer/exporter for Blender at one point. The most frustrating part of the process is having to play catchup nearly every time there is a new Blender release. I knew updates would likely break the plugin but I wasn't prepared for how often. Looking back on that situation I think if you want a workflow pipeline with some real longevity you'd need to export to a format that's natively supported. It's much easier to write a converter that takes say an OBJ and makes an ASE than to keep addressing issues with an app that's in constant flux.

 

No discredit to Blender mind you. It's a fantastic program and it's wonderful that you don't have to wait years between releases. But if you can identify a natively supported animation format, it might be best to write an MD5 converter for it. Do the work once and be done with it.

Link to comment
Share on other sites

I knew updates would likely break the plugin but I wasn't prepared for how often.

It seems to have straighten out a bit lately. This MD5 exporter for 2.66 and this ASE exporter for 2.63 work with Blender 2.70. The latter lacks vertex paint's export, and apparently has some bugs.

It's only a model...

Link to comment
Share on other sites

Simply rounding down animation frame data precision generates visual artifacts in the animations, even if 5 digit precision is used. The AI "shivers" or spasms in their movements occasionally.

 

The animation size can only be toned down by doing something to the exporter.

 

Pity.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

@Sotha: I don't know whether your friend got back to you with a script, but here's the one I used to test it. Unfortunately, it won't run in DR's python panel so it'll only be of use if you have python installed. You set the precision and filename paths in the first few lines. It just chops the number off at the right point, it doesn't bother with rounding.

 

# Reduce decimal precision of an md5anim file
import re
PRECISION = 6   # desired max decimal places
path = "E:\\dm-dev\\md5anim\\proguard_animation_pickpocketed\\"
origfile = "proguard_animation_pickpocketed.md5anim"
newfile = "proguard_animation_pickpocketed.md5anim.shrunk"
text = file(path + origfile).read()
fixedtext = re.sub('([0-9]+[.][0-9]{1,' + str(PRECISION) + '})[0-9]*', r'\1', text)
file(path + newfile, 'w').write(fixedtext)

 

Is it worth picking up on Rich's suggestion in another thread? I'm happy to produce a file converting script but I don't know modelling so people would have to explain to me what the issues are (and test it of course!)

 

EDIT: crossed with Sotha

Link to comment
Share on other sites

Oops. I made a mistake. Apparently TDM randomizes anims if they have a number in them. I had anim1, anim2, etc, and TDM played those just randomly.

 

Here is a comparison shot of all the anims.

 

From left to right:

Original 10 decimal anim. 1.487 kB.

6 decimal anim. 1063kB.

5 decimal anim. 957kB

4 decimal anim. 852kB

3 decimal anim. 746kB

 

So looks like the 30% save can be done without any deterioration.

 

I dunno if there was any sense in all this, but at least it is now out there in the open. And my anims will be comparable in size with the ones Arcturus has already contributed to the mod.

(Without making the mod explode. :laugh: )

  • Like 1

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

The video is made from a distance. How it looks on the closeups?

 

Actually very intense staring at very close distance reveals some shaking in 6 decimal anim, too. Crap.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

That's why there's 10 decimal places in the Maya export. I've seen that shaking in the past, before I made the new Blender rig. It was noticeable with slow anims. Now I wonder if all animations I exported from Blender 2.49, which produces 6 decimal places, have that shaking too but no one noticed.

It's only a model...

Link to comment
Share on other sites

Those are old:

 

idle_adjusting_belt

idle_shifting1

idle_shifting2

idle_standontoes

run

run_charge

run_charge_torch

run_jog

run_torch

 

Those are newer, made with the rig:

 

walk

walk_alert2

walk_alerted

walk_lantern

walk_torch

zombie_idle

zombie_idle_2_sleep

zombie_idle_look_left_01

zombie_idle_shift_01

zombie_idle_shift_back

zombie_idle_shift_right_01

zombie_run

zombie_sleep_2_idle

zombie_walk

 

I don't really think there is noticeable shaking in those anims.

It's only a model...

Link to comment
Share on other sites

even if I should commit the support and let the final anims be plugged in later.

 

 

It's probably good to have the support for future animations there even if we don't use them immediately.

Link to comment
Share on other sites

@grayman

Anims are on hold because of size issues. It has been implied current anim setup is insufficient due to Blender export size implications.

 

Anims were also found unsuitable because of high amount of turning?

 

It is unclear what kind of anim is desired at this time.

 

@Arcturus

I am unable to use old blender versions due to archaic UI.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

It's probably good to have the support for future animations there even if we don't use them immediately.

@grayman

Anims are on hold because of size issues.

 

I'll submit my changes, but won't submit the placeholder anims.

 

The code already checks for the presence of the anims before trying to play them.

Link to comment
Share on other sites

I'm late to the party with this idea, but was it discussed that AI that are alerted to high levels (4/5) cannot be pickpocketed? And if you try to pickpocket them on 4 then they discover you and go to 5?

Link to comment
Share on other sites

I'm late to the party with this idea, but was it discussed that AI that are alerted to high levels (4/5) cannot be pickpocketed? And if you try to pickpocket them on 4 then they discover you and go to 5?

 

I don't recall that being discussed.

Link to comment
Share on other sites

Well, if others agree that this is a good gameplay idea, and if it's not too late to add something like that, then by all means. :-)

 

Always thought it a bit odd to be able to pickpocket in the middle of a fight. Also if AI is searching I would imagine they'd be much more prone to catching the player attempt and raise them to full alert. Would add more tension + make pickpocket only an option for a guards at alert levels 1-3. Just two ideas, what's everyone else think?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 3 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...