How can we make it work with command line interface?
Do you mind to explain step by step?
- Did you run the creation of image N times with different t, then joined all together
- What you use to convert frames into vid?
- Openscad has this feature?
How can we make it work with command line interface?
Do you mind to explain step by step?
Openscad has an animation mode, which cycles $t
between 0 and 1 in small increments. If you enable it and check Dump pictures
flag, it will start saving frames in current folder.
Or you can run openscad --animate 60 ./a\ good\ version\ of\ the\ logo.scad --camera 0,0,0,0,0,0,500
After that you can glue them together using ffmpeg — ffmpeg -r 30 -i 'frame%05d.png' mow.mp4
and there you go
My implementation is a bit hacky, but I’m happy with the flexibility.
nix run github:cab404/genix7000#to-image -- mad.mp4 --animation \
'{
thick: ($thick + $i / 2),
num: ($num + $i / 10),
rotation: ($rotation + $i / 2),
angle: ($angle + $i / 2),
clipr: ($clipr + $i / 10),
cliprot: ($cliprot + $i / 10),
# camera: $"0,0,(1200 - $i * 15),0,0,0"
}'
edit: updated command to point to repository now that is merged
Please link it. I already tried plymouth before, I can give that one a shot, looks nice.
It turned out OpenSCAD is not that good exporting transparent PNGs. There is a way in exporting colored SVGs and then rendering them to PNGs, but I need to fix exporter for that — and inkscape broke their scripts again
You can use #to-image for that.
nix run github:cab404/genix7000#to-image -- bla.svg --num 7 "\#cd3535" "\#5d3555" "\#cd5555"
nix run github:cab404/genix7000#to-image -- --help # to see all args
If you need to export to SVG, with your already defined parameter set (.json), change the to-image.nu lines:
And run
nix run .#to-image -- bla.svg "\#cd3535" "\#5d3555" "\#cd5555"
Now that I’m noted that I’m not passing camera to scad command of line 132
Also, let me know if a PR to take this 3 from command line makes sense.
Note, svg didn’t work with named colors: gray, cyan, etc
I’ve made animation.nu
script to easily export transparent animation frames. It yields far better results than bg removal, and is really quick.
It is intended to be hacked in place, so just clone the repo :)
So yeah, now we can do things like that no problems
and obviously, an evil soviet occult pentanix
That second one would be reeaally nice as a boot animation , maybe with some other animation to make it longer!
And also as a cursor loading animation
started to hack into plymouth scripting language, and made my own theme!
~two and a half years later~
this is such a happy project! Thank you!
You still go the params that generated that? It’s really cool
Well, it’s not exactly customized with parameters for that one — I’ve added some extra rotations in other functions as well. So i’ve just copied it with all edits, since it’s kinda frequent that people want presets :)
That’s a bit different version though (one I use right now), but you can play with rotation, length and aperture parameters to get it back to what it was in above gif.
Save it as gif and upload to telegram desktop, is trippy
Please add your animations to repository README
Also, a link to this post for more discussion
Wonder if was this evil magic that cast the curse over Nix community recently