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

Model texture is rendered white #13423

Closed
BeverlyCode opened this issue Apr 12, 2023 · 26 comments
Closed

Model texture is rendered white #13423

BeverlyCode opened this issue Apr 12, 2023 · 26 comments
Labels
Action / change needed Code still needs changes (PR) / more information requested (Issues) Bug Issues that were confirmed to be a bug @ Client rendering Possible close

Comments

@BeverlyCode
Copy link

BeverlyCode commented Apr 12, 2023

All versions.

Bug in entity rendering system. Causes only textures on entities to be full black, white, or use a random texture. Noticeable in Brachiosaurus from Paleotest in most instances, or mob entities in Livingfloatlands.

This is not limited to mobkit or mobs_redo, it can effect any entity. The bug is reproducible but the effects are random, doesn't always show up for everyone.

I have tested the same b3d models as meshnodes and the bug only appears when the models are loaded as entities.

Confirmed by GreenXenith: https://discord.com/channels/369122544273588224/369137254641303560/1089982985291452506

@BeverlyCode BeverlyCode added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Apr 12, 2023
@SmallJoker
Copy link
Member

SmallJoker commented Apr 12, 2023

Please do not delete the entire issue template next time and use it as a guide.

  • How can this be reproduced? Preferably include a screenshot to visualize your problem.
  • Which OS, architecture, GPU model, driver?

EDIT: The content you're referring to in the link is not visible by the public, hence suboptimal.

@Niklp09
Copy link
Contributor

Niklp09 commented Apr 12, 2023

EDIT: The content you're referring to in the link is not visible by the public, hence suboptimal.

GreenXenith's message

Brach on jurassic park server, android (mt 5.5.1)
grafik

@BeverlyCode
Copy link
Author

BeverlyCode commented Apr 12, 2023

  • Which OS, architecture, GPU model, driver?

This occurs on a variety of those combinations, I have tested this on many machines, GPU, iGPU, etc. Windows,Linux,Iris XE,AMD VEGA,Intel HD,RTX 2060,3090,various drivers over months,etc.

It's been a bug that has been in the engine for a long, long time.

@fluxionary
Copy link
Contributor

i'm pretty sure this is a bug in paleotest, CalebJ from Tunnelers' Abyss fixed it at some point, but doesn't remember how. i installed paleotest in a fairly basic world, and spawned a few brachiosaurs, which were pure white. most mobs on most other servers are fine for me.

@fluxionary
Copy link
Contributor

actually, something similar seems to have been reported previously: ElCeejo/paleotest#8

@BeverlyCode
Copy link
Author

BeverlyCode commented Apr 16, 2023

actually, something similar seems to have been reported previously: ElCeejo/paleotest#8

Yep that looks like exactly the same problem

i'm pretty sure this is a bug in paleotest, CalebJ from Tunnelers' Abyss fixed it at some point, but doesn't remember how. i installed paleotest in a fairly basic world, and spawned a few brachiosaurs, which were pure white. most mobs on most other servers are fine for me.

Like I mentioned in the first post it's not limited to Paleotest, or a specific mob library. Just that the Paleotest Brachiosaurus is the most reliable way to reproduce it. I have looked at the Paleotest code and see no reason why the Brachiosaurus would cause these rendering artefacts over other mobs in Paleotest.

I have had this happen to entities I have registered in custom mods with no dependencies.

I actually find it highly unlikely anyone has fixed this, one can easily delude themselves into thinking they have fixed it because it's not a consistent problem and what causes it to appear and disappear is unknown, so it seems random, but it is easy to change something and think that it has been fixed when really, it hasn't.

If this is not an engine bug, I would be really really quite shocked. I can assure you it is an engine bug, but I have already had this argument on the Discord for some hours with no solution or progress other than GreenXenith confirming its existence, which alone is a fight, because the default consensus of Minetest users on discord is to just not believe you; if it's never happened to them they assume it's "never happened to anyone but you" etc. (sometimes I wonder if they ever actually even play the game or just post on discord wasting everyone's time lol)

But if you want to go down the route of blaming Paleotest which I have confirmed in my own rigorous tests that it is not, feel free to go down that avenue - the more confirmation against it the better.

@ghost
Copy link

ghost commented May 14, 2023

Petz has not that bug. I belive is a mod error.

@BeverlyCode
Copy link
Author

Petz has not that bug. I belive is a mod error.

I believe you have not read this entire thread. It is not a mod error. It is very plausible there are mods that do not incur this problem, but that alone does not deduce it to being a "mod error", please refrain from making this claim without hard evidence.

@ghost
Copy link

ghost commented May 14, 2023

I believe you have not read this entire thread. It is not a mod error. It is very plausible there are mods that do not incur this problem, but that alone does not deduce it to being a "mod error", please refrain from making this claim without hard evidence.

After many years of experience I will tell you, those errors can be due to functions that change textures, for example a bad use of object:set_properties. From the mod or from another mod that interferes (even in this case a mod that is not a dependency), it is very common with callbacks.

It is very easy to check, enter the model in PETZ. I am 100% sure there will be no problem.

@BeverlyCode
Copy link
Author

BeverlyCode commented May 15, 2023

I believe you have not read this entire thread. It is not a mod error. It is very plausible there are mods that do not incur this problem, but that alone does not deduce it to being a "mod error", please refrain from making this claim without hard evidence.

After many years of experience I will tell you, those errors can be due to functions that change textures, for example a bad use of object:set_properties. From the mod or from another mod that interferes (even in this case a mod that is not a dependency), it is very common with callbacks.

It is very easy to check, enter the model in PETZ. I am 100% sure there will be no problem.

I hear you, I checked use of set_properties in paleotest and it's only being used to set visual_size, any other thoughts? I don't doubt there is something triggering this bug and this may well being triggered by something specific such as a b3d mesh file when it is loaded.

If you read this thread you will findout that I have tested this with only one very minimal mod loaded that loads the b3d file as an entity and the bug still occurs which eliminates to possibility of it being a mod related bug.

I have had this happen to entities I have registered in custom mods with no dependencies.

It just can't be related to a mod. Maybe how the b3d file is loaded? Maybe, maybe.

@ghost
Copy link

ghost commented May 15, 2023

send me the b3b

@BeverlyCode
Copy link
Author

BeverlyCode commented May 15, 2023

send me the b3b

models.zip

It's not actually limited to b3d there is also a .x file that is affected, but the bug only occurs when the models are loaded as entities (not meshnodes) and it's not 100% trigger-able, it's random, some times it will work, some times it will break. This is because we don't know exactly what causes it, but I have narrowed in it down to still affecting the models when no other mods are loaded (apart from minetest_game) and the models are loaded as simple entities.

When it does break it will appear as one of the three:

  1. a random texture
  2. all white texture
  3. all black texture

@fluxionary

This comment was marked as off-topic.

@BeverlyCode

This comment was marked as off-topic.

@fluxionary

This comment was marked as resolved.

@fluxionary

This comment was marked as resolved.

@BeverlyCode

This comment was marked as resolved.

@fluxionary

This comment was marked as resolved.

@BeverlyCode

This comment was marked as resolved.

@BeverlyCode

This comment was marked as resolved.

@fluxionary

This comment was marked as resolved.

@BeverlyCode

This comment was marked as resolved.

@fluxionary

This comment was marked as resolved.

@SmallJoker SmallJoker changed the title Bug in entity rendering system Model texture is rendered white May 18, 2023
@SmallJoker
Copy link
Member

This looks optically the same as #9374 (comment) but it was fixed during the process.
I can confirm that /spawnentity paleotest:brachiosaurus from paleotest sometimes results in incorrectly rendered textures. This does not depend on shaders, e.g. enable_shaders = false makes no difference.

Have you yet checked whether the texture normals are correct? Aside from that it might be worthwhile to valgrind for uninitialized variables.

@Zughy Zughy added the Action / change needed Code still needs changes (PR) / more information requested (Issues) label May 18, 2023
@BeverlyCode
Copy link
Author

BeverlyCode commented May 18, 2023

This looks optically the same as #9374 (comment) but it was fixed during the process. I can confirm that /spawnentity paleotest:brachiosaurus from paleotest sometimes results in incorrectly rendered textures. This does not depend on shaders, e.g. enable_shaders = false makes no difference.

Have you yet checked whether the texture normals are correct? Aside from that it might be worthwhile to valgrind for uninitialized variables.

Yeah texture normals was one of the first things I checked on all the affected models, including inverse scaling factors which would invert normals that seemingly point in the correct direction.

I would seem to be a memory-leak or uninitialized variables as you suggest.

It is also correct that it appears with or without shaders enabled, unrelated to shader code.

@Zughy Zughy removed the Action / change needed Code still needs changes (PR) / more information requested (Issues) label Jun 5, 2023
@Zughy Zughy added Bug Issues that were confirmed to be a bug and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Oct 9, 2023
@sfan5
Copy link
Collaborator

sfan5 commented Aug 2, 2024

Needs re-testing.

@Zughy Zughy added the Action / change needed Code still needs changes (PR) / more information requested (Issues) label Aug 12, 2024
@Zughy Zughy closed this as not planned Won't fix, can't repro, duplicate, stale Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Action / change needed Code still needs changes (PR) / more information requested (Issues) Bug Issues that were confirmed to be a bug @ Client rendering Possible close
Projects
None yet
Development

No branches or pull requests

7 participants