Page 1 of 1

Don't draw faces between glasslike nodes and liquids

PostPosted: Sun Feb 12, 2012 13:20
by sapier
I've created a patch that removes drawing of faces between a glasslike node and a liquid. As liquids face is a texture of it's surface this looks really strange if you look through glass. not drawing a face in this case looks much more natural.

Patch is here
https://github.com/sapier/minetest/commit/080c4d78fe5c32234487313fc005aaade13962cc

PostPosted: Sun Feb 12, 2012 14:00
by dannydark
Ahhh excellent, this was bugging me when I was building my sea life centre for all the fish from your animals mod ^_^

EDIT: Linked on the patchsets page http://c55.me/minetest/wiki/doku.php?id=patchsets

EDIT2: Hmmm actually this makes my tanks that are 2 water nodes wide look silly...as now it looks like there is no water in them :( just flying fish lol, but the underwater glass tunnel looks great :D

PostPosted: Sun Feb 12, 2012 16:13
by sapier
@dannydark the problem is water isn't that intransparent in nature, if it's to less water you won't see it at all between two glass plates. I don't have an idea how to fix this in a conveniant way.

EDIT1:
ok ok transparency of water depends on "how dirty is it" in nature but minetest does only have one transparency value

EDIT2:
I've just noticed there aint any transparency value for water at all if you disable fog ... probably this is a point to look at for creating better water effect

EDIT3:
I've reevaluated what i was doing and found a way that's even better than removing the face at all. there already is a special texture defined for water, but by now its same as normal texture. I've added a special flat texture there, just a simple color. I now use this texture as face if glass is submerged
https://github.com/sapier/minetest/commit/aacbfc6a912af0e4076af4883600f801bfd67a66

EDIT4
following commits fix additional errors
https://github.com/sapier/minetest/commit/27500b764fe566ce0f10baaffd69ef3fb0e9f165
https://github.com/sapier/minetest/commit/3acc6fd40efed0a967381a575783e721240cc18b