Commit graph

25 commits

Author SHA1 Message Date
Starbeamrainbowlabs 2af1226b49
port everything else
phew!
2022-09-19 01:16:22 +01:00
Starbeamrainbowlabs 1310dae884
Refactor: Split up terrain.lua, make subtable wea.terrain
This is just the start, if my plans work out.

The eventual aim here is to implement a generic Heightmap2D class, just 
like Vector3.

This will make interacting with heightmaps much easier.
2021-12-31 02:42:32 +00:00
Starbeamrainbowlabs db5d25d1de
//convolve: update matrix & kernel to use Vector3
A lot of the maths remains in the old style, but at least it doesn't 
take a zero-indexed table
2021-12-28 18:31:46 +00:00
Starbeamrainbowlabs c6bae3b7e0
//erode river: fix redefining i in nested loop 2021-07-30 19:44:02 +01:00
Starbeamrainbowlabs ecb846fcfe
//erode river: fix undefined global variable 2021-07-30 18:03:39 +01:00
Starbeamrainbowlabs fa2c0642c1
Fix typo in comment 2021-07-18 20:11:10 +01:00
Starbeamrainbowlabs db7b20d485
Refactor table functions into subtable of wea
Also, you can return a value from dofile()!!!!

This changes everything.
2021-06-28 00:56:29 +01:00
Starbeamrainbowlabs 9b53b73bc9
//erode river: Update docs,rename some parameters for consistency 2021-05-30 02:09:52 +01:00
Starbeamrainbowlabs 74bde4e60c
//erode river: comment debug
...we might need them again in the future
2021-05-30 01:44:00 +01:00
Starbeamrainbowlabs ccf27c8629
Bugfix new //erode river implementation
next stop: docs!
2021-05-30 01:42:06 +01:00
Starbeamrainbowlabs 00a60eba17
//erode → river: Change only 1 height at a time for extra granularity
this also simplifies it a bit too
2021-05-30 00:04:01 +01:00
Starbeamrainbowlabs 9ecdd01914
//erode: initial river algorithm implementation 2021-05-30 00:02:21 +01:00
Starbeamrainbowlabs 17b8f8a555
erode/snowballs: correct comment 2021-05-29 23:20:34 +01:00
Starbeamrainbowlabs 87b7254350
erode: add future comment 2021-05-22 02:36:56 +01:00
Starbeamrainbowlabs 75a5f14f01
//erode snowballs: Fix assignment to global variable; slightly refactor changelog
Sincce we've got a number of bugfixes here and the changelog is getting 
a bit longer, I've split bugfixes up.
2021-05-22 01:39:59 +01:00
Starbeamrainbowlabs 8877e356f0
refactor: refactor utils/strings.lua into multiple files 2021-03-20 01:48:56 +00:00
Starbeamrainbowlabs 56380f149b
heightmap_size: refactor to use { x, z } instead of [0] / [1] 2021-02-26 02:20:53 +00:00
Starbeamrainbowlabs 39103a046f
//maze: fix some areas of generated mazes not being explored 2020-09-28 01:30:15 +01:00
Starbeamrainbowlabs b303f8758a
//erode snowballs: make tweaks & add new noconv param 2020-08-21 22:01:24 +01:00
Starbeamrainbowlabs 07588e0940
erode/snowballs: Add comment 2020-08-21 21:00:45 +01:00
Starbeamrainbowlabs fd5804dd9c
//erode: Finish the initial round of bugfixing, but I'm on the fence about it.
Specifically, I'm unsure about whether I'm happy with the effects of the 
algorithm.
Also, we convolve with a 3x3 gaussian kernel after erosion is complete - 
and we have verified that the erosion is having an positive effect at 
"roughening up" a terrain surface.
It seems like the initial blog post was correct: the algorithm does tend 
to make steep surfaces steeper.
It also appears that it's more effective on larger areas, and 'gentler' 
curves. THis might be because the surface normals are more conducive to 
making the snowballs roll.
Finally, we need to decide whether we want to keep the precomputed 
normals as we have now, or whether we want to dynamically compute them 
at the some of request.
2020-08-21 20:59:50 +01:00
Starbeamrainbowlabs 997eb4d101
fix all the crashes with the new erosion algorithm
......but it doesn't look like it's functioning as intended just yet
2020-08-21 15:21:10 +01:00
Starbeamrainbowlabs acb288b984
Fix a ton of bugs but there are lots more to go..... 2020-08-21 13:27:40 +01:00
Starbeamrainbowlabs cdba38d37d
Start implementing snowball erosion algorithm.
There's still a long way to go - we're only just getting warmed up!
2020-08-20 01:53:26 +01:00
Starbeamrainbowlabs 20ccf321ce
Start setting things out to implement erosion
First up, we're going to attempt to implement a snowballs-based 
algorithm.
Reference: https://jobtalle.com/simulating_hydraulic_erosion.html
2020-08-18 02:11:37 +01:00