[Mod] Moon realm [0.11.0] [moonrealm]

Post Reply
User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Asteroid mod is looking like an epic float lands. Simple 3D perlin noise but squashed vertically.
Last edited by paramat on Mon Feb 10, 2014 01:16, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

Nice! Could use more smaller asteroids though :-)

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

mauvebic wrote:

Code: Select all

if not env:find_node_near(pos, 1, {'air'}) then env:remove_node(pos) print ("[moonrealm] Air Dissipates")  return end
Just noticed a possible problem here in your air spread ABM ... if you remove node you'll end up with an air node again. You need to add atmosphere?

Another idea is simply setting neighbours to atmosphere and default air, so the ABM only runs on groups of 2 air nodes, single air nodes left over by the buggy atmosphere generation do not spread. If this works this would be the simplest and fastest method.

Code: Select all

if ATMOS and AIRGEN then
    minetest.register_abm({
        nodenames = {"air"},
        neighbors = {"moonrealm:atmos", "air"}, -- ABM active only on 2+ air nodes near atmos
        interval = AIRINT,
        chance = 9,
        action = function(pos, node, active_object_count, active_object_count_wider)
            local env = minetest.env
            local x = pos.x
            local y = pos.y
            local z = pos.z
            for i = -1,1 do
            for j = -1,1 do
            for k = -1,1 do
                if not (i == 0 and j == 0 and k == 0) then
                    local nodename = env:get_node({x=x+i,y=y+j,z=z+k}).name
                    if nodename == "moonrealm:atmos" then
                        env:add_node({x=x+i,y=y+j,z=z+k},{name="air"})
                        print ("[moonrealm] Air spreads ("..i.." "..j.." "..k..")")
                    end
                end
            end
            end
            end
        end
    })
end
Another method i'm considering is more complex, counting neighbouring atmos and air nodes and considering both values before spreading air.

Comets will soon be surrounded by a white hazy atmosphere of water vapour, the comets 'tail'.
Last edited by paramat on Wed Jul 17, 2013 22:23, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

No wonder the same air nodes kept dissipating lol Haven't been getting much sleep during the heatwave :p

I'd go with the air/atmosphere neighbour solution, I could use the extra performance at my end :-)

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

It's warm in the UK ... not hot, we don't know what hot means here.
I noticed you use red lakes a lot ... in v0.4.2 you can set the alpha, colour and viscosity by parameter.
Last edited by paramat on Tue Jul 23, 2013 18:43, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

paramat wrote:It's warm in the UK ... not hot, we don't know what hot means here.

Cometry nucleus inside it's atmosphere:
43c with a side of palpitations and a lovely Castithan pâleur :p

Sweet commet, does it spawn within the Asteroid realm?
Also, will the asteroid realm be part of moonrealm or it's own mod?

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Separate mod with asteroids and comets mixed in one realm.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Comet from outside, using drawtype = glasslike but with an opaque texture, can see out but can't see in.
Last edited by paramat on Wed Jul 16, 2014 14:13, edited 2 times in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Makes me nervous using default air again, i suspect that mapgen bugs will leave large volumes of air behind that will then spread exponentially. So for the moment i'm going to stick to using v0.4.2 moonrealm:air until there is a safer way of using default air. I can live without doors and can code my own spacewheat and spacetrees.

mauvebic, do you get diagonal air leaks through your glass domes? Seems your domes would allow that? I'm considering non-diagonal air movement but that would slow it down a lot.
Last edited by paramat on Thu Jul 18, 2013 03:58, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

realms teleportation system (includes area scrambling and funneling)
Image

Re air, my method of eliminating single air nodes does the trick for me (except for that bug you mentioned where I get rid of air by placing air lol). It's true that using neighbours = atmos,air means the single air nodes would remain, but they wouldn't expand either.

And yes, I have to make domes with a thickness of 3. Checking only up, down, and around would probably fix that. Would also reduce the number of get_nodes and eliminate the need for a triple for loop.

I would also have preferred sticking with realms air since I have to use a Y-height restriction with my method, but it breaks too many mods to be able to build.
Last edited by mauvebic on Fri Jul 19, 2013 00:39, edited 1 time in total.

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

Putting atmos and air in neighbours doesn't work for me.

new abm:

Code: Select all

    minetest.register_abm({
        nodenames = {"air"},
        neighbors = {"group:atmosphere", "air"},
        interval = AIRINT,
        chance = 9,
        action = function(pos, node, active_object_count, active_object_count_wider)
            if pos.y < AIRFLOOR then return end
            local env = minetest.env
            local x = pos.x
            local y = pos.y
            local z = pos.z
            for _, cpos in pairs({{x=x-1,y=y,z=z},{x=x+1,y=y,z=z},{x=x,y=y-1,z=z},{x=x,y=y+1,z=z},{x=x,y=y,z=z-1},{x=x,y=y,z=z+1}}) do
                local nodename = env:get_node(cpos).name
                if minetest.get_item_group(nodename,'atmosphere') == 1 then
                    if not env:find_node_near(pos, 1, {'air'}) then print ("no neighbouring air node found, spreading anyway") end
                    env:add_node(cpos,{name="air"})
                    print ("[moonrealm] Air spreads to "..minetest.pos_to_string(cpos))

                end
            end
        end
    })
Terminal output:

Code: Select all

no neighbouring air node found, spreading anyway
[moonrealm] Air spreads to (-5,4009,19)
[moonrealm] Air spreads to (-3,4009,19)
[moonrealm] Air spreads to (-4,4008,19)
[moonrealm] Air spreads to (-4,4010,19)
[moonrealm] Air spreads to (-4,4009,18)
[moonrealm] Air spreads to (-4,4009,20)
no neighbouring air node found, spreading anyway
[moonrealm] Air spreads to (40,4011,-4)
[moonrealm] Air spreads to (42,4011,-4)
[moonrealm] Air spreads to (41,4010,-4)
[moonrealm] Air spreads to (41,4012,-4)
[moonrealm] Air spreads to (41,4011,-5)
Im guessing only one of the neighbors needs to present, like an OR statement, rather than AND - unless I missed something else.

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Aha ... yes i think it is an OR with neighours.
Your abm seems to spread single air nodes instead of avoiding doing that ... ? Do you need to remove 'air' from neighbors? The abm should only run on air next to atmosphere. I suggest counting up numbers of neighbouring atmos and air nodes and using both values carefully to decide whether to spread.
The reason i'm not using default air is because i often get large bug generated volumes of air at chunk boundaries.
Last edited by paramat on Sat Jul 20, 2013 02:12, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

paramat wrote:The reason i'm not using default air is because i often get large bug generated volumes of air at chunk boundaries.
0.47? In 0.46 I only get the odd single air node here and there. So yeah my code wouldn't be much use for the case you describe :/

In any case I've removed atmospheres. Let's see what happens with 0.48
Last edited by mauvebic on Sat Jul 20, 2013 17:21, edited 1 time in total.

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Yeah 0.4.7 and every past version i have used. The effect is good it creates flat-floored caves through my landscapes, perfect for converting to architecture. I'm actually not sure i want the bug fixed. My best guess is it is cavegen somehow being triggered after lua mapgen.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

I always disable cavegen since it doesn't just place caves but random gravel/dirt/trees too. So that explains why I get single nodes and you get groupings of them.

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

I will try disabling cavegen, thanks.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

I tried looking for your asteroids realm, but i can't find anything on the forums or on your github :(

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Have you tried looking for it in the future? ;)
mauvebic wrote:Nice! Could use more smaller asteroids though :-)
Increasing perlin noise persistence to 0.6 or 0.7 will do that.
Last edited by paramat on Sun Jul 21, 2013 05:58, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Last edited by paramat on Mon Jul 22, 2013 22:56, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

Im having some trouble with realms and lag on a public server :/

How could I speed up generation? i've already removed 2/8 realms, but that's not enough. I though of maybe removing dusts, sticking to 2-3 per realm, or it could be my settings?


[config]

Code: Select all


-------------------------------------------//    Realms
register_realm("vulcan",{
    ONGEN = true, -- (true / false) -- Enable / disable moonrealm generation.

    YMIN = 4000, -- Approx bottom. Rounded down to chunk boundary.
    YMAX = 5000, -- Approx surface. Rounded up to chunk boundary.
    ATMTOP = 6000, -- Exact top of atmosphere nodes (if ATMOS = true).

    OFFCEN = 80, -- 80, -- Offset centre average. Terrain centre average level, relative to base of surface chunks.
    CENAMP = 24, -- 24, -- Offset centre amplitude. Terrain centre is varied by this.
--    HIGRAD = 48, -- 48, -- Surface generating noise gradient above offcen. Controls depth of upper terrain.
--    LOGRAD = 48, -- 48, -- Surface generating noise gradient below offcen. Controls depth of lower terrain.
    HIGRAD = 96, -- 48, -- Surface generating noise gradient above offcen. Controls depth of upper terrain.
    LOGRAD = 96, -- 48, -- Surface generating noise gradient below offcen. Controls depth of lower terrain.
    HEXP = 2, -- 2, -- Noise offset exponent above offcen., -- Crazyness parameters upper/lower terrain, 1 = normal 3D perlin terrain.
    LEXP = 2, -- 2, -- Noise offset exponent below offcen.

    DUSAMP = 0.1, -- 0.1, -- Dust depth amplitude.
    DUSRAN = 0.01, -- 0.01, -- Dust depth randomness.
    DUSGRAD = 128, -- 128, -- Dust noise gradient.

    LHC = true, -- Enable / disable liquid hydrocarbon lakes. 
    LHCLEV = 48, -- 48, -- Liquid hydrocarbon lake level, relative to base of surface chunks.

    ICELEV = 128, -- 128, -- Ice spawns above this altitude, relative to base of surface chunks.
    ICECHA = 1, -- 1, -- Maximum 1/x chance water ice in dust.

    CAVOFF = 0.02, -- 0.02, -- Cave offset. Size of underground caves.
    CAVLEV = 0, -- 0, -- Caves thin above this level, relative to base of surface chunks.
    CAVDIS = 96, -- 96, -- Cave thinning distance in nodes.

    LUXCHA = 7*7*7, -- 7*7*7, -- Luxore 1/x chance underground.
    IROCHA = 5*5*5, -- 5*5*5, -- Iron ore 1/x chance.
    MESCHA = 23*23*23, -- 23*23*23, -- Mese block 1/x chance.

    ATMOS = false, -- Enable / disable tinted atmosphere nodes. 
    ATMALP = 32, -- 16, -- Atmosphere alpha.

    ATMRED = 250, -- 255, -- Atmosphere RGB.
    ATMGRE = 168, -- 148
    ATMBLU = 98, -- 0

    -- Perlin noise for terrain.
    SEEDDIFF1 = 46894686546,
    OCTAVES1 = 6, -- 6
    PERSISTENCE1 = 0.6, -- 0.6
    SCALE1 = 256, -- 256

    -- perlin noise for terrain. 207 / 128 = golden ratio.
    SEEDDIFF4 = 1390930295123,
    OCTAVES4 = 6, -- 6
    PERSISTENCE4 = 0.6, -- 0.6
    SCALE4 = 207, -- 207

    -- Perlin noise for caves.
    SEEDDIFF2 = 9294207,
    OCTAVES2 = 6, -- 6
    PERSISTENCE2 = 0.5, -- 0.5
    SCALE2 = 207, -- 207

    -- Perlin noise for dust depth, average terrain level, dust colour
    SEEDDIFF3 = 93561,
    OCTAVES3 = 4, -- 4
    PERSISTENCE3 = 0.5, -- 0.5
    SCALE3 = 256, -- 256
})

register_realm("andoria",{
    ONGEN = true, -- (true / false) -- Enable / disable moonrealm generation.

    YMIN = 9000, -- Approx bottom. Rounded down to chunk boundary.
    YMAX = 10000, -- Approx surface. Rounded up to chunk boundary.
    ATMTOP = 11000, -- Exact top of atmosphere nodes (if ATMOS = true).

    OFFCEN = 80, -- 80, -- Offset centre average. Terrain centre average level, relative to base of surface chunks.
    CENAMP = 24, -- 24, -- Offset centre amplitude. Terrain centre is varied by this.
    HIGRAD = 48, -- 48, -- Surface generating noise gradient above offcen. Controls depth of upper terrain.
--    LOGRAD = 48, -- 48, -- Surface generating noise gradient below offcen. Controls depth of lower terrain.
    LOGRAD = 96, -- 48, -- Surface generating noise gradient below offcen. Controls depth of lower terrain.
    HEXP = 2, -- 2, -- Noise offset exponent above offcen., -- Crazyness parameters upper/lower terrain, 1 = normal 3D perlin terrain.
--    LEXP = 2, -- 2, -- Noise offset exponent below offcen.    
    LEXP = 2.5, -- 2, -- Noise offset exponent below offcen.

    DUSAMP = 0.1, -- 0.1, -- Dust depth amplitude.
    DUSRAN = 0.01, -- 0.01, -- Dust depth randomness.
    DUSGRAD = 128, -- 128, -- Dust noise gradient.

    LHC = true, -- Enable / disable liquid hydrocarbon lakes. 
    LHCLEV = 48, -- 48, -- Liquid hydrocarbon lake level, relative to base of surface chunks.

    ICELEV = 64, -- 128, -- Ice spawns above this altitude, relative to base of surface chunks.
    ICECHA = 1, -- 1, -- Maximum 1/x chance water ice in dust.

    CAVOFF = 0.02, -- 0.02, -- Cave offset. Size of underground caves.
    CAVLEV = 0, -- 0, -- Caves thin above this level, relative to base of surface chunks.
    CAVDIS = 96, -- 96, -- Cave thinning distance in nodes.

    LUXCHA = 7*7*7, -- 7*7*7, -- Luxore 1/x chance underground.
    IROCHA = 5*5*5, -- 5*5*5, -- Iron ore 1/x chance.
    MESCHA = 23*23*23, -- 23*23*23, -- Mese block 1/x chance.

    ATMOS = false, -- Enable / disable tinted atmosphere nodes. 
    ATMALP = 32, -- 16, -- Atmosphere alpha.
    ATMRED = 0, -- 255, -- Atmosphere RGB.
    ATMGRE = 148, -- 148
    ATMBLU = 255, -- 0

    -- Perlin noise for terrain.
    SEEDDIFF1 = 46894686546,
    OCTAVES1 = 6, -- 6
    PERSISTENCE1 = 0.6, -- 0.6
    SCALE1 = 256, -- 256

    -- perlin noise for terrain. 207 / 128 = golden ratio.
    SEEDDIFF4 = 1390930295123,
    OCTAVES4 = 6, -- 6
    PERSISTENCE4 = 0.6, -- 0.6
    SCALE4 = 207, -- 207

    -- Perlin noise for caves.
    SEEDDIFF2 = 9294207,
    OCTAVES2 = 6, -- 6
    PERSISTENCE2 = 0.5, -- 0.5
    SCALE2 = 207, -- 207

    -- Perlin noise for dust depth, average terrain level, dust colour
    SEEDDIFF3 = 93561,
    OCTAVES3 = 4, -- 4
    PERSISTENCE3 = 0.5, -- 0.5
    SCALE3 = 256, -- 256
})

register_realm("dytallix",{
    ONGEN = true, -- (true / false) -- Enable / disable moonrealm generation.

    YMIN = 14000, -- Approx bottom. Rounded down to chunk boundary.
    YMAX = 15000, -- Approx surface. Rounded up to chunk boundary.
    ATMTOP = 16000, -- Exact top of atmosphere nodes (if ATMOS = true).

    OFFCEN = 80, -- 80, -- Offset centre average. Terrain centre average level, relative to base of surface chunks.
    CENAMP = 24, -- 24, -- Offset centre amplitude. Terrain centre is varied by this.
    HIGRAD = 48, -- 48, -- Surface generating noise gradient above offcen. Controls depth of upper terrain.
    LOGRAD = 48, -- 48, -- Surface generating noise gradient below offcen. Controls depth of lower terrain.
    HEXP = 2, -- 2, -- Noise offset exponent above offcen., -- Crazyness parameters upper/lower terrain, 1 = normal 3D perlin terrain.
    LEXP = 2, -- 2, -- Noise offset exponent below offcen.

    DUSAMP = 0.1, -- 0.1, -- Dust depth amplitude.
    DUSRAN = 0.01, -- 0.01, -- Dust depth randomness.
    DUSGRAD = 128, -- 128, -- Dust noise gradient.

    LHC = true, -- Enable / disable liquid hydrocarbon lakes. 
    LHCLEV = 48, -- 48, -- Liquid hydrocarbon lake level, relative to base of surface chunks.

    ICELEV = 128, -- 128, -- Ice spawns above this altitude, relative to base of surface chunks.
    ICECHA = 1, -- 1, -- Maximum 1/x chance water ice in dust.

    CAVOFF = 0.02, -- 0.02, -- Cave offset. Size of underground caves.
    CAVLEV = 0, -- 0, -- Caves thin above this level, relative to base of surface chunks.
    CAVDIS = 96, -- 96, -- Cave thinning distance in nodes.

    LUXCHA = 7*7*7, -- 7*7*7, -- Luxore 1/x chance underground.
    IROCHA = 5*5*5, -- 5*5*5, -- Iron ore 1/x chance.
    MESCHA = 23*23*23, -- 23*23*23, -- Mese block 1/x chance.

    ATMOS = false, -- Enable / disable tinted atmosphere nodes. 
    ATMALP = 32, -- 16, -- Atmosphere alpha.
    ATMRED = 255, -- 255, -- Atmosphere RGB.
    ATMGRE = 148, -- 148
    ATMBLU = 0, -- 0

    -- Perlin noise for terrain.
    SEEDDIFF1 = 46894686546,
    OCTAVES1 = 6, -- 6
--    PERSISTENCE1 = 0.6, -- 0.6
    PERSISTENCE1 = 0.8, -- 0.6
    SCALE1 = 256, -- 256

    -- perlin noise for terrain. 207 / 128 = golden ratio.
    SEEDDIFF4 = 1390930295123,
    OCTAVES4 = 6, -- 6
    PERSISTENCE4 = 0.6, -- 0.6
    SCALE4 = 207, -- 207

    -- Perlin noise for caves.
    SEEDDIFF2 = 9294207,
    OCTAVES2 = 6, -- 6
    PERSISTENCE2 = 0.5, -- 0.5
    SCALE2 = 207, -- 207

    -- Perlin noise for dust depth, average terrain level, dust colour
    SEEDDIFF3 = 93561,
    OCTAVES3 = 4, -- 4
    PERSISTENCE3 = 0.5, -- 0.5
    SCALE3 = 256, -- 256
})

register_realm("tellar",{
    ONGEN = true, -- (true / false) -- Enable / disable moonrealm generation.

    YMIN = 19000, -- Approx bottom. Rounded down to chunk boundary.
    YMAX = 20000, -- Approx surface. Rounded up to chunk boundary.
    ATMTOP = 21000, -- Exact top of atmosphere nodes (if ATMOS = true).

    OFFCEN = 80, -- 80, -- Offset centre average. Terrain centre average level, relative to base of surface chunks.
    CENAMP = 24, -- 24, -- Offset centre amplitude. Terrain centre is varied by this.
    HIGRAD = 48, -- 48, -- Surface generating noise gradient above offcen. Controls depth of upper terrain.
--    LOGRAD = 48, -- 48, -- Surface generating noise gradient below offcen. Controls depth of lower terrain.
--    HEXP = 2, -- 2, -- Noise offset exponent above offcen., -- Crazyness parameters upper/lower terrain, 1 = normal 3D perlin terrain.
--    LEXP = 2, -- 2, -- Noise offset exponent below offcen.
    LOGRAD = 96, -- 48, -- Surface generating noise gradient below offcen. Controls depth of lower terrain.
    HEXP = 1.5, -- 2, -- Noise offset exponent above offcen., -- Crazyness parameters upper/lower terrain, 1 = normal 3D perlin terrain.
    LEXP = 1.5, -- 2, -- Noise offset exponent below offcen.

    DUSAMP = 0.1, -- 0.1, -- Dust depth amplitude.
    DUSRAN = 0.01, -- 0.01, -- Dust depth randomness.
    DUSGRAD = 128, -- 128, -- Dust noise gradient.

    LHC = true, -- Enable / disable liquid hydrocarbon lakes. 
    LHCLEV = 48, -- 48, -- Liquid hydrocarbon lake level, relative to base of surface chunks.

    ICELEV = 128, -- 128, -- Ice spawns above this altitude, relative to base of surface chunks.
    ICECHA = 1, -- 1, -- Maximum 1/x chance water ice in dust.

    CAVOFF = 0.02, -- 0.02, -- Cave offset. Size of underground caves.
    CAVLEV = 0, -- 0, -- Caves thin above this level, relative to base of surface chunks.
    CAVDIS = 96, -- 96, -- Cave thinning distance in nodes.

    LUXCHA = 7*7*7, -- 7*7*7, -- Luxore 1/x chance underground.
    IROCHA = 5*5*5, -- 5*5*5, -- Iron ore 1/x chance.
    MESCHA = 23*23*23, -- 23*23*23, -- Mese block 1/x chance.

    ATMOS = false, -- Enable / disable tinted atmosphere nodes. 
    ATMALP = 32, -- 16, -- Atmosphere alpha.
    ATMRED = 244, -- 255, -- Atmosphere RGB.
    ATMGRE = 196, -- 148
    ATMBLU = 95, -- 0

    -- Perlin noise for terrain.
    SEEDDIFF1 = 46894686546,
    OCTAVES1 = 6, -- 6
    PERSISTENCE1 = 0.6, -- 0.6
    SCALE1 = 256, -- 256

    -- perlin noise for terrain. 207 / 128 = golden ratio.
    SEEDDIFF4 = 1390930295123,
    OCTAVES4 = 6, -- 6
    PERSISTENCE4 = 0.6, -- 0.6
    SCALE4 = 207, -- 207

    -- Perlin noise for caves.
    SEEDDIFF2 = 9294207,
    OCTAVES2 = 6, -- 6
    PERSISTENCE2 = 0.5, -- 0.5
    SCALE2 = 207, -- 207

    -- Perlin noise for dust depth, average terrain level, dust colour
    SEEDDIFF3 = 93561,
    OCTAVES3 = 4, -- 4
    PERSISTENCE3 = 0.5, -- 0.5
    SCALE3 = 256, -- 256
})

register_realm("qonos",{
    ONGEN = true, -- (true / false) -- Enable / disable moonrealm generation.

    YMIN = 24000, -- Approx bottom. Rounded down to chunk boundary.
    YMAX = 25000, -- Approx surface. Rounded up to chunk boundary.
    ATMTOP = 26000, -- Exact top of atmosphere nodes (if ATMOS = true).

    OFFCEN = 80, -- 80, -- Offset centre average. Terrain centre average level, relative to base of surface chunks.
    CENAMP = 24, -- 24, -- Offset centre amplitude. Terrain centre is varied by this.
    HIGRAD = 48, -- 48, -- Surface generating noise gradient above offcen. Controls depth of upper terrain.
    LOGRAD = 48, -- 48, -- Surface generating noise gradient below offcen. Controls depth of lower terrain.
--    HEXP = 2, -- 2, -- Noise offset exponent above offcen., -- Crazyness parameters upper/lower terrain, 1 = normal 3D perlin terrain.
--    LEXP = 2, -- 2, -- Noise offset exponent below offcen.
    HEXP = 3, -- 2, -- Noise offset exponent above offcen., -- Crazyness parameters upper/lower terrain, 1 = normal 3D perlin terrain.
    LEXP = 3, -- 2, -- Noise offset exponent below offcen.

    DUSAMP = 0.1, -- 0.1, -- Dust depth amplitude.
    DUSRAN = 0.01, -- 0.01, -- Dust depth randomness.
    DUSGRAD = 128, -- 128, -- Dust noise gradient.

    LHC = true, -- Enable / disable liquid hydrocarbon lakes. 
    LHCLEV = 48, -- 48, -- Liquid hydrocarbon lake level, relative to base of surface chunks.

    ICELEV = 128, -- 128, -- Ice spawns above this altitude, relative to base of surface chunks.
    ICECHA = 1, -- 1, -- Maximum 1/x chance water ice in dust.

    CAVOFF = 0.02, -- 0.02, -- Cave offset. Size of underground caves.
    CAVLEV = 0, -- 0, -- Caves thin above this level, relative to base of surface chunks.
    CAVDIS = 96, -- 96, -- Cave thinning distance in nodes.

    LUXCHA = 7*7*7, -- 7*7*7, -- Luxore 1/x chance underground.
    IROCHA = 5*5*5, -- 5*5*5, -- Iron ore 1/x chance.
    MESCHA = 23*23*23, -- 23*23*23, -- Mese block 1/x chance.

    ATMOS = false, -- Enable / disable tinted atmosphere nodes. 
    ATMALP = 32, -- 16, -- Atmosphere alpha.
    ATMRED = 148, -- 255, -- Atmosphere RGB.
    ATMGRE = 255, -- 148
    ATMBLU = 0, -- 0

    -- Perlin noise for terrain.
    SEEDDIFF1 = 46894686546,
    OCTAVES1 = 6, -- 6
    PERSISTENCE1 = 0.6, -- 0.6
    SCALE1 = 256, -- 256

    -- perlin noise for terrain. 207 / 128 = golden ratio.
    SEEDDIFF4 = 1390930295123,
    OCTAVES4 = 6, -- 6
    PERSISTENCE4 = 0.6, -- 0.6
    SCALE4 = 207, -- 207

    -- Perlin noise for caves.
    SEEDDIFF2 = 9294207,
    OCTAVES2 = 6, -- 6
    PERSISTENCE2 = 0.5, -- 0.5
    SCALE2 = 207, -- 207

    -- Perlin noise for dust depth, average terrain level, dust colour
    SEEDDIFF3 = 93561,
    OCTAVES3 = 4, -- 4
    PERSISTENCE3 = 0.5, -- 0.5
    SCALE3 = 256, -- 256
})

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Generation is slow due to the slowness of 'add node' 'get node' and 'remove node', this is what the luavoxelmanip addresses. On a server, my guess is the lag is due to the many players exploring and generating terrain at once. I doubt removing dusts or other simplifications will make any noticeable difference, it seems to depend on the volume of surface chunk nodes added. Once 0.4.8 is out i will rewrite the mod to use the luavoxelmanip, this will make generation much faster. In the meantime you could pre-generate terrain (hard work) or adjust the parameters to minimise the volume of terrain in the surface chunks (less epic terrain).
Last edited by paramat on Tue Jul 23, 2013 17:05, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

You could also increase the size of caves and the cave thinning distance to make the realm full of holes and canyons. A realm that is a flat-ish plain with occasional extreme spiky mountains? Again this reduces the number of nodes added in the top 2 'surface chunks'.
If you run 6 realms with this slow lua mapgen and on a server then it's going to lag a lot until i can voxel ma nips. I suggest going for quality over quantity and have 3 or 4 realms.

I like your 'do not call me' signature haha ;)
Last edited by paramat on Tue Jul 23, 2013 19:11, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

I saw a screenshot of a Minecraft 'red rock' biome and started experimenting with undulating layers of rock and curvy cliffs ... i'm using a 3D perlin noise to select between 2 different terrains, almost a 3D version of mapgen V6 ...
Last edited by paramat on Mon Feb 10, 2014 01:17, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

that landscape looks epic :)

User avatar
paramat
Developer
Posts: 3679
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

That's cool you like it. I stared at the mapgen V6 C++ code for a while and eventually understood it. 4 2D perlin noises: there are 2 noises that create 2 terrains that are switched between using the 'height select' noise, the switching creates the cliffs, the steepness of the switch is defined by the 'steepness' noise.
The lack of 3D perlin noise means no overhangs or floating islands (other than ones created by cavegen removing the base of a structure).

I discovered that MGV7 has perlin noise persistence varied by another perlin noise, so terrain will vary between smooth (persistence = 0.5) and crazy (0.7).
Last edited by paramat on Fri Jul 26, 2013 20:23, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

Post Reply

Who is online

Users browsing this forum: Ragiowan and 10 guests