The Lurker Lounge Forums
The Dark Graphics - Save .cl2 animation [solved] - Printable Version

+- The Lurker Lounge Forums (http://www.lurkerlounge.com/forums)
+-- Forum: Lurker Games (/forum-6.html)
+--- Forum: Diablo (/forum-15.html)
+--- Thread: The Dark Graphics - Save .cl2 animation [solved] (/thread-15688.html)



The Dark Graphics - Save .cl2 animation [solved] - Belix - 10-24-2013 10:52 PM

Hello, I'm a little embarrassed, as this seems like it should be quite simple, but no matter what I've tried with The Dark Graphics (latest version I could find, 2.3.0.128) I cannot get it to save complete .cl2 animations. It will only save one single frame in a .cl2 file. Doesn't matter if I try to save a cluster of .bmp files, a .cel file, or even just resave a .cl2 file that already had multiple frames, the output is always a 1 frame .cl2.

Unfortunately their forum seems to be broken now, so I am too late to peruse the 7 page thread about the program for insight into this.

If anyone could tell me what I'm doing wrong, or point me to another way to properly create .cl2 files, I would be most appreciative.

Edit: Updated thread title. See post 2 (link to an off-site .pdf file with full details) or 3 (summarized steps) for the solution.


RE: The Dark Graphics - Save .cl2 animation - qualakon - 10-29-2013 08:46 PM

I have yet to find a way to properly deal with cl2 files.

This is the closest to a tutorial that I have and it's geared towards player graphics animations.

http://khanduras.net/2013/07/repo-simple-player-gfx-by-odin/


RE: The Dark Graphics - Save .cl2 animation - Belix - 10-30-2013 10:13 PM

Thank you very much, qualakon. Following the steps in that tutorial allowed me to create a proper .cl2 file that works in the game. Apparently in order to convert .bmp files to single frame .cl2 files, one rather unintuitively needs to load *only* the first bitmap in the sequence. Generally when you batch convert something you open/list all the files you want to convert, but this program didn't follow that convention.

I'll summarize the steps from that .pdf file here for the convenience of anyone else trying to do such a thing in the future who searches the web for help.

.bmp to .cl2 with TDG in 7 easy steps:

1. Make sure Loop is unchecked, and Groups are set to 0 (default when you just started TDG)
2. Click 'Open BMP' -> Select the first bitmap in your animation sequence (should end with 1)
3. Enable the Loop checkbox
4. Click 'Save CL2' -- this should batch convert all .bmp files in this animation to individual .cl2 frames
5. Click 'Open CL2' -> Select the first cl2 file in the sequence
6. Set Groups correctly for the final cl2 file (e.g. Groups = 8 for a player character or monster)
7. Click 'Save CL2' -- this should create the full .cl2 animation file in the same folder as your .cl2 frames

And you're done.

If directory clutter is a concern, between steps 4 and 5 you may wish to move the freshly converted .bmp -> .cl2 single frames to a different folder before creating the final .cl2 file.

EDIT: Just adding some extra discoveries here:
-TDG hates underscores in folder names. Don't try to save files into paths containing underscores or you'll get errors trying to perform operations.
-Make sure you're using the latest version (2.3.0.128 I believe); I tried an older one (2.3.0.125) and it wrote out individual .cl2 files incorrectly somehow, and neither it nor the newer version could then create a multi-frame .cl2 from them. Had to delete them and start over with .128.


RE: The Dark Graphics - Save .cl2 animation [solved] - ArthurDent - 03-31-2014 09:56 PM

Hello all,

- I was under the impression that the included help file (*.chm) that comes with TheDarkGraphics adequately explains how to utilise Batch Operations (BO).

- Isn't that the case?

Regards,
ArthurDent


RE: The Dark Graphics - Save .cl2 animation [solved] - Belix - 03-31-2014 11:38 PM

Hi ArthurDent, if I recall correctly, the difficulty I had using TDG was due to its interface.

For example, the Loop checkbox is clustered in with the controls for animation playback, where its intuitive purpose would seem to control whether the animation presently loaded repeats during playback. But it doubles as a switch to control batch operation context established when TDG is told to open a file; not so intuitive, and I don't remember anything in the TDG help file that stated this explicitly.

This was further obfuscated by the need to check Loop before opening an animation to batch save all of its frames out to individual files; it gives you the misimpression you want Loop checked to perform batch operations, when in fact this will cause problems trying to save a multi-frame animation (where it must be unchecked before opening the frames).

The Loop checkbox influences program behavior in ways that are not easily apparent, which in turn can lead to situations where the instructions offered by the help file do not work.

Once I figured it out, though, TDG was of invaluable helping me to correct some animation related issues in Diablo and its expansion pack.


RE: The Dark Graphics - Save .cl2 animation [solved] - qualakon - 04-01-2014 05:04 AM

Hey ArthurDent, would be really neat to see an update to tdg32 with a check box to ignore the restrictions that Diablo imposes, like max image size, so that we can use your tool to create updated graphics on updated engines.

Part of me knows what I'm asking is impossible and the other half knows nothing is impossible.

If this is not possible, what is possible? Is the source available or gone forever?


RE: The Dark Graphics - Save .cl2 animation [solved] - ArthurDent - 04-01-2014 06:41 AM

Hello qualakon,

- unfortunately, that is not how things work. TDG is tailor made to support Blizzard's way of encoding 256 colour bitmaps exactly as they are used in the game.

- Image size (for .cl2) is dictated by frame header size which allows for 5 WORDS only. this means that maximum possible Height is 5 * 32 lines. The width of each line has also to be specific and I don't recall exactly but i think that it is either fixed per file type or hardcoded per filename.

- bear in mind that D/HF utilises 2D graphics via Direct2D i.e. it uses Surfaces (bitmaps) superimposed on one-another and on the screen. That how things were in DirectX v3 days.

- Newer games (along with their so-called "engines") use Direct 3D technology which deals with messes drawn onto polygons, a totally different approach.

- D/HF 256 colour bitmaps are also unique in the way they utilize the 00-FF character range to encode transparency and also RLE compression. While impressive in the economy of scale they achieve, they do not lend themselves to manipulation outside the strict confines of D/HF.

- As for the source code, it won't be of much help either since it is focused on these specific formats only.

Regards,
ArthurDent


RE: The Dark Graphics - Save .cl2 animation [solved] - qualakon - 04-01-2014 07:20 AM

So if we wanted to make higher resolution graphic animations, we'd have to make our own program to do that from scratch? It makes sense as Diablo came out 17+ years ago and your tool probably 15 years ago, give or take. Technology changes! It's not possible with Diablo/Hellfire but I was thinking for Chochlik or something similar.

Personally, I'd rather animations be done in OpenGL for cross compatibility, but that's a major overhaul that I don't think we'll see. We'd need new player, npc and monster graphic renders and certain aspects like TRN files for monstor colour wouldn't be easily available, but not impossible to replicate.


RE: The Dark Graphics - Save .cl2 animation [solved] - ArthurDent - 04-01-2014 09:32 AM

Hello qualakon,

- well, you don't have to make your own program in order to work with graphics in general. There are several specialised software packages in the market.

- TDG deals specifically with the proprietary format of D/HF for which no alternative exists apart from internal proprietary tools.

- Palettised graphics are a very clever, fast and economical method to have multiple colour variations of the same animation via pallettes (*.PAL) and palette transformations (*.TRN).

- Nowadays it's all about millions of files that cater for every variation that needs to be drawn. That's why good old D/HF was nary a CD in size and D3 is some 15 GB (client-side only). We are talking about a factor of 30 or so in disk size which has in turn to be loaded into RAM and VRAM etc. etc.


Regards,
ArthuDent


RE: The Dark Graphics - Save .cl2 animation [solved] - qualakon - 04-01-2014 07:28 PM

We've been using either MS Paint or Gimp to make changes in the graphics files themselves. But to compile BMPs back into CL2 files we have to use TDG23. We want to increase the resolution of the player and monster graphics, not possible with our current toolset.

I agree about palettised graphics and I've seen Chochlik make use of TRNs for new classes, which I thought was great! But I don't think that's possible in D/HF.