Minetest_game: Experiments with translucent ice

Created on 23 Mar 2018  路  12Comments  路  Source: minetest/minetest_game

screenshot_20180323_031639

screenshot_20180323_031951

screenshot_20180323_032844

^ Ice dungeon high up inside the ice mountain seen below

screenshot_20180323_032939

^ Dungeon entrance is visible

In Gimp i did 'color to alpha' using the dominant blue pixel colour to isolate the 'shine' pixels, then combined this with a plain alpha texture of those blue pixels with opacity 90%.
The high opacity and opaque shine pixels shine emphasise the surface and make the sometimes weird rendering and flicker against water less of an issue.

Even if we don't use a translucent texture in MTG this nodedef will allow texture packs to do so if desired:

minetest.register_node("default:ice", {
    description = "Ice",
    drawtype = "glasslike",
    tiles = {"default_ice.png"},
    use_texture_alpha = true,
    is_ground_content = false,
    paramtype = "light",
    groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3},
    sounds = default.node_sound_glass_defaults(),
})
Engine change needed Request / Suggestion Textures

Most helpful comment

Quick unrelated note: snowblock should be 'paramtype = light' like snow, to transmit some light?

All 12 comments

Quick unrelated note: snowblock should be 'paramtype = light' like snow, to transmit some light?

However i do find the ice mountains look much better completely opaque, and opaque ice does look really good.
But we could still perhaps add the nodedefs to allow this possibility using texture packs.

@paramat Interesting idea, the ice biome is very unique with this effect. Everything that brings additions and improvements to Minetest is good for me.

It would be interesting to insert loot (as for dungeons) in the translucent ice biome, so players can see through the ice and discover hidden treasures. Obviously it is an idea that I want to experiment with my mod, but translucent ice gives new possibilities to the modders.

Paramat I really like your recent ideas on the mapgen, I trust in your power :D

But does it blink?

Yes all visual bugs are present, the high opacity reduces their visibility though.

This was fun to experiment with for a couple of hours but after the novelty finished it wasn't so good, the main point being the ice mountains just look wrong being translucent, they look so much better opaque. Ambient occlusion disappears for the ice and you get isolated dark patches of ambient occlusion on the snowblocks.

I'm not even keen on supporting alpha ice textures due to the visual bugs it causes.

... they look so much better opaque.

We will just have to agree to disagree there. Obviously the bugs make it unacceptable for default, but it looks much better to me when you can see through the ice, and it opens up all kinds of extra building potential.

It is a very sad thing that the chance of these bugs being addressed seems so low.

I personally don't like translucent ice, because it looks unreal and so bad to me. Maybe if the ice followed beer's law it would be better - it should look more opaque the more ice the light travels through. This would require shaders and an engine change, unfortunately.

Well, my personal wish for it is as sea ice rather than mountains, and I'd be completely happy having more than one type of ice for this purpose. Applying beer's law would of course be ideal, but you already stated the issues there...

Can we just magically stop the flickering at least? Pretty please? Somehow?

The first 2 screenshots look ok to me, but i positioned myself to not see a bug, in-game there are more noticeable bugs, parts of ice corridors disappear in weird ways or appear rendered back to front, there is some flickering between water and ice. I think this would have to wait for z-sorting to be implemented.

How about using allfaces?
You can see stuff behind it but not inside
Screenshot_2019-03-15-13-52-26-1
Screenshot_2019-03-15-13-52-36-1
There's actually an empty space inside here
2019-03-15 13 56 15
With torches on the walls /

Screenshot_2019-03-15-13-53-06-1
This eliminates the seeing caves problem
And the ice layers up and gets more and more opaque (in theory)

That will still have the same translucency issues, but more importantly, allfaces with translucency will render every iceface inside a volume so will be extrememly intensive to render.

If the flicker ever gets fixed, one way to approach this could simply be two layers of ice - filler layer translucent, and the stone layer with current ice below it.

Was this page helpful?
0 / 5 - 0 ratings