Entry 11 - Creation of Swamp

The swamp is another biome that I had to implement. The difficulty here, as always, is to generate its procedurally using algorithms, rather than drawing by hand. There were no problems with generating the landscape and placing the vegetation - the algorithms that I used before to create other biomes worked fine here. But I couldn’t make the surface of the water look like a swamp.

Clearly something is missing. I know! Duckweed!

Yes, it’s better now, but I came across a new problem - the sharp edges of duckweed on the border between water and ground. I tried to mask this edge with the texture on the terrain, but that didn't help much. Then I decided to hide the border using swamp debris. For this, I prepared several models of individual strips.

I can find out the exact border between water and ground using the Marching Squares algorithm, knowing the height of the landscape at each point and the water level.

I went through all the borders, placed points with an equal interval, and paved the resulting segments with elements of swamp debris.

Seems fine, but sometimes sections of the border quite far get out beyond the boundaries of one debris element. Therefore, as a final refinement, I select all the points on the boundary for each element and define the line that best approximates these points. Then I move the selected item to this line.

Now the result is quite fine with me.

Write a comment

Comments: 25
  • #1

    Biddiss (Sunday, 05 January 2020 12:15)

    It looks very realistic; great job!

  • #2

    lxbfYeaa (Monday, 02 December 2024 23:13)

    20

  • #3

    lxbfYeaa (Monday, 02 December 2024 23:17)

    20

  • #4

    lxbfYeaa (Monday, 02 December 2024 23:18)

    20

  • #5

    lxbfYeaa (Monday, 02 December 2024 23:18)

    20

  • #6

    lxbfYeaa (Monday, 02 December 2024 23:19)

    20

  • #7

    lxbfYeaa (Monday, 02 December 2024 23:19)

    20

  • #8

    lxbfYeaa (Monday, 02 December 2024 23:20)

    20

  • #9

    lxbfYeaa (Monday, 02 December 2024 23:20)

    20

  • #10

    lxbfYeaa (Monday, 02 December 2024 23:21)

    20

  • #11

    lxbfYeaa (Monday, 02 December 2024 23:21)

    20

  • #12

    lxbfYeaa (Monday, 02 December 2024 23:22)

    20

  • #13

    lxbfYeaa (Monday, 02 December 2024 23:23)

    20CharxeUV

  • #14

    lxbfYeaa (Monday, 02 December 2024 23:23)

    200'XOR(20*if(now()=sysdate(),sleep(15),0))XOR'Z

  • #15

    lxbfYeaa (Monday, 02 December 2024 23:24)

    20-1); waitfor delay '0:0:15' --

  • #16

    lxbfYeaa (Monday, 02 December 2024 23:24)

    20-1) OR 922=(SELECT 922 FROM PG_SLEEP(15))--

  • #17

    lxbfYeaa (Monday, 02 December 2024 23:25)

    20*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)

  • #18

    lxbfYeaa (Monday, 02 December 2024 23:25)

    20

  • #19

    lxbfYeaa (Monday, 02 December 2024 23:26)

    20

  • #20

    lxbfYeaa (Monday, 02 December 2024 23:27)

    20

  • #21

    lxbfYeaa (Monday, 02 December 2024 23:27)

    20

  • #22

    lxbfYeaa (Monday, 02 December 2024 23:28)

    20

  • #23

    lxbfYeaa (Monday, 02 December 2024 23:28)

    20

  • #24

    lxbfYeaa'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||' (Monday, 02 December 2024 23:29)

    20

  • #25

    lxbfYeaa (Monday, 02 December 2024 23:29)

    20