Commit Graph

11 Commits

Author SHA1 Message Date
Starbeamrainbowlabs
4a6cb2551c
math.pow → ^ 2022-09-18 16:30:27 +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
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
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
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
acb288b984
Fix a ton of bugs but there are lots more to go..... 2020-08-21 13:27:40 +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
Starbeamrainbowlabs
d96f169950
It works! :D 2020-06-10 00:48:39 +01:00
Starbeamrainbowlabs
2dbbeef9c9
convolve: fix a bunch of bugs.
It's still behaving reeaallllly strangely though
2020-06-09 22:00:56 +01:00