Drawing opposite side of surfaces

JackGruff
Member
 
Posts: 13
Joined: Sat Sep 21, 2013 21:44

Drawing opposite side of surfaces

by JackGruff » Sun Oct 13, 2013 19:25

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.
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

by Wuzzy » Fri Oct 25, 2013 10:56

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.
Last edited by Wuzzy on Fri Oct 25, 2013 10:56, edited 1 time in total.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Oct 25, 2013 13:53

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.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Fri Oct 25, 2013 22:05

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.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

by Wuzzy » Sat Oct 26, 2013 09:20

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?
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 3 guests

cron