Page 1 of 1

Low Poly Backgrounds

Posted: Sat Jul 16, 2016 4:30 pm
by MicroMacro
Hey all!
I'd like to experiment with using low-poly graphics. For now, I want to generate a somewhat large lowpoly background (just like http://alssndro.github.io/trianglify-ba ... generator/ does) and draw it to a canvas, so I could parallax it. Im sure it won't look as good as I imagine it in my head, but it's worth a try.

Is there a low-poly generating function out there for lua/Love2D? If so, I'd love to see it.

Thanks!

Re: Low Poly Backgrounds

Posted: Sat Jul 16, 2016 4:49 pm
by zorg
I read some threads here about generating Voronoi graphs, one could use a lib like that to create points with set boundaries (the size of the canvas, for example), number of points can be set, then triangulate everything, order the triangles according to the x/y coordinates of their centroids, then finally, apply a gradient to all the triangles in either the horizontally or the vertically ordered table (or both, though you'd need to combine the two gradients, or store them separately, and combine them later)

That would mostly replicate the effects of the generator you linked, anything else is just finetuning.
Have fun implementing it. :3