Jump to content
The Dark Mod Forums

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


grayman

Recommended Posts

Each animation consumes 1.5 Mb of HDD space.

 

Say what? :huh:

 

Our biggest animation is 305 KB and most are under 100. They're just text files...why is yours so large?

Link to comment
Share on other sites

Say what? :huh:

 

Our biggest animation is 305 KB and most are under 100. They're just text files...why is yours so large?

 

Hm, it's not normal? Yep, they are a text file, but they really are large. The anim you see here is 1.5 megabytes. I do not know what the files should contain and what they shouldn't.

You can download and see the files here. (Older version of the anim, but it is of similar size.)

https://drive.google.com/file/d/0BwR0ORZU5sraS1lRTDRIZWtNT3c/edit?usp=sharing

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I need some confirmation of a problem I'm looking at.

 

I'm able to frob keys when I'm near the origin, regardless of where the key is in the map.

 

If one or more of you could grab a copy of this test map, place it in fms/originfrob/, run it, and try frobbing thin air anywhere in the vicinty of the metal plate in the floor, and tell me if you collect a couple keys.

 

The keyholders are beyond the east wall. There are two, plus a guard with an attached purse. I'm unable to frob the purse.

 

You can test this with 2.01. It has nothing to do with the new pickpocketing code.

 

Thanks.

Link to comment
Share on other sites

Hmm, I don't know exactly what's going on, but your file is about 18900 lines of text, while our largest existing animation (look_around) is 9400. I don't know why that is, or whether that explains why your filesize is 4 times larger then the largest existing one.

Link to comment
Share on other sites

and try frobbing thin air anywhere in the vicinty of the metal plate in the floor, and tell me if you collect a couple keys.

 

I crouched on the plate and frobbed while looking around in the air, and nothing happened. But when I looked down directly at the plate, I frobbed two keys.

Link to comment
Share on other sites

I crouched on the plate and frobbed while looking around in the air, and nothing happened. But when I looked down directly at the plate, I frobbed two keys.

 

Ok, thanks. I just needed confirmation that I didn't need to go up my medication. :wacko:

 

I'm unable to frob the purse, so I'll continue looking for why the frob code thinks the keys are w/in the frob distance.

Link to comment
Share on other sites

Our biggest animation is 305 KB and most are under 100. They're just text files...why is yours so large?

Here are only the necessary keyframes for the walk animation:

 

post-2001-0-64522600-1396192831_thumb.png

 

Blender apparently exports info about every frame for every bone. I don't know the specification of MD5 format, but I think that for some bones only the rotation info is needed while location is not. Bones are connected so that movement of some bones is defined by their parents so they don't need keyframes at all. So skipping the unnecessary data will reduce the file size, but Blender export scripts can't do this it seems.

I do not have the expertise to know what is the reason. I asked about it in the past and Arcturus said

http://forums.thedar...post__p__334417

Those ArmRoll bones are there only to disturb animations. I don't see any other reason for them. Female characters need separate animations anyway, right? Since male anims make them grow larger?

It's only a model...

Link to comment
Share on other sites

Hmm, I don't know exactly what's going on, but your file is about 18900 lines of text, while our largest existing animation (look_around) is 9400. I don't know why that is, or whether that explains why your filesize is 4 times larger then the largest existing one.

 

I've examined my anim file and the idle_standontoes.md5anim (from TDM.pk4 packages).

My findings:

1) Both files have almost exactly 75 rows of text per animation frame. This means no extra data is saved per frame into my anim, when compared to idle_standontoes.md5anim.

2) However, the decimal accuracy is different between the exporter I am using and the exporter that was used to export idle_standontoes.md5anim.

One block of data from my animation file:

frame 0 {
 0.0000005689 0.0000000000 -0.0000000000 0.4899162948 0.5129172802 0.5098843575

One block of data from idle_standontoes.md5anim

frame 0 {
0.000000 0.000000 0.000000 0.488330 0.511403 0.511404

 

Conclusion:

It looks like the same amount of data went into the different animation files per frame. The ARX:EOS exporter I am using is generating floats of higher accuracy (more decimals). The decimal accuracy difference results in higher file sizes when using ARX:EOS exporter!

 

What a crazy world.

 

So... What do you guys think? Can we use animation files that are bloated with decimals? I've tried other MD5 exporters, but they are horrible to work with.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

If you look at anim files exported from Blender you'll see that every frame has 71 lines which is exactly the number of bones. And every line has couple of values. If you look at for example walk_alert_hammer.md5anim there are only 28 lines per frame and some of the lines have only 1 value. The result is that walk_alert_hammer with 37 frames is 3 times smaller than walk_alerted which has 35 frames.

It's only a model...

Link to comment
Share on other sites

It's a bit concerning that these are about 10 times larger than other animations their size. I'm not sure how much of a problem it is. If all our animations were like that they'd be almost a gig in size.

Link to comment
Share on other sites

I'm able to frob keys when I'm near the origin, regardless of where the key is in the map.

 

Do the keys but not the purse have lod hide parameters by any chance? I've not tried the map as I only just spotted the post and I'm at work, but I'm sure I read something somewhere where someone was pointing out some FSs that mysteriously translate to the map origin in game while hidden. I might be remembering wrong and talking madness though, as I can't now find whatever it was I read.

Link to comment
Share on other sites

Do the keys but not the purse have lod hide parameters by any chance? I've not tried the map as I only just spotted the post and I'm at work, but I'm sure I read something somewhere where someone was pointing out some FSs that mysteriously translate to the map origin in game while hidden. I might be remembering wrong and talking madness though, as I can't now find whatever it was I read.

 

The root cause of the problem appears to be that there is old location data sitting around that says the keys were at one time near the origin, which they were at spawn time. When the player is near the origin, frobbing will find that data and think the keys are there, w/in frobbing distance. I believe the old location should have been removed when the keys were moved to the guards' belts, but I haven't figured that bit out yet. In addition to the old location, the correct location is also available at frob time, so I changed the code to look at the good location and ignore the bad location. I'll continue to try to understand why the old location is still around, and see if there's a spot where it should be removed.

Link to comment
Share on other sites

It's a bit concerning that these are about 10 times larger than other animations their size. I'm not sure how much of a problem it is. If all our animations were like that they'd be almost a gig in size.

It's a quite long animation, about 10 seconds so it should be about 250 frames. idle_bottle_drunk2.md5anim has 270 frames and is 239 KB. So it's a bit less than ten times. But yes, it would be better if they were smaller.

It's only a model...

Link to comment
Share on other sites

Just so everyone knows, I have a standing victim turning around and looking at the ground after the animation plays. I'm not sure if the anim needs to have the victim look over one shoulder, then the other. He's going to be turning around, and all told that will result in a lot of movement.

 

A sitting victim doesn't do an animation. He barks, then looks at the ground either to the left or right.

Link to comment
Share on other sites

[quote name='Springheel' timestamp='1396276708' post='342142']
It's a bit concerning that these are about 10 times larger than other animations their size. I'm not sure how much of a problem it is. If all our animations were like that they'd be almost a gig in size.
[/quote]

A valid point.

Oh well. This is then the end of my animation career. No point in making animations that cannot be used in the mod. I'll limit my animating to my own works.

Theoretically, it probably would be possible to make a special MD5ANIM-trimmer script. It would round all numbers to 5 or 6 decimal accuracy and remove bone information that is not required. But that would require time, coding skills and understanding of the MD5ANIM format. And I suppose the gains would not make people feel particularily dizzy Some anims already in TDM are made with blender and could get space savings from the trimming, resulting in possible lower memory impact and lower loading times.

It is improbable, but there it is. If someone would make such a script, I would gladly help with testing. ;)

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

No point in making animations that cannot be used in the mod. I'll limit my animating to my own works.

I've already uploaded many animations from Blender and Darkmod did not explode. I'm more concerned about the rescaling of female models.

Theoretically, it probably would be possible to make a special MD5ANIM-trimmer script.

It would be better to add an option to the Blender's export script that would allow to export only already existing keyframes and not generate new ones.

It's only a model...

Link to comment
Share on other sites

Three paths I see:

 

1 - Anim exists, and I leave the animation code active.

 

2 - Anim doesn't exist, and I comment out the animation code so I don't lose it.

 

3 - Anim doesn't exist, and I leave the animation code active, but we plug in an empty animation as a placeholder for the day a real anim is available.

 

Is there such a thing as an empy animation that does nothing?

Link to comment
Share on other sites

It would be better to add an option to the Blender's export script that would allow to export only already existing keyframes and not generate new ones.

 

You are correct.

 

However, a simple float accuracy reduction requires only low level of coding expertise. Improving a Blender export script requires a very high proficiency level.

 

Lowering the float accuracy to similar level you had seems to cut my animation file size by ~30%. That's something and achievable.

 

A coder pal of mine said he'd look at a script that would lower the float accuracy. Once he gets it done, I'll be experimenting how low you can go with the float accuracy without deteriorating the animation. If the float units in the animation are doom units, even 6 decimal accuracy is a bit overkill. More space savings may be possible.

 

I'll keep you posted.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Is there no way to alter the default output decimal precision in the exporter you're using? Seems like this would be something controlled through a .cfg or .ini settings file in the exporters install directory. Seems like a common parameter that the user should some how be able to control.

Link to comment
Share on other sites

Is there no way to alter the default output decimal precision in the exporter you're using? Seems like this would be something controlled through a .cfg or .ini settings file in the exporters install directory. Seems like a common parameter that the user should some how be able to control.

 

If there was a setting, of course I would have used it.

 

The sad fact is that Blender md5 exporters are incredibly flimsy. I've tried several. Some of them work only for ancient versions of Blender that would require me to learn to use the archaic UI of the old versions. Some of them outright don't work and spam the console with errors regardless what you do. Some of them seem to work, but produce garbled bounding boxes, which I spotted with sheer luck with r_showskel 1. Most of them require the animator to do some silly witchcraft before exporting: if you have wrong layers selected, wrong windows open or don't do things EXACTLY in a certain way and in a SPECIFIC order, you will be bombarded with errors...

 

*shivers of terror*

 

Even with the decimal and keyframe issues, the ARX:EOS exporter I use now is the most sturdy one I've ever used. :wub:

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

If you look at anim files exported from Blender you'll see that every frame has 71 lines which is exactly the number of bones. And every line has couple of values. If you look at for example walk_alert_hammer.md5anim there are only 28 lines per frame and some of the lines have only 1 value. The result is that walk_alert_hammer with 37 frames is 3 times smaller than walk_alerted which has 35 frames.

 

You are correct. However, a simple float accuracy reduction requires only low level of coding expertise. Improving a Blender export script requires a very high proficiency level.

 

I agree. An ideal quick solution for TDM right now would be to find a way to work out which frame parameters are not needed purely from the text file. Do you guys think that's possible?

 

If the frame info has the same numbers for a particular bone each frame, for example, that would be easy to detect. I did find a page just now describing the md5anim file format and it doesn't seem too scary, but it doesn't touch on removal of redundant info. It seems to say that every frame has a set of numbers for every bone.

 

EDIT: I'm wondering whether the extra frame info is a problem. Text files with repetition will compress well inside pk4s. When loaded into memory there might well be no difference between the version with extra frame info removed, and the version that hadn't had that done. Often a text file parser will "fill in the gaps" when it loads a file into memory as the compressed and non-compressed versions end up in the same type of data structure. Reducing decimal precision will presumably help, but maybe the extra bone frames won't matter. I have no idea how to test that...

 

EDIT2: Actually, decimal precision is unlikely to make any difference to memory consumption either. And of course I do know how to test it... [note to self: think before posting]

Link to comment
Share on other sites

Bones are connected into chains, e.g LeftArm -> LeftArmRoll -> LeftForeArm. So you can move LeftArm to move bones connected to it. There's one origin bone (root). The simplest example would be to slide character forward without any other movement. All you need to do is to animate origin bone and all other bones will follow automatically. So the resulting keyframes should be:

 

post-2001-0-31830900-1396374456_thumb.png

 

Such animation shouldn't be more than couple of KB. Right now Blender's exporters will produce 150 or 250 KB files, depending on version. Id tech 4 knows which bones inherit which bone's location and rotation.

 

Rig I made for Blender is overly complicated, because I had to build it upon the imported MD5.mesh (see this topic). But generally it's true for all advanced rigs that there are bones that are not "deforming", that is they are helping but not needed in game. For example RightArmIK (animated GIF, open to see):

 

post-2001-0-06860300-1375492557_thumb.gif

 

You animate that one bone to move the whole arm, but you don't export it, you export keyframes for all of the bones in the arm. So how exporter will know where to put those keyframes? It's logical to put keyframe for every bone, for every frame and for both rotation and location. But you can also "bake action" in Blender to another rig, without RightArmIK. Blender is smart enough to put keyframes only where they're needed.

 

post-2001-0-11253300-1396376307_thumb.png

 

It would be good to export only those. Right now exporters will put unneeded keyframes into MD5.anim. Maybe we could ask the guy who made the exporter for Blender 2.66 what he thinks. He used to hang around here, I think.

It's only a model...

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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...