Don't draw faces between glasslike nodes and liquids

For people working on the C++ code.
sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

Don't draw faces between glasslike nodes and liquids

by sapier » Sun Feb 12, 2012 13:20

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
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
dannydark
Member
 
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Sun Feb 12, 2012 14:00

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
Last edited by dannydark on Sun Feb 12, 2012 14:28, edited 1 time in total.
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sun Feb 12, 2012 16:13

@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
Last edited by sapier on Wed Feb 22, 2012 11:16, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 


Return to Partly official engine development



Who is online

Users browsing this forum: No registered users and 1 guest