oh right two week projects
this last one was polyhedra. as you probably noticed.
all my prior 3d stuff was in the form of triangle soup -- just a bunch of unstructured polygons with no connections between them. that's fine for relatively simple things, but i've been wanting to get more into csg for a while now, and that's something that it's very difficult to do with just a bunch of polygons (difficult to tell what the 'inside' of a polyhedra would be, etc)
also i wanted to generate more complex polyhedra, specifically, and to do that you need to know more information about the overall structure of the polyhedra -- which edges connect to this vertex; what are the adjacent faces to this face; that kind of thing. so that lead me down the path to the winged-edge model format. it took me uhhhh a while to figure out how to think about models in this format, but i think i have it more-or-less down at this point.
the eventual goal is to use shapes in this format plus l-systems to synthesize solid models for stuff i want to render (plants, houses, the usual), but for now i'm mostly just, uh, rendering polyhedra. i still need to implement a lot more operations before i can robustly connect these shapes, but maybe not as many as i thought before. i ended up implementing duals and kleetopes, and i wanted to implement rectification, and when i found that chart i realized that just from duals and kleetopes i can truncate arbitrary polyhedra, and all i'd need to get rectification working is by writing 'join', which i already figured how to do from trying to get a cube subdivided into a rhombic dodecahedron (you get the kleetope of the cube and then you cut every original edge, which performs the join operation. the main issue with this is figuring out the precise heights of the new points so that all the faces remain planar)
so all of this isn't super visually complex yet but it's a decent foundation for finally rendering stuff that's not just prisms and prismoids.
what i also found interesting was that when i was doing my landscape rendering and i did the whole half-offset hexagonal grid thing (boy that link's gonna rot once i delete that tumblr too) there's actually an analogous operation on a polyhedra. i can make big polyhedra with lots of hexagonal faces (and some number of pentagonal faces) but i kind of wanted them to be offset in the same way, so that there were lots of straight lines along the grid. turns out it's literally the same operation, rectification, and it's not entirely out of the question that i could implement that. so that's nice.
the other thing i wanted to make big complex polyhedra with a solid structure for was to see if i could extract their face data as a graph and use that to run my landscape generation graph algorithm on them. i think... the way it would have to work would be very different on a planetoid vs. just slapped onto an infinite plane, but it's still potentially doable. i really need to update my graph generator setup before i do anything with it, since it's always been a little too simple and poorly-designed to do complex generations in any kind of time.
this last one was polyhedra. as you probably noticed.
all my prior 3d stuff was in the form of triangle soup -- just a bunch of unstructured polygons with no connections between them. that's fine for relatively simple things, but i've been wanting to get more into csg for a while now, and that's something that it's very difficult to do with just a bunch of polygons (difficult to tell what the 'inside' of a polyhedra would be, etc)
also i wanted to generate more complex polyhedra, specifically, and to do that you need to know more information about the overall structure of the polyhedra -- which edges connect to this vertex; what are the adjacent faces to this face; that kind of thing. so that lead me down the path to the winged-edge model format. it took me uhhhh a while to figure out how to think about models in this format, but i think i have it more-or-less down at this point.
the eventual goal is to use shapes in this format plus l-systems to synthesize solid models for stuff i want to render (plants, houses, the usual), but for now i'm mostly just, uh, rendering polyhedra. i still need to implement a lot more operations before i can robustly connect these shapes, but maybe not as many as i thought before. i ended up implementing duals and kleetopes, and i wanted to implement rectification, and when i found that chart i realized that just from duals and kleetopes i can truncate arbitrary polyhedra, and all i'd need to get rectification working is by writing 'join', which i already figured how to do from trying to get a cube subdivided into a rhombic dodecahedron (you get the kleetope of the cube and then you cut every original edge, which performs the join operation. the main issue with this is figuring out the precise heights of the new points so that all the faces remain planar)
so all of this isn't super visually complex yet but it's a decent foundation for finally rendering stuff that's not just prisms and prismoids.
what i also found interesting was that when i was doing my landscape rendering and i did the whole half-offset hexagonal grid thing (boy that link's gonna rot once i delete that tumblr too) there's actually an analogous operation on a polyhedra. i can make big polyhedra with lots of hexagonal faces (and some number of pentagonal faces) but i kind of wanted them to be offset in the same way, so that there were lots of straight lines along the grid. turns out it's literally the same operation, rectification, and it's not entirely out of the question that i could implement that. so that's nice.
the other thing i wanted to make big complex polyhedra with a solid structure for was to see if i could extract their face data as a graph and use that to run my landscape generation graph algorithm on them. i think... the way it would have to work would be very different on a planetoid vs. just slapped onto an infinite plane, but it's still potentially doable. i really need to update my graph generator setup before i do anything with it, since it's always been a little too simple and poorly-designed to do complex generations in any kind of time.