Frictional Games Forum (read-only)
Amnesia Video Tool (v2.0.0) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Resources (https://www.frictionalgames.com/forum/forum-42.html)
+---- Thread: Amnesia Video Tool (v2.0.0) (/thread-25428.html)

Pages: 1 2


Amnesia Video Tool (v2.0.0) - Mudbill - 06-04-2014

Want videos to play inside Amnesia? On a TV or computer monitor? Don't like the built-in gobo animation for spotlights?

This tool will let you animate a sequence of images in the game easily.

This application is written in Java which means it's platform independent. It should work fine on Windows, macOS and various distributions of Linux.

[Image: mSHKvCj.png]

Requirements
  • Java 7 or newer
  • A video split into individual images
  • Amnesia - The Dark Descent
  • The HPL Tools

Download

Latest version 2.0.0:

[Image: rfJLRwe.png]

[Image: mhrWygp.png]

Usage





Spoiler below!

To start off, you need to acquire a sequence of images that will make up your
video. There are tools for extracting videos and gifs into separate images.
Adobe Photoshop can do this, and probably other free tools like Gimp.

Once you have your sequence, use the app to generate the required files for
Amnesia:

- File setup
--- Name prefix
        - Whatever your sequence is named (for example frame_00.png,
          frame_01.png, frame_02.png etc), this is the prefix. In this case
          "frame_".
--- Number progression
        - x+ will number things normally. The others will use a certain amount
          of leading zeros. The appropriate setting for the above example is
          "xx". Remember that numbering starts at 0.
--- File extension
        - The extension matching your image files.

- Animation
--- Number of frames
        - The total number of frames in your animation. If you have 100 frames
          input 100. The total is the number of your last frame + 1 (because
          it starts at 0).

- Export options
--- Material files
        - The .mat files needed. Required.
--- Entity files
        - The .ent files needed. Also required.
--- Level script
        - The script which animates the frames in the game. Optional if you
          want to make your own script, but I highly recommend this one. You
          can also edit it if you want to.
    -- Minimalized
        - If you don't plan on editing or reading the script, you can use this
          setting which will make the script highly compact and spread across
          a single line. Useful if you want it to take as little space in your
          .hps file as possible.
--- Video placeholder files
        - You need 1 set of these files for the animation to work. Keep them in
          the same folder as your frames.


Once you're done, hit "Generate files" and choose the folder for your frames.

== IN-GAME ==
Copy the exported script into your <Level>.hps file. The script gives you the
folling functions:

void PreloadAnimation(string asName, string asArea, int frameAmount);
void StartImageAnimation(string asName, string asArea, string asFromArea, int
    frameAmount, int fps, bool abLoop);
void StopImageAnimation(string asName, bool abRemove);

You MUST call PreloadAnimation before you play start the animation. This will
load all your frames into the game at a specified area (place them outside your
level somewhere hidden for best effect).

After the animation is loaded, you can play and stop it using the other two
scripts. the asFromArea refers to the area used in the preload function.

Remember that asName here must be the same as the prefix you put into the app.
E.G. "frame_"


Changelog

August 7, 2018 - v2.0.0
  • Re-wrote the application. GUI is mostly the same, but the underlying functionality is very different. The animation is now more optimized, so it can run at a higher resolution and faster framerate with much less lag.
August 16, 2014 - v1.1.0
  • Completely re-made the design to look prettier and be more clean.
June 5, 2014 - v1.0.2
  • Fixed a bug I overlooked causing the .expobj file to only load 1 entity.
June 4, 2014 - v1.0.0
  • Initial release.



RE: Amnesia Video Tool (v1.0.0) - Neelke - 06-04-2014

Well done, sir Smile


RE: Amnesia Video Tool (v1.0.0) - Mudbill - 06-04-2014

Why thank you!


RE: Amnesia Video Tool (v1.0.0) - Slanderous - 06-04-2014

I love you man! You better keep your bedroom window closed :>
Just kidding, awesome thing, might use it in my custom story.


RE: Amnesia Video Tool (v1.0.2) - Daemian - 06-09-2014

28 mins vid, mudbill ? Sad can't you explain what this does in a shorter way?

It's a tool that takes images and turns them into one object (a .expobj file), that you can import into level editor. This object shows these images, loops through images like a .gif or whatever. Is this correct?


RE: Amnesia Video Tool (v1.0.2) - Mudbill - 06-09-2014

I tend to do things lengthy Dx

Sorta like that, yeah. The .expobj file isn't one object though, it's all the images collected. But otherwise it works like that, yes.


RE: Amnesia Video Tool (v1.0.2) - Daemian - 06-09-2014

Wait, I think I get it now.

Spoiler below!

This app takes the images set you have, in the format you specify, like name+number, and it creates an entity out of each (a billboard inside with the image).
So if I have like image_chocolate_01.jpg, I end up with the entity image_chocolate_01.ent and so on for each image.

Then, all these entities get listed/enumerated in a .expobj file so you can import all the entities together (at 0,0,0 coords).
And last, you get a .hps file with code to make these entities go active/inactive with timers. And that's how it loops through images.

That's awesome, it takes some skill to come with this in Java. I wanna learn too :[
I'll see if I can use your tool instead of spotlights and see the difference. Good job.


RE: Amnesia Video Tool (v1.0.2) - Straxedix - 06-09-2014

This is amazing tool Mudbill Big Grin
Very nice Smile


RE: Amnesia Video Tool (v1.0.2) - Mudbill - 06-09-2014

Thanks! And yes, that's how it works Amn.

Basically, the whole file is actually written inside the Java app, then printed with the incremented numbers. Perhaps not the more effective way, but it works, and that's what matters, yea? It took me about 5 days to make.


RE: Amnesia Video Tool (v1.0.2) - Mudbill - 08-16-2014

Okay, I just decided to pull out an update to fix the design, now that I'm more familiar with GUI design in Java. I think it looks good.

Since no one have reported any issues, I'm assuming it's working fine. Unless I decide to revisit it again, this might be the last update, at least for a while.