News for hackers. Stuff that matters.
Re:Show HN: Write generative fine art in Rust by roxven on Sunday April 12, 2020 @12:24PM (#22849217)
This is a library and CLI for Rust to write generative fine art for print.

I wrote this because writing generative art for print has unique problems that I found myself solving over and over again in standard graphics packages.

For example, a general purpose graphics library should probably compile shaders ahead of time, since compiling them at runtime is slow. When writing art, I want to see them update as I change them so I can brainstorm.

Source code is here: https://github.com/turnage/valora

Features

* Repeatable works at arbitrary resolutions without changing the work

* Type-checked color space management with https://docs.rs/palette

* Managed rngs for repeatable works and controlled rng trees

* Support for using a different, custom GLSL shader for each vector path

* GLSL live coding with "#include" support

* An ergonomic derive-based GLSL uniforms interface

* Animation support for brainstorming and cumulative pieces

Here is a shader written with this: https://www.instagram.com/p/Bh4iIbwgjom/

Here is a vector work written with this: https://www.instagram.com/p/B6wN_sSHtYp/

Re:Show HN: Write generative fine art in Rust by mkl on Sunday April 12, 2020 @07:19PM (#22851776)
Is there a Valora gallery somewhere? Your links here show that it's far more capable than the linked tutorial suggests.

BTW following the link to your site in your Instagram profile leads to an HTTPS error.

Re:Show HN: Write generative fine art in Rust by simias on Sunday April 12, 2020 @07:36PM (#22851862)
Great work!

Do you think it could be suited to do "glitch art" on existing images? I've done things like that in Rust in the past using completely handwritten GL code, for instance: https://axellemanfrini.com/media/Editorial/281115_4_GlitchPl... but it's always a bit cumbersome to reinvent the wheel. Just having shaders auto-reload would be a big time saver actually.

Re:Show HN: Write generative fine art in Rust by Ciantic on Sunday April 12, 2020 @04:38PM (#22850881)
What do you mean with GLSL live coding? Because you need to recompile after all.

I've been wondering where are the non-destructive painting programs, which does not rasterize organic brushes or strokes.

Your attempt could work as a base to build one if it can work realtime sufficiently fast.

Re:Show HN: Write generative fine art in Rust by roxven on Sunday April 12, 2020 @04:57PM (#22850979)
If you have a valora work running and change the GLSL on disk, it will recompile and update in the next frame without your having to relaunch or any inconvenience like that.
Re:Show HN: Write generative fine art in Rust by pengaru on Sunday April 12, 2020 @07:32PM (#22851844)
Presumably they mean something like https://shadertoy.com but native, like the demo scene's Bonzomatic.

https://github.com/Gargaj/Bonzomatic

Re:Show HN: Write generative fine art in Rust by gameswithgo on Sunday April 12, 2020 @06:01PM (#22851315)
shaders. opengl does recompile them but all while your os executable is running. its a very useful and easy thing to set up live shader reloading. much quicker cycles to experiment.
Re:Show HN: Write generative fine art in Rust by alexmorley on Sunday April 12, 2020 @05:47PM (#22851252)
I've been using nannou [1] for these types of projects in rust and really loved it. Could they be interoperable?

1. https://github.com/nannou-org/nannou

Re:Show HN: Write generative fine art in Rust by bennyg on Sunday April 12, 2020 @05:19PM (#22851087)
This is extremely interesting. I just finished a weekend project exploring the very very basics of generating art/music using JS and canvas (shameless plug https://webauthnart.com). The screenshot on the Valora README is fantastic and makes me want to dive even deeper into this subject.

I'm probably more intrigued by a lot of the writing on your site and links to more generative art resources, as Rust isn't something I've spent really any time looking at.

Re:Show HN: Write generative fine art in Rust by chrisallick on Sunday April 12, 2020 @07:30PM (#22851834)
Re:Show HN: Write generative fine art in Rust by zeotroph on Sunday April 12, 2020 @07:19PM (#22851775)
The good old xscreensaver has quite a few which I really want(ed) as high quality prints, e.g. "Substrate[1]". I never got around to making it render into a file, and the screens were too far from 4K back then to make screen grabbing useful. Plus I was too afraid to bug jwz himself :).

1: Crystalline lines grow on a computational substrate. A simple perpendicular growth rule creates intricate city-like structures.

https://duckduckgo.com/?q=xscreensaver+substrate&iax=images&...

Re:Show HN: Write generative fine art in Rust by mkj on Sunday April 12, 2020 @10:00PM (#22852443)
You could ask the original artist/author? "In July 2005, Jared co-founded Etsy, an online marketplace to buy and sell handmade goods"

http://complexification.net/gallery/machines/substrate/

http://complexification.net/programmer.html

Re:Show HN: Write generative fine art in Rust by zeotroph on Monday April 13, 2020 @05:01PM (#22859919)
Interesting, thanks for finding that time capsule. With java applets! Maybe Jared will find the time to snail-mail me a hand quilted version of Substrate ;)
Re:Show HN: Write generative fine art in Rust by Mizza on Sunday April 12, 2020 @07:05PM (#22851690)
This looks quite clean and intuitive, but all projects like this need an extensive to showcase capabilities and get people enthused!
Re:Show HN: Write generative fine art in Rust by gameswithgo on Sunday April 12, 2020 @05:13PM (#22851058)
You could use this to make some interesting genetic algorithm art projects ala: https://github.com/jackmott/evolution (which is more low level and drawing pixels directly with various random operations and algorithms)
Re:Show HN: Write generative fine art in Rust by MattRix on Sunday April 12, 2020 @07:16PM (#22851761)
Would be nice if the page included more examples of what this is capable of.
Re:Show HN: Write generative fine art in Rust by hoistbypetard on Monday April 13, 2020 @04:45AM (#22854150)
Working through the tutorial in the linked post, this initially seems like "nodebox, but less powerful and in rust".

I assume that's not the case at all. Are you familiar with nodebox, and can you explain why someone who uses it might want to switch to this?

Re:Show HN: Write generative fine art in Rust by CUViper on Monday April 13, 2020 @11:24AM (#22856626)
There was a presentation of generative art at RustConf 2019: https://youtube.com/watch?v=Ho3xr4b60Zg
Re:Show HN: Write generative fine art in Rust by sam46 on Monday April 13, 2020 @07:34AM (#22854897)
Re:Show HN: Write generative fine art in Rust by kingkawn on Monday April 13, 2020 @06:26AM (#22854549)
In this context what is “fine art”
Re:Show HN: Write generative fine art in Rust by abductee_hg on Sunday April 12, 2020 @09:39PM (#22852345)
...or just join the demoscene :)
Re:Show HN: Write generative fine art in Rust by david_m on Monday April 13, 2020 @05:41AM (#22854353)
I may get downvoted for this, but why are there so many posts ending with "in Rust"? Surely the content should be interesting enough to stand on it's own, no matter the language
Re:Show HN: Write generative fine art in Rust by 101404 on Monday April 13, 2020 @07:30AM (#22854876)
Then again, why shouldn't it be ending with "in Rust" (or "in Nim" or "in Go", etc)?

After all, HN has a focus on technology and programming. So it seems somewhat natural that readers here will be interested in the technology and programming language of a project.

Re:Show HN: Write generative fine art in Rust by hobofan on Monday April 13, 2020 @07:10AM (#22854769)
For frameworks, the language is a main deciding factor for people, so it makes sense to include it in the title. And Rust seems to popular in HN, so it makes sense it often ends up on the frontpage.