Comments (33)
Oh this is great! Thanks a bunch for this, for real.. it's alright I am already almost 30% done with step2 .. but will def be making use of this for step3, you're awesome!
also, tried meddling with the gif and video engine, but I am gonna stick with your code.. that one seems to throw different errors as soon as the configs/layers are changed [compiling every step as instructed by the author] not sure if it's me or the code itself but any case, sticking with this one as imo your code is literally perfect and handles everything great with my config and layers.. so thank you! will let you know about the speeds with step3 as well and keep u in loop wen everything goes live, lack of tezos info might force me to go with sol or eth network as i can handle those contracts myself but let's see, will keep you in loop.. thanks a ton man, truly appreciate your work and time!
from animated-art-engine.
Good news, I was able to implement Tezos metadata! To preface I don't know if/how Tezos supports gifs but I did my best and the code works (as in it outputs displayURI, json, and thumbnailURI). Please see https://github.com/jalagar/Generative_Gif_Engine#tezos-metadata for the README for how to run it (TLDR modify tezosConfig.js, run make tezos
and make update_json_tezos
). You will need to download the latest code.
Use with your own discretion, you may need to ask somewhere on the Tezos forums or the Hashlip's discord if it does not work.
But it will look something like this after everything is ran.
Would appreciate any support on my Twitter https://twitter.com/jalagar_eth and on my current NFT project https://twitter.com/FitFriends_NFT :)
from animated-art-engine.
Feel free to leave comments, but I am not familiar with Tezos and copied most of the code from https://github.com/nftchef/art-engine/tree/nested-folder-structure/Tezos
from animated-art-engine.
Hello, I tested out a few runs and everything seems to be perfect in terms of the tezos metadata, so thanks a lot for that.. truly! however.. are you aware that the display and thumbnail [preview] images that generate with the tezos metadata are static images, the format is still .gif but the the images are static and not animated gifs like they should be for an animated project. Is there a way I could fix this according to your insight? Thanks!
from animated-art-engine.
Hi yes I saw that, I didn't really know what the display and thumbnail images are supposed to be. Are they supposed to be gifs or static? I didn't know if Tezos supported gifs for the display/thumbnail. If you want to make them animated check out step2_spritesheet_to_generative_sheet/utils/resize.js and see if you can make it work so they're animated. Let me know if you want to create a PR!
from animated-art-engine.
Going to reopen this to support the resizing
from animated-art-engine.
Hi @bxbxyxgx I have fixed the issue with the resize, I created a resize.py file and rewrote it in python. The logic is only 10 lines long, check the PR if you want to take a quick look #57. You will still use the same make tezos
but please fetch the latest code.
As for how to improve step2, it depends how many layers you have and how large each layer file is. That seems pretty long, but you're right there could be improvements where you can use more CPU by taking advantage of JS node multi-CPU https://nodejs.org/api/cluster.html. Please create another issue to track that, that is much harder to fix than adding Tezos metadata.
from animated-art-engine.
Feel free to reopen this issue if you have issues with Tezos, otherwise create another issue to track the JS CPU.
from animated-art-engine.
You can see the concept here, I shared the post on my twitter as a peak into what I had been working on : https://twitter.com/iambxbxyxgx/status/1518232300059869184
Output according to my estimate will be around 250-300GB I think lol
Basically doing Avatars to later implement AR with the help of someone who is into AR art.. basically wearable avatars.
I was also wondering the same thing, since basically every attribute in every trait is essentially 30 PNGs each lol 30fps and one second loop i went for, wanted to do more but I knew that would be literally massive when turned into gifs so stuck with 30 frames for each attribute.. also, the size issue was very limiting in terms of how many attributes I actually wanted to go for, but the kind of thing I am going for.. static images were not an option.. so squeezed it all up as much as i could yet i agree still it's a lot in terms of size.
The colors and the final gifs in terms of quality is pretty great i would say, better than the standard [high quality] ways to make gifs but yes like you said, not popping as much as they would with mp4 but still, pretty great imo! Also I think if the layers could be a format such as AVI that supports alpha transparency and after generating process the output can later be converted into mp4 similar to the spritesheet into gifs conversion happening but again, no clue if all this even would be possible.
Thanks I will check it out and try to use it as I just cancelled the step 3 and decided to make the change that I wanted to anyway, figured it's better to do it right now than keep thinking about it lol and hey thanks a bunch for your time and for your amazing work!
from animated-art-engine.
Thank you! Yes I came across that, but your work seems to be what I could understand and follow well enough.. will try and test that out as well while my artwork is being generated, just to see how it is in terms of speed.. gonna render some layers as mp4 as it says it accepts layers in that format to see how it handles it.. will let you know as well. Cheers and thanks for your time!
from animated-art-engine.
Yes that's exactly what I had in mind and did the same after your recent update, thanks a lot for the support.. for real! And yes def I will be hitting you up on the twitter and credit your work as for me personally the project wouldn't come alive otherwise so thanks again, plus once I decide which route to take.. i will be sending you some avatars as well to thank you, i hope you'll like them.. excited for this!
Yap i guess that's what i will have to do, i initially chose tezos because on eth seemed like there's literally a crowd of projects every day and many disappoint and don't follow up or leave after initial mints and with sol i heard there seems to be a lot of issues with some people when interacting with the contracts so thought tezos is better for me and the collectors, but the lack of info and some interactions with devs who have been pretty tricky with their demands [5k for a contract + a month of time kinda thing] lol i guess i will have to go for sol or eth but still looking into tezos but the languages are quite tricky.. though at last i found a decent guide : https://www.npmjs.com/package/@oxheadalpha/fa2-contracts .. let's see if i will be able to navigate through this, there are some services [artforge] that seem to take roughly 5% out of the initial mint and handle the contract and mint page but again, i would rather have this arrangement with someone directly instead of a service that handles it behind the curtains if you know what i mean. Fingers crossed!
from animated-art-engine.
Thank you so much look forward to the art :) 🥳 Good luck! 🤞
from animated-art-engine.
Got it, yea GIFs still are limited by color wheel :(. I do want to investigate mp4 but have a backlog of stuff to do
from animated-art-engine.
Great you're welcome!
from animated-art-engine.
This is amazing, I will be testing this later today and will get back to you.. thanks a lot for this! Truly appreciated!
from animated-art-engine.
Sounds great! You're welcome!
from animated-art-engine.
Hey, thanks for getting back to me. They are like preview images, prolly for optimization when displaying on marketplaces or collection page so the entire page isn't loaded with gigs of data for no reason unless someone opens an individual token.. most projects I have seen drop the size almost halfway for displayuri and then again for thumbnailuri.. so let's say main artwork is 1080p, displayuri usually is 720p and then thumbnailuri is 360p or 350x350 etc so the preview images aren't larger than they are needed to be for the marketplaces.. and yes for animated projects they are gifs so the tokens display as they are in preview.
I am not sure how I could do that since I lack basic understanding of code but still I will dig around and see what I can find, I have seen some smaller projects [less tokens overall] to use the same link [artifacturi] for all the uris meaning the previews are the larger file sizes as well and I am pretty sure that's not a good idea when it comes to optimization.. I will get back to you if I can somehow make it work and on the other hand if you can, that would be great too if you could let me know how to achieve this. Thanks again!
from animated-art-engine.
Sounds good I'll take a look later this week. The code already does the shrinking by 50% and 75%, but something to do with resizing is not working with gifs. Its probably because the resize logic was written for png files using javascript, and we'll have to just rewrite it in python using PIL + gifski and regenerate the gifs.
from animated-art-engine.
Thanks that would be great, I will try to dig around myself too and if I am able to do it somehow I will let you know as well.. and I agree the resize seems to be just fine, it's just that it freezes the gif to a static image like a png as you pointed out. Thanks for your time !
from animated-art-engine.
Thank you.. I came across gifski docs and instructions to resize but no clue where and how to implement the function, i am very ignorant when it comes to code. Also, unrelated but is it normal that while running step 2 .. my cpu utilization hovers around only 10% and aprox takes 30 sec to generate 1 token.. and aprox 12 hrs to generate 2k tokens? cuz I was wondering if my cpu isn't being utilized properly to generate quicker? also each spritesheet generated with step is approx 40mb, in case the size has to do something with the speed.
from animated-art-engine.
Hey man thanks a lot, FR! I will once I generate everything, it's half way there lol but yeah I think I am not gonna bother you with opening an issue on this cuz if it isn't already there I guess it's working alright for people and maybe there's something up on my end and anyway the code itself is functioning perfectly so that's pretty cool and all is good I guess. Thanks again, i will let you know once I am done with all the steps and it's finalized just to give you an update that everything's perfect from start to finish.. currently looking for a smart contract dev which in itself has been hectic cuz I am only familiar with the eth network but tezos not so much and there's pretty much no guides for noobs like me. Cheers and thank you!
from animated-art-engine.
Great! I will still open an issue, I'm going to have to improve step2 time when I generate my collection so selfishly I want a faster way.
Glad you enjoyed it, yea there's not very many Tezos smart contract devs, but good luck!
from animated-art-engine.
Well that would be a plus then, been 2 days for me but only 500 left to generate so almost done.. not sure if the step3 [to gifs] would take just as much time but whatever the case, I am glad it's working well and as it should so thanks for that! tho will keep an eye if you r able to make it faster that would be a plus yes!
Oh def very less ppl out there i think, and I am kind of hesitating to get someone without any presence anywhere cuz I've heard about a lot of weird stuff lately with minting pages and crowdsales and that scares me for folk who will be minting so just being careful, and no luck so far.. fingers crossed! Made the web page and minting layout etc as i know that much, now just the contract is left out.. everything else is ready, searching searching! Thanks to you, the big part is taken care of ! Cheers!
from animated-art-engine.
Oh man! sorry that is very slow 🥲 Let me see what I can do. That would be terrible if you wanted to update a layer or change something and then had to wait 3 days again. You might want to compress the layer files maybe so they're smaller. How many layers are you working with?
Step 3 should be faster (but depends again on the factors above).
Yea totally that makes sense, good luck!
from animated-art-engine.
Hey, yapp it is and I am starting to wonder if there's something up with my pc.. never ran code before not sure, though the system i am using is what i use for blender houdini work as well as gaming and it's pretty fast..
cpu is i9 12900K with a 3080 gpu, m.2 ssd and 64gb ram if that matters.. but thing is if it's working alright for other people that makes me wonder if it's my pc, but still all cool i would say cuz fundamentally everything works great and that's enough for me.. thanks to you!
step 3 seems to run at the same pace, and yes actually there is a layer i would like to change [a very miniscule change tho] now that I am seeing the gifs but like you said, that's gonna be another 3 days lol what I have decided is to let everything run and do it's thing while i look for a dev, and i probably will have time to generate everything again making that change i want, though it's not something that breaks the art.. just a little material thing that isn't what i really intended, i have this weird thing for making the final renders precisely as i want.
oh and I have used full lossless compression so the output doesn't have banding issues [there's glow elements] but still the sizes are reduced enough, though iv got a lot of layers.. [aprrox 2 GB that a var is made from] basically 11 traits, 8 of them having 8 attributes each [half common half rare] rest having 4 [BGs and overlays] and all these in 4 colors but the config is that one variation is picking just a set of layers that are that color and then the traits/attributes are what's being randomized if u know what i mean.. so probably the layers are the issue.. like i said, probably something to do on my end and you will have a better picture when you use it to generate your own stuff.
from animated-art-engine.
Wow I can't wait to see your art! Did step3 work ok with the colors? I've never tried it with such giant layers, also the output might be huge if that's the case.
I don't think it's your computer issue, most people are not doing such high resolution art in the space hence why no one else has complained about it. I also wonder if gifs would be appropriate, it might make more sense to have them as mp4s. I want to investigate how hard it would be to output mp4s that's on my todo list, you get smaller files and higher quality colors.
There is a task for step3 to optimize it #33 and use multiprocessing.
from animated-art-engine.
Wow that is incredible, yea I don't think anyone is doing such crazy art with gifs. You could try this repo: https://github.com/Goldo02/gif_and_video_art_engine and see if it works for mp4. Its in C++ and I don't think it has all the fancy NFT chef features, but if you don't want all that, it might work for mp4 and maybe be faster as C++ tends to be faster than JS
from animated-art-engine.
@bxbxyxgx Good news I was able to implement multiprocessing for step 1 and step 3 (step 2 is still slow but that has to be done sequentially because its generating the DNA in order). You just need to download the latest code, set useMultiprocessing
to true and cpuCount
to the CPUs you want to use (I would go with a multiple of 2). This will speed up step 1 and 3 by 4-8x. Sadly step2 will still take a while, still investigating how to increase CPU usage for node, I don't have any good leads. But hope it helps!
from animated-art-engine.
Great, make sure you download the latest code and change the configs! Luckily you can run each step independently so after step2 finishes, download the latest code, changes configs, then run make step3 (or copy and paste the lines) :). Let me know, and again would love any support on Twitter if you enjoyed! Yea ETH or SOL seem to be the move now, gas fees are pretty low due to low volume so it might be the perfect time to deploy contracts.
from animated-art-engine.
Def thanks to you man, appreciate your time and yes will reach out to you soon once everything is set up.. Cheers!
from animated-art-engine.
Hey @bxbxyxgx I got a notification that you were having issues with GIF quality, is that still happening?
from animated-art-engine.
Yes, apologies.. it was my bad, i backtracked what changes i had made and found out it was the use of empty layer 'none' which made avoided the black background.. so in short the glow effect turns into dots [like heavy noise] apparently when there is no solid background color [in my case black] what i did was then change the black bg name from none to 'no' so every other empty layer gets avoided except the black [no] bg. Also, thanks for reaching out.. much appreciated !
Again adjusting a few more layers, cuz upon paying close attention i need to handle the glow in a clever manner cuz it's not really alpha transparency [gif limitations] and if the glow has something behind it from the same layer it looks perfect but if not it gets kinda off so changing a few layers according to that.
from animated-art-engine.
Yap.. and if that happens before I am all set up for deployment and mint then will def try, mp4s would be a plus and could be great in terms of quality also the size i would say.. i think it's gonna be a month or so before it's time to to have a public mint so let's see if you get time soon to look into it, even if not.. i would say your work so far on this has been perfect and very helpful so thanks for that ! much appreciated!
from animated-art-engine.
Related Issues (20)
- DNA exists issue HOT 2
- Grouping and batching doesn't work with new make all that recreates all HOT 2
- audio files
- Canvas/Cairo Issue - can't run 'make all' [canvas.node, 0x0001): symbol not found in flat namespace '_cairo_fill'] HOT 2
- Error with PIL_image HOT 3
- Please help! Can't get this working on Mac arm64 HOT 1
- I've got problem with trait assigned in json file HOT 2
- PermissionError: [WinError 5] Access denied: 'step2_spritesheet_to_generative_sheet/output/images' HOT 1
- No output images in build folder HOT 3
- const incompatible function doesn't work HOT 3
- shuffleLayerConfigurations = true only shuffles the json files, not the gifs
- make all not working
- Step 2 Canvas Size Error? HOT 4
- frame repeats for the first 2 frames HOT 1
- Delete metadata.json file HOT 2
- No GIF export HOT 7
- Error when running Make first time setup command.
- want to add an invisible layer , "NONE" Not Worked
- How to convert Json NFT Metadata to CSV Metadata?
- Width and height of the GIF file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from animated-art-engine.