New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docs to allow non-liquid nodes to use "liquid" drawtype #14243
Conversation
IMO the opaque water setting is a good example of a too-specific setting hardcoded in the engine. It should rather be re-done. |
"Leaves style" and "Connected glass" would also qualify then. This setting is just as specific as those. I see your point but merging this has no implications on the future for these kinds of settings at all. This PR only changes the API documentation to make this officially supported when it already works. The current specification also reads a bit contradictory:
This part suggests In any case, I think I made a pretty good case for why it is a good idea to support this. I just want the opaque water setting to be able to work consistently with frozen biomes. |
If someone knows why the API documentation was written like this please enlighten me about that. For me this works entirely without any issues for all for the Minetest versions I tested (5.9-dev, 5.8, 5.6). I also think rejecting this without providing a good alternative would be a bad idea because then games will have to find ways to get the same behavior in non-sanctioned ways. |
probably @Wuzzy2 knows |
Hello! I was the one making the liquid decoupling a while ago and it looks like I had a brainfart here. And yes, if only the liquid/flowingliquid drawtype is used and not anything else the Like, if you want to add a source/flowing liquid node pair but only for rendering purposes, it makes a lot of sense to add the I think a singular Also, this note:
may actually be removed entirely because the only relevant case where you must set this is when BUT! I probably would instead add that the |
To summarize:
|
Thanks for the information! I will update the PR later according to what you wrote. |
a6fd711
to
1861c08
Compare
1861c08
to
d7e5862
Compare
I updated the branch after Wuzzy's comment. I think the docs is pretty clear about what is optional and not now. Also thanks for decoupling the liquid rendering from its gameplay mechanics! It proved to be quite useful for us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
👁️ 👄 👁️ looks good to me, matches what Wuzzy said.
Also matches what the "liquid drawtype test nodes" (which work just fine) exist for in devtest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whatever
Background
In Minetest, water is semi-opaque by default but it can be changed to fully opaque using the
opaque_water
setting.In Mineclonia, we have semi-opaque ice. When a player has
opaque_water
enabled to save FPS on oceans, ice is still translucent which leads to significant FPS drops in frozen biomes.We found a pretty neat solution for this, which is to make ice
drawtype == "liquid"
. It makes ice follow the opacity setting for water. This works for us without any noticable problems.Problem
Unfortunately, this appears to be forbidden according to the Minetest docs:
It states that if
drawtype == "liquid"
then bothliquid_alternative_flowing
andliquid_alternative_source
need to be specified. This is the case even ifliquidtype ~= "none"
.Solution
From testing,
drawtype == "liquid"
works withliquidtype == "none"
even if the liquid alternative fields are not specified.So this PR simply rewords the docs to make this conforming.
How to test
It can be tested that it works without engine modifications using this branch of Mineclonia. One can check this by placing a few ice blocks or do
/findbiome ColdTaiga
to teleport near naturally generated ice.Last words
Using
drawtype == "liquid"
to make opacity togglable for a non-liquid node might seem like a hack, but I think it makes a lot of sense to support for ice which is basically frozen oceans.The reason we do not want to use a game setting for this is because then it would be server-side and not client-side.
I also think there are other games would be interested in using this for translucent ice.