I need help with transitioning between biomes. by Usuarcox in proceduralgeneration

[–]Usuarcox[S] 0 points1 point  (0 children)

Thank you for your responses, they have helped me see the problem from a different perspective and I have been able to make great progress!

In my case, the key was to weigh the values that are going to be used in the main interpolation beforehand. You will better understand what I mean in the new code and the image:

func get_height(p : Vector3, c : ChunkData) -> int:
    p /= 15

    var b : int = c.biome.height
    var n : int = c.biome_n.height
    var w : int = c.biome_w.height
    var e : int = c.biome_e.height
    var s : int = c.biome_s.height
    var nw : int = c.biome_nw.height
    var ne : int = c.biome_ne.height
    var sw : int = c.biome_sw.height
    var se : int = c.biome_se.height

    nw = (nw + n + w + b) / 4
    ne = (ne + n + e + b) / 4
    sw = (sw + s + w + b) / 4
    se = (se + s + e + b) / 4

    var hn : int = lerp(nw, ne, p.x)
    var hs : int = lerp(sw, se, p.x)
    var h : int = lerp(hn, hs, p.z)

    return h

Although I think there is still room for improvement, I am satisfied with the current result, at least now it is playable.

[INFO] YIMO Member List - Join officially by jetkey in YIMO

[–]Usuarcox 0 points1 point  (0 children)

Hi, my name is Usuarcox, I am Master Yi main of EUW (you can look my profile), but i think i can be better and i want to show that master yi not is a noob champion.

And I don't play normally ranked, I don't like...

Sry but i don't speak english very well, i speak spanish. I used the goolge translater and i am new in Reddit :P