|
|
|
|
|
by frading
870 days ago
|
|
Thanks a lot. And I've had some thought about making this infinite, but it's a bit harder! The generation is inspired by what Oskar Stålberg has done for his game Townscaper. It is done with those steps:
- start with triangles (ideally in an hexagonal pattern).
- merge pairs of triangles into quads, randomly leaving some as triangles.
- we subdivide both quads and triangles, and end up with quads only.
- smooth the whole to get nicer shapes It can be a bit abstract with just this list, so you can see some videos in my tweet: https://twitter.com/fradingue/status/1712218108826460428 I've also created a webgl engine to solve this type of procedural modeling for the web, and you can see 2 examples scenes where you can play with parameters that affect the shape of the irregular grid:
- https://polygonjs.com/gui/irregular_quads/edit
- https://polygonjs.com/gui/irregular_quad_relaxation/edit |
|