Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent nodes are invisible in inventory #5461

Open
numberZero opened this issue Mar 26, 2017 · 20 comments · May be fixed by #14701
Open

Transparent nodes are invisible in inventory #5461

numberZero opened this issue Mar 26, 2017 · 20 comments · May be fixed by #14701
Labels
Bug Issues that were confirmed to be a bug @ Client / Audiovisuals

Comments

@numberZero
Copy link
Contributor

If a node (e.g. MTG water with custom texture) uses texture with alpha less than 128, it’s inventory image is entirely transparent. If the alpha is in range [128, 255], the inventory cube is visible but dark.

@paramat paramat added @ Client / Audiovisuals Bug Issues that were confirmed to be a bug Low priority labels Mar 27, 2017
@paramat
Copy link
Contributor

paramat commented Mar 27, 2017

Alpha translucency is unusable in MT anyway and is discouraged.

@numberZero
Copy link
Contributor Author

well, water uses it.

@paramat
Copy link
Contributor

paramat commented Mar 27, 2017

Water uses an alpha parameter alpha = 160, instead of use texture alpha = true for using a texture's alpha, maybe this is why it works in inventory?
So if you use a custom water node using alpha = should work?

@paramat paramat added Request / Suggestion The issue makes a suggestion for something that should be done but isn't a new feature. and removed Bug Issues that were confirmed to be a bug labels Mar 27, 2017
@numberZero
Copy link
Contributor Author

@paramat... it appears to ignore nodedef alpha parameter, both on the map and in the inventory, using texture alpha instead (despite use_texture_alpha=false in the definition).
And that’s not a something custom but default MTG water.

@numberZero
Copy link
Contributor Author

Alpha translucency is unusable in MT

That’s equally true both for node alpha and texture alpha, there is no difference for rendering.

@Fixer-007
Copy link
Contributor

I hope it gets fixed eventually, that blinking and glass behind glass is pretty major graphic problem.

@paramat
Copy link
Contributor

paramat commented Mar 29, 2017

If the alpha is in range [128, 255], the inventory cube is visible but dark.

So why do default water nodes look fine in inventory?
We don't use 'inventorycube' anymore btw.

@juhdanad
Copy link
Contributor

For items and wield items texture alpha is ignored, as it is described described there.

If you would like to experiment, change these two lines in the source (and disable shaders):
for inventory items
for wield items

@numberZero
Copy link
Contributor Author

@juhdanad thank you.

So why do default water nodes look fine in inventory?

@paramat it doesn’t, it’s darker than it should be.

Anyway, don’t bother with it, I’m going to bisect it myself.

@paramat
Copy link
Contributor

paramat commented Apr 1, 2017

They're only slightly darker, and maybe because they are being blended with dark grey behind.

@paramat
Copy link
Contributor

paramat commented Apr 1, 2017

alpha = 255 makes water source in the world opaque, and with 255 you can see the top of the inventory image is similar brightness to the top of the node in the world.

screenshot_20170401_034409

@paramat
Copy link
Contributor

paramat commented Apr 1, 2017

However very low alpha values do not make water clear in the world, there seems to be a minimum alpha similar to the texture alpha, perhaps 'alpha' nodedef and texture alpha are combined?

@paramat
Copy link
Contributor

paramat commented May 13, 2017

However alpha = 0 does not make water completely clear in the world, there seems to be a minimum alpha similar to the texture alpha,

That's a bug, fixing PR is #5494

@nerzhul nerzhul closed this as completed May 19, 2017
@numberZero
Copy link
Contributor Author

Still happens, not with MTG water but with nodes (liquid at least) which use_texture_alpha. Seems that inventory mesh is drawn with EMT_TRANSPARENT_ALPHA_CHANNEL_REF instead of EMT_TRANSPARENT_ALPHA_CHANNEL.

@paramat
Copy link
Contributor

paramat commented Jan 29, 2018

@Ezhh may have experience of this?

@Ezhh
Copy link
Contributor

Ezhh commented Jan 29, 2018

Confirmed bug. This is default:water_source in the inventory adjusted to have alpha = 100
lackwater
Not sure of cause.

@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Dec 19, 2019

Confirmed bug as well in 5.2.0-dev @ 80af58c with this minimal node definition and a fully opaque texture:

          minetest.register_node("testnodes:alpha_120, {
                  description = "Alpha Test Node",
                  drawtype = "liquid",
                  paramtype = "light",
                  tiles = {
                          "testnodes_node.png",
                  },
                  alpha = 100,
                  groups = { dig_immediate = 3 },
          })

@nerzhul: How many confirmations are required to re-open this bug? ;-)

@sfan5 sfan5 reopened this Dec 19, 2019
@sfan5 sfan5 removed the Request / Suggestion The issue makes a suggestion for something that should be done but isn't a new feature. label Dec 19, 2019
@paramat
Copy link
Contributor

paramat commented Dec 20, 2019

Closing was a mistake due to misunderstanding of my comment #5461 (comment)

@GreenXenith
Copy link
Member

Bump. This is still an issue (and I wouldn't consider it "low priority"..)

@nininik0
Copy link

Plus this is also annoying for servers since players can't see stuff that is less alpha in inv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug @ Client / Audiovisuals
Projects
None yet
Development

Successfully merging a pull request may close this issue.