More Terrain Experiments

I am still in my long, drawn-out pursuit of a semi-procedural terrain system.

My most recent experiments have involved trying to produce a single block of triangles which tessellate.  In this way, I can re-use the triangulation with different elevations for each point (similar to the island terrains I did previously, but INFINITE).

I should be able to produce a regular, tessellating block of equilateral triangles, and then apply the edge-rotation and relaxation system.  The beauty of the wrapping would be that one edge of the graph would pull outwards on the opposite edge, keeping everything from collapsing inwards.

What I have discovered over the hours I've invested so far is: building a data model for a wrapping triangle graph is chuffing maddening.  I have twisted my brain into so many knots it hurts.

I've tried making the edges take account of the wrapping, then the points themselves, then the triangles.  The closest I've got is having a two-layer point system: fundamental points which take account of the position within the original block, and 'wrap points' which include a larger-scale grid offset (e.g. the north-west point in the next repeat to the east would have a grid offset of (1,0), but still use the same base location).

To try and do away with data redundancy, I've got rid of the separate 'edge' elements as well - I'm trying to keep track of everything in the triangles (storing the points in clockwise order).

I've got the the point where all the rotations work within a single grid cell, but the edge rotations still don't work on the edges.  I suspect it's because it's not taking account of the grid offset when working out which triangles are adjacent after the rotation.

BRAIN HURTS.

...so I'm going to leave it a bit and try again some other time.

Comments

Popular posts from this blog

Micro:Bit and SPI display

DCS World with TrackIR under Ubuntu

Cardboard Mock-up of USB Joystick