Page 1 of 1

Fluid Dynamics - Canal Creation Conundrum, aka WTH Water

PostPosted: Thu Mar 21, 2013 00:39
by bdjnk
Okay, so I may have gone a bit overboard with the title (haha, very punny). As a new Minetest user, and someone new to sandbox gaming generally, I was enjoying myself thoroughly, until I tried to craft a canal. It doesn't work, at least not by any method I attempted.

Here is a canal hewn into the coast from the ocean:

Image

This is with all (liquid related) settings left on default. Don't get me wrong, this effect is awesome in caves, but doesn't behave as expected in other contexts, as you can see.

I did try figuring out these minetest.conf options, but they don't seem to work quite right...

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
# Constant volume liquids
liquid_finite = false

#Update liquids every .. recommend for finite: 0.2
liquid_update = 1.0

# When finite liquid: relax flowing blocks to source if level near max and N nearby source blocks, more realistic, but not true constant. values: 0,1,2,3,4 : 0 - disable, 1 - most aggressive
liquid_relax = 2

movement_liquid_fluidity = 1
movement_liquid_fluidity_smooth = 0.5
movement_liquid_sink = 10


No matter what I do, the effect shown above (water level tapering off) occurs. I can make it less sever / abrupt, but I can't make it behave like real(ish) water and spread evenly.

Even if that is not feasible, solving the issue by other means is also good. Simply, what I want is to be able to construct man made waterways. I know this is possible, because I've seen it done on others' servers.

PostPosted: Thu Mar 21, 2013 00:41
by Traxie21
liquids_finite = true

sometimes when you generate a map with it as false, it gets stuck to false for that map.

PostPosted: Thu Mar 21, 2013 01:33
by bdjnk
Hey, thanks Traxie.

That kinda works, but the flow effect only extends so far and tapers off (probably as a natural result of the flow limits). This is good for performance I expect, but not so good for voluminous canals.

Image

Alright, so I've got a bucket, but that moves a single block of water at a time. Obviously not sufficient for large scale endeavors.

I've also been messing with the other configuration settings while finite is true, but so far... nothing useful.

edit: sorry for getting your name wrong

PostPosted: Thu Mar 21, 2013 02:50
by jojoa1997
bdjnk wrote:Hey, thanks Taxie.

That kinda works, but the flow effect only extends so far and tapers off (probably as a natural result of the flow limits). This is good for performance I expect, but not so good for voluminous canals.

Image

Alright, so I've got a bucket, but that moves a single block of water at a time. Obviously not sufficient for large scale endeavors.

I've also been messing with the other configuration settings while finite is true, but so far... nothing useful.
just give it time. Set liquid update to 0.1 and I tried it and it works fine takes a while but works.

PostPosted: Thu Mar 21, 2013 04:13
by bdjnk
Hey jojoa,

I have left it for quite a while and haven't seen the water level even out... What is your liquid_relax set to?

edit: Okay, so with liquid_relax = 1 and liquid_update = 0.1 in minetest.conf the water levels do seem to eventually even out.

I found this Old Style Water thread, which has some code that works for filling up pools and canals really really quickly. I tweaked it a bit (even though this is the first time in my life looking at lua). Anyway, this is what I'm using:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("not_water:substitute", {
    description = "Not Water",
    inventory_image = minetest.inventorycube("default_water.png"),
    --drawtype = "glasslike",
    drawtype = "liquid",
    tiles = {
        {name="default_water_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}}
    },
    special_tiles = {
        -- New-style water source material (mostly unused)
        {name="default_water.png", backface_culling=false},
    },
    alpha = WATER_ALPHA,
    paramtype = "light",
    walkable = false,
    pointable = false,
    diggable = false,
    buildable_to = true,
    post_effect_color = {a=64, r=100, g=100, b=200},
    groups = {water=3, liquid=3, puts_out_fire=1},
    liquid_viscosity = WATER_VISC,
    liquidtype = "source",
    liquid_alternative_flowing = "not_water:substitute",
    liquid_alternative_source = "not_water:substitute",
})


The one issue with this is that if you connect it to any "real" water or let it out of some high place, it will take over, everything. It's very aggressive.

PostPosted: Thu Mar 21, 2013 13:07
by Topywo
bdjnk wrote:Alright, so I've got a bucket, but that moves a single block of water at a time. Obviously not sufficient for large scale endeavors.


To do bigger scale waterprojects, its easier to use 2 buckets of water. Place the 2 water (sources) with 1 block air between them (doesn't matter horizontal/vertical or diagonal). Refill your buckets with the watersource that has been created in the empty/air block between the two watersources you placed.

PostPosted: Thu Mar 21, 2013 20:32
by cheapie
Topywo wrote:
bdjnk wrote:Alright, so I've got a bucket, but that moves a single block of water at a time. Obviously not sufficient for large scale endeavors.


To do bigger scale waterprojects, its easier to use 2 buckets of water. Place the 2 water (sources) with 1 block air between them (doesn't matter horizontal/vertical or diagonal). Refill your buckets with the watersource that has been created in the empty/air block between the two watersources you placed.


Is the inability to do this with lava what 0gb.us is complaining about?

PostPosted: Thu Mar 21, 2013 20:49
by Topywo
cheapie wrote:
Topywo wrote:
bdjnk wrote:Alright, so I've got a bucket, but that moves a single block of water at a time. Obviously not sufficient for large scale endeavors.


To do bigger scale waterprojects, its easier to use 2 buckets of water. Place the 2 water (sources) with 1 block air between them (doesn't matter horizontal/vertical or diagonal). Refill your buckets with the watersource that has been created in the empty/air block between the two watersources you placed.


Is the inability to do this with lava what 0gb.us is complaining about?


Yes.

PostPosted: Thu Mar 21, 2013 21:25
by 0gb.us
Topywo wrote:
cheapie wrote:
Topywo wrote:
To do bigger scale waterprojects, its easier to use 2 buckets of water. Place the 2 water (sources) with 1 block air between them (doesn't matter horizontal/vertical or diagonal). Refill your buckets with the watersource that has been created in the empty/air block between the two watersources you placed.


Is the inability to do this with lava what 0gb.us is complaining about?


Yes.


Yeah, that's my issue. I happen to use a lot of lava in my one large-scale project, and the new changes will pretty much bring my project to a standstill if they reach the stable version.