Jump to content

CnCNet Forums

Search In
  • More options...
Find results that contain...
Find results in...

Introducing ShapeSet and WSASet.


Blade
 Share

Recommended Posts

Out of interest i tried recompressing the radar anims with shapeset and it shaved ~6MB off of each file. It looks like the originals were compressed without keyframing so only LCW was used, no XORDelta. It looks like all the Radar animations apart from the ones in Sole were compressed the same way. The Sole one does appear to use keyframing however.

Link to comment
Share on other sites

  • Replies 62
  • Created
  • Last Reply

Top Posters In This Topic

I've tried the new version and sadly have found there to be little difference ingame, the new game screen crashing on the second to fourth "new game" press. One execution didn't crash at all, but the wsa is not animated, staying on the first frame. The loop switch is required to stop it crashing after 2 seconds but that is all it does.

 

Out of interest i tried recompressing the radar anims with shapeset and it shaved ~6MB off of each file. It looks like the originals were compressed without keyframing so only LCW was used, no XORDelta. It looks like all the Radar animations apart from the ones in Sole were compressed the same way. The Sole one does appear to use keyframing however.

I'll give it a try. My radar animations are SHPs rather than WSAs though!

Link to comment
Share on other sites

I'm curious, how much does recompressing them save in the MIX file? 6 MB per file sounds like a lot..

 

Could someone recompress (with highest compression ratio) all the SHP and WSA files in the MAIN.MIX and REDALERT.MIX files in my mini-RA zip? How much file size is saved before and after compression?

 

https://dl.dropboxusercontent.com/u/21865790/red%20alert%20mix%20files%20mini.zip

 

 

Link to comment
Share on other sites

My maths was off, it was late when I tested this last night in my defense, it actually shaved around 60k off of each radar animation. This was through a combination of actually using the keyframe compression which uses XORDelta and the fact that my XORDelta makes a few extra savings in space over the WW implementation. I still need to test if the issues Kilkakon are due to differences in the compression scheme between my tool and the original though for WSA.

Link to comment
Share on other sites

Okay, more test binaries at http://www.mediafire.com/download/vfy4otw0ok7x665/wsa_test.zip. The reg version should generate wsa files almost the same as the WW encoder, the opt version uses the more aggressive delta encoder that saves extra space. Both should now calculate the delta field in the header the same as the original WW tool, so if neither of these generate working WSA files then I question the integrity of the game :P

 

edit: These tools should work for any WSA except choose.wsa which for reasons I don't fully understand has a much larger delta relative to its largest frame than any other WSA I've tested so far.

Link to comment
Share on other sites

Starting to see some good results with this build!

 

I've been using the reg variant, and so far have not tried any new palettes or anything, but my simple test has worked! :D Success! Charmander spinning on top of the world haha. I'll try with palette changes and with the opt variant as well and report back.

 

Eventually it would be great if we could handle the choose.wsa one as well, but will keep working on this for now.

Link to comment
Share on other sites

Looks like I don't know what palette file to replace XD I managed to create a paletted WSA that was non-standard, looks fine in XCC, but ingame it's not using my palette, and through trial and error I think I've managed to replace every single stretch table pal file except the one I want, haha. Still that is not an issue with WsaSet. When I crack it I'll try the optimised version.

 

EDIT: Yeah, seems to be a C&C thing that I'll need to investigate further. As a test I replaced africa.wsa instead of hearth_a.wsa and my custom palette worked fine (glitchy, but something I can work on for sure). In saying that... I think I might be able to get away with not having that issue fixed. I can replace africa's palette, but not hearth_a, but I can make do with hearth_a's stock one.

 

Alright! :) I will try out the opt version tonight and report back again.

Link to comment
Share on other sites

The compression is fine in my tool, its the delta in the header which tells the game how much memory to allocate for decompression that is causing these issues. I think I've finally solved it though. The build found here http://www.mediafire.com/download/lhuvu4jsh2006ie/wsaset.zip should be able to create a working choose.wsa file now as well. Give it a whirl and let me know.

 

WSA frames are stored as an XORDelta against the previous frame that is then LCW compressed. The header Delta field is supposed to be the largest frame plus the size of the in memory header that is built for it. My mistake was assuming it was the size of the XORDelta before LCW compression, but its actually which ever is largest, the largest uncompressed XORDelta or the largest LCW compressed delta.

 

For most image data, the assumption that it will be the XOR is fine as LCW compression makes them smaller, but for very random data that changes a lot between frames (like the static in the choose.wsa) then LCW can actually end up larger than the uncompressed XOR, hence the problem.

Link to comment
Share on other sites

Seems good to me Blade! I've yet to try messing with palettes for choose.wsa just yet but the new file seems to be working fine. Started and aborted the campaign a bunch of times without problem, and it animates and loops just fine.

 

Seriously, thanks for helping to get this tool functional. It means I can have the campaign work properly rather than have a "please ignore the logos you click on for starting the game" problem. It'd break immersion pretty fast :P I'll report back if I have any issues, but for now I have to make the real content...

Link to comment
Share on other sites

No worries, pinning down the format down needed to be done anyway to ensure we have a full modding tool set for RA++. Its taken some 20 years to get a working WSA encoder figured out properly, but its finally done it seems :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...