GeNix7000: Nix Project Logo Generator

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?

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

1 Like

and there you go
mow

2 Likes

blap

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"
    }'

mad

edit: updated command to point to repository now that is merged

3 Likes

Please link it. I already tried plymouth before, I can give that one a shot, looks nice.

1 Like

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 :confused:

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:

  • 121, 134 (-P profile name);
  • 122, 133 (-p parameter set path.json);
  • 126, 135 (the .scad file)

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 :thinking:
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

Tequilas

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 :)

1 Like

mow
mow2

So yeah, now we can do things like that no problems

10 Likes

and obviously, an evil soviet occult pentanix
evilnix

5 Likes

That second one would be reeaally nice as a boot animation :sparkles:, maybe with some other animation to make it longer!

And also as a cursor loading animation :smiley:

3 Likes

started to hack into plymouth scripting language, and made my own theme!

2 Likes

~two and a half years later~

4 Likes

this is such a happy project! Thank you!

2 Likes

You still go the params that generated that? It’s really cool :slight_smile:

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 :)
evilnix2

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.

4 Likes