HashLips / hashlips_art_engine

HashLips Art Engine is a tool used to create multiple different instances of artworks based on provided layers.
MIT License
7.18k stars 4.3k forks source link

Is it possible to have the background layer be a GIF or mp4 file? the rest of the layers are static png pictures #362

Open ghost opened 2 years ago

ghost commented 2 years ago

Is it possible to have the background layer be a GIF or mp4 file? the Rest of the layers are static png pictures. is it possible to generate a gif file or mp4 file that plays the background video but the other layers remain static?

Please let me know how i can achieve this

agustind commented 2 years ago

I wanted to generate an animated GIF collection with hashlips, with all animated layers, background, body and character face. I ended up editing the hashlips code in a way that hashlips does the file selection and rarity checking, then it runs a command using the imagemagick library. This is the command:

convert -dispose previous layer1.gif \ null: \ \( layer2.gif -coalesce \) \ -compose over -layers composite \ null: \ \( layer3.gif -coalesce \) \ -compose over -layers composite \ -layers optimize \ result.gif

ghost commented 2 years ago

Can i have a look at your code modifications please?

sonusseven commented 2 years ago

@agustind your code is look interesting, would you like please to share your editing code ?, which parts of the code have been edited

JonnyTsunamiii commented 2 years ago

any updates??

peterbaker commented 2 years ago

@agustind I would love to see your modified code as well

0xastro commented 2 years ago

You can use imagemagick as mentioned by @agustind but I was only able to do it in a post-processing style. First make sure your collectables are transparent by modifying the config.js script.

const background = {
  generate: false, //transparent background
 ..
};

Afterward, you can run the following command using imagemagick CLI as follow:

convert <filename>.gif null: -gravity east <filename>.png -layers composite  <filename-result.gif>

Simply put that in a script and the convert all the generated images to a gif

Maybe if someone could have a look an integrate imagemagick into hashlips that would be more user-friendly.

Cheers, Astro

Kirstyx commented 2 years ago

Any updates? How to define layer2/layer3 gif?

zayne-anthony commented 2 years ago

@astroax By chance do you have a script for this? If so could you make a repo or something? Id be willing to pay for it if need be, in bit of a time crunch and need it today if possible.

PradhumnaPancholi commented 2 years ago

@Kirstyx It's not supported yet. You can generate all your collection in png format and then use imagemagick to apply the a gif layer over or/and under your collections.

Can you please provide some more info on this ?

jalagar commented 2 years ago

Hi all, I was able to build a tool to do exactly this! it takes png layers and turns them into generative gifs. Its forked from an earlier version of hashlips but I plan to update it to a more recent version soon.

Here's a medium article: https://jalagar-eth.medium.com/how-to-create-generative-animated-nft-art-in-under-an-hour-e7dab1785c56 on how it works. And here's the repo: https://github.com/jalagar/Generative_Gif_Engine Feel free to follow me on twitter: https://twitter.com/jalagar_eth for more updates. DM on Twitter or create an issue/discussion on the repo for a faster response.

You can see all 1k of them on https://opensea.io/collection/genesis-bouncing-ball. Let me know if you have any questions!