Author Topic: Batch export vector draw commands one by one  (Read 10641 times)

0 Members and 1 Guest are viewing this topic.

Offline MusicallyInspired

Batch export vector draw commands one by one
« on: October 10, 2020, 11:17:56 PM »
Is there a command line tool or something anywhere that will take SCI0 Picture resources and export each draw command step in frames? I'm trying to basically make an animated GIF of a Picture resource drawing from beginning to end. Is there any easy way to do this besides copying and pasting each frame from the Pic editor or capturing SCI Decoder drawing Pictures from DOSBox?
« Last Edit: October 10, 2020, 11:31:23 PM by MusicallyInspired »


Brass Lantern Prop Competition

Offline troflip

Re: Batch export vector draw commands one by one
« Reply #1 on: October 11, 2020, 01:27:16 PM »
There's no way to animate the steps, no. That would be neat though.

You can just use a gif capture tool (like GifCam) and either manually move the pic slider, or put focus at the top of the piccommand cmd window and arrow down.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline ZvikaZ

Re: Batch export vector draw commands one by one
« Reply #2 on: October 11, 2020, 02:07:58 PM »
Maybe it's possible to achieve such animation by running Dosbox/ScummVM in (very) slow motion?

Offline MusicallyInspired

Re: Batch export vector draw commands one by one
« Reply #3 on: October 11, 2020, 03:39:56 PM »
I used SCI Decoder (old DOS resource viewing tool) and captured that in DOSBox but it uses that ZMBV codec and when you convert it so much quality is lost. Not to mention you can't resize it. Then transforming video into a GIF loses even more data. I ended up just capturing the Pic editor and manually moving through the steps with Nvidia Desktop Capture and cropping the video afterward. No way to make a good GIF it seems other than cooying and pasting every single drawing frame.
Brass Lantern Prop Competition

Offline Kawa

Re: Batch export vector draw commands one by one
« Reply #4 on: October 11, 2020, 03:45:18 PM »
There's no way to animate the steps, no. That would be neat though.

You can just use a gif capture tool (like GifCam) and either manually move the pic slider, or put focus at the top of the piccommand cmd window and arrow down.
That's literally what I did five years ago.


Offline Charles

Re: Batch export vector draw commands one by one
« Reply #5 on: October 11, 2020, 11:09:21 PM »
That sounds incredibly tedious. Maybe a hundred or more drawing “frames” and cropping et al.

If you’re doing a bunch of them, wouldn’t it be relatively easy to hack something into SCICompanion to auto increment the playback slider and save a BMP at each step?

You could even get fancy and skip BMP output on commands that don’t draw anything (like enable/disable control/visual, or palette changes). Then you’d have a series of BMP files you could drop into some other 3rd party program to create the gif.

Offline cosmicr

Re: Batch export vector draw commands one by one
« Reply #6 on: October 12, 2020, 01:57:01 AM »
It's not really difficult to do, it just takes time to implement.

I've got my own SCI Picture viewer which I wrote - I'll have a look and see if I can make it output each command to an image.

Should be able to have it by tomorrow (anyone feel free to get it done sooner!)

Offline Kawa

Re: Batch export vector draw commands one by one
« Reply #7 on: October 12, 2020, 05:55:32 AM »
Seriously? Just zoom out to 1:1, put the targeting window for GifCam roughly around the edge of the picture frame, hit record, and hold down in the command list. Bam.

Cropping in GifCam is a bit of a chore but if you have anything else like... I dunno, Aseprite? You can just use that to crop away the blue border.

Offline troflip

Re: Batch export vector draw commands one by one
« Reply #8 on: October 12, 2020, 05:29:54 PM »
That sounds incredibly tedious. Maybe a hundred or more drawing “frames” and cropping et al.

I've done this many times before for making twitter gifs, I don't find it hard at all. It takes about as long as it takes to hold down the down arrow key in the cmd window, or slide the horizontal slider across the screen. Then bam, save gif and you're done.

Not sure what cropping you'd need to do. Just position gifcam over the portion of the pic window that has the pic?

Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Batch export vector draw commands one by one
« Reply #9 on: October 13, 2020, 08:00:04 AM »
Not sure what cropping you'd need to do. Just position gifcam over the portion of the pic window that has the pic?
I've found this to be a bit iffier to do than you make it sound, tbh, if you want only the picture and none of the blue border.

Oh god why'd I just think the words "pic menu, export to gif"?

Offline MusicallyInspired

Re: Batch export vector draw commands one by one
« Reply #10 on: October 13, 2020, 03:50:39 PM »
That's what I was thinking.  ;D It already does this for View resource Loop Cels. Obviously the graphic types are quite different...
Brass Lantern Prop Competition

Offline Kawa

Re: Batch export vector draw commands one by one
« Reply #11 on: October 13, 2020, 05:52:39 PM »
Obviously. But if it can render a picture at any point in the command list, and export it to a bitmap, and the animated GIF thing is right there...

Offline lskovlun

Re: Batch export vector draw commands one by one
« Reply #12 on: October 14, 2020, 05:29:06 AM »
I would try asking this guy.

Offline MusicallyInspired

Re: Batch export vector draw commands one by one
« Reply #13 on: October 14, 2020, 08:39:13 AM »
Is that the same guy who runs the Pixel Art Of Sierra Twitter account? (Or perhaps this guy just used PAOS's GIF post?) It looks like the same types of animations. If it is, I already asked him and he said he's using an internal tool that is currently too convoluted and he's not comfortable with releasing it publicly.
Brass Lantern Prop Competition

Offline troflip

Re: Batch export vector draw commands one by one
« Reply #14 on: October 14, 2020, 03:22:54 PM »
Real support for this would include sub-command frames. For instance a large fill operation could take up several frames. So it draws slowly just like AGI did on computers back in the day. (Or was that just on the Apple II?)
« Last Edit: October 14, 2020, 03:24:41 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.049 seconds with 22 queries.