Readit News logoReadit News
fenomas · 4 years ago
Neat! Reminds me that I once made something similar, except in 3D.

https://andyhall.github.io/glsl-projectron/viewer-vermeer.ht...

(open the link and then click/drag the image)

hmsimha · 4 years ago
This is really cool! I'd be interested in seeing what it looks like to fully drag the image 180 degrees (but can't because the camera resets as soon as the mouseup event fires). Would you accept a small PR to the demo page which does this via a control button instead of on mouseup?
fenomas · 4 years ago
Thanks! Actually I just pushed a fix to make the drag work outside the canvas. No idea why it wasn't that way to begin with.

The really cool thing someone suggested back in the day was, to have it try to match two different images from two different angles. But I never quite found the time to tackle that ;D

rh12503 · 4 years ago
This is amazing! Is there any way to download this in a 3D file format?
fenomas · 4 years ago
Thanks! The answer is: sort of, but not really. The maker page[1] has an "export data" button that writes out the vertex data (as a big series of RGB/XYZ values), which you could easily convert to whatever format.

But if you rendered the data somewhere else, you wouldn't get the right effect unless you replicated the perspective/FOV that I used (which are completely ad-hoc because I had no idea what I was doing).

So currently there's no super-easy way to take the data somewhere else and do something useful with it.

[1] https://andyhall.github.io/glsl-projectron/index.html

scrooched_moose · 4 years ago
Very cool. Images like this are fairly popular in woodworking for low poly pet art:

https://www.reddit.com/r/woodworking/comments/7vcgar/boyfrie...

(search "low poly" on /r/woodworking for a lot more)

DMesh is probably the most popular tool in this space that I've seen, but it's a very manual process (manually select vertexes and it fills the space with the average color).

http://dmesh.thedofl.com/

Yours definitely gives a different look - a bit more aliased - which is interesting. Would be fun to try this one out too.

rh12503 · 4 years ago
For low-poly art, I wonder if there could be a way to only triangulate a specific area. (eg. only the pet and not the background)

Also, if you need something less aliased, check out Triangle [1], a similar and awesome tool!

[1] https://github.com/esimov/triangle

jmkd · 4 years ago
This is great, especially the SF example as it reminds me of Brian Lotti's paintings [1]

A common technique for painters is to establish areas of colour in the scene that are similar even though the eye perceives them differently. For example the shade beneath a tree - while complex in reality - can be easily represented with a single stroke of darker colour.

Zooming in to the SF example [2] you begin to see how this scene could be painted, which makes me think this tool could be a useful guide in painting tutorials.

[1] https://www.booooooom.com/2015/04/08/artist-profile-painter-... [2] https://github.com/RH12503/triangula/blob/main/assets/output...

clusmore · 4 years ago
This looks cool. It reminds me a lot of Primitive Pictures[0], coincidentally also written in Go, which supports other shapes besides triangles as well.

[0]: https://github.com/fogleman/primitive

rh12503 · 4 years ago
Thanks! One main difference from Primitive is that Primitive's shapes can overlap, while Triangula generates a triangulation.
yhoneycomb · 4 years ago
IMO both are cool but your method is way cooler!
jarek-foksa · 4 years ago
Also check out my web app Boxy SVG [1] which integrates both vectorization algorithms as "Triangulate" and "Primitivize" generators [2].

[1] https://boxy-svg.com/app

[2] https://boxy-svg.com/blog/9

JimDabell · 4 years ago
See also: SQIP, which uses Primitive: https://github.com/axe312ger/sqip
elb2020 · 4 years ago
I'm not familiar with Go, but is there anything in the language which makes it a particularly good fit for this type of problem?
rh12503 · 4 years ago
Not particularly, but Go is fast, compiles to small binaries, and supports multithreading with coroutines which works well for genetic algorithms.
adrian_mrd · 4 years ago
Similar project worth checking out is Geometrize [1] also available on GitHub [2]

[1] https://www.geometrize.co.uk/

[2] https://github.com/Tw1ddle/geometrize

chias · 4 years ago
I really like this.

Others have already commented on the utility / impressiveness of the tool itself, but on a completely different front: you also put effort into making a really nice UI. I clicked, fully expecting to fire up a terminal instance with a bunch of args or what have you. Instead I got a polished app that's a pleasure to use. I could realistically share this with my friends and family, not very common for a tool like this.

jonty · 4 years ago
I made something similar that runs in the browser using your webcam, mostly to visualise tracking keypoints.

It works best if you're in a well-lit place.

* https://github.com/Jonty/triangulator

* https://jonty.github.io/triangulator/

rh12503 · 4 years ago
Cool! I'm guessing you use an edge detection algorithm like https://github.com/esimov/triangle?
jonty · 4 years ago
Actually I use FAST keypoint detection, which is used to repeatably find "good" points for tracking using computer vision.

https://en.wikipedia.org/wiki/Features_from_accelerated_segm...

https://opencv-python-tutroals.readthedocs.io/en/latest/py_t...

crazygringo · 4 years ago
This is very, very cool. It would also be amazing as a Photoshop filter.

But separately -- I've often wondered if the pixel grid is really the best way of storing compressed image data, and if something based on triangles couldn't be viable.

Just like progressive JPEG can render broad areas of color followed by filling in details, what if you used progressive layers of semitransparent colored triangle meshes to do the same? Or at least to form a base layer?

HEVC image encoding is already a big improvement over JPEG in that fixed square blocks are replaced by variable-sized blocks. But if we got rid of rectangular blocks and replaced them with flexible triangles?

It might be computationally prohibitive for encoding, and also you'd need to find a really clever way of representing triangles and colors in a minimal number of bits. But curious if anyone here knows whether something like that's ever been attempted.

nitrogen · 4 years ago
I remember seeing an experimental compression algorithm that made everything look like a painting, but I'm not sure how to find it again. It seems likely there have been other attempts at compression through vectorization.