Page 1 of 1

Drawing opposite side of surfaces

PostPosted: Sun Oct 13, 2013 19:25
by JackGruff
If you look at a leaf block and walk around it, you will notice that MT is only drawing the outside surfaces.

I propose an option that lets the game draw both sides for blocks which use textures which use transparency. I understand that the reason way things are is because it's inefficient for the game to render inside surfaces. So I suggest that blocks are able to request this from the game if they want.

The user should still obviously be able to switch off the feature completely.

This feature should enhance the immersive aspect of the game.

Thanks for reading.

-Jack.

PostPosted: Fri Oct 25, 2013 10:56
by Wuzzy
It sounds like this feature is more or less already implemented, but I am not sure.

It mostly depends on the node definition, precisely: the drawtype: http://dev.minetest.net/Node_Drawtypes
It seems the drawtype “allfaces_optional”, which is the drawtype of leaves, is what you want but I am not sure. This drawtype supposedly draws the backfaces of a semi-transparent node only if you activated “fancy trees” (“new_style_leaves” in minetest.conf). But in 0.4.7 reality you rightfully observed that it hides the backfaces. The official documentation does not hold true here.

So either the documentation is wrong or we have a bug here.

PostPosted: Fri Oct 25, 2013 13:53
by PilzAdam
Wuzzy wrote:So either the documentation is wrong or we have a bug here.

First of all the dev wiki is not the official documentation (lua_api.txt is).
The doc only says that all faces are drawn, it doesnt say anything about backface culling, which is what JackGruff is talking about if I understand him correctly.

PostPosted: Fri Oct 25, 2013 22:05
by paramat
This is unlikely to be popular because people are already always complaining about how leaves lower FPS so much when jungles or large trees are used. If anything leaves need a simpler drawtype such as a normal node with a non-transparent texture.

PostPosted: Sat Oct 26, 2013 09:20
by Wuzzy
First of all the dev wiki is not the official documentation (lua_api.txt is).

Then the dev wiki should state this on its home page.

The doc only says that all faces are drawn, it doesnt say anything about backface culling, which is what JackGruff is talking about if I understand him correctly.

To which documentation are you refering to? I guess it’s not lua_api.txt (from latest dev version) because does only mention allfaces_optional at line 344 and that’s it. I can’t find any description of this drawtype in this file. In the wiki, it says:
allfaces_optional: transparent node with all its faces shown if using new_style_leaves = 1

When all faces are shown I conclude backface culling is disabled. But the OP did observe backface culling which is the point of this thread.

So either we have a bug or the unofficial documentation is wrong. lua_api.txt does not say anything about allfaces_optional. :-(

So what is the real intended behaviour of allfaces_optional?