stujones11 / minetest-3d_armor

Visible player armor & wielded items for minetest
Other
56 stars 98 forks source link

3d model glitch/lag? #143

Closed ghost closed 6 years ago

ghost commented 6 years ago

I hosted a local server using the latest code of 3d_armor, and occasionally, a player looks like this to another player: screenshot_20180603_064543 I don't know if this is an issue with this mod, as it was fine before I updated to the latest.

stujones11 commented 6 years ago

I don't know if this is an issue with this mod, as it was fine before I updated to the latest.

I can see nothing in the recent commits that might cause this and have not been able to reproduce this locally. You say this happens only occasionally, do you see any log messages like missing texture warnings or anything mentioning 'armor'?

If you could find out what is triggering this behaviour or even better, find the breaking commit it would be very helpful. I will continue to investigate this, thanks for the report.

Warning: Be careful if reverting 59b26b37f9c7b68cd5ebecfb2efece1a9535b5dc on a live server, it changes how armor is saved and could result in players losing their equipped armor items.

stujones11 commented 6 years ago

I have still been unable to reproduce this so I have some questions:

  1. Which (if any) skin changing mod are you using?
  2. What graphics driver is the client using?
  3. Does the model always appear fully white or sometimes other colours?

There was a MTE bug a while back that caused the player to go completely white https://github.com/minetest/minetest/issues/5739#issuecomment-302089505 this looks very similar yet the client version would indicate otherwise. AFAIK the fix for this was merged just prior to the MT 0.4.16 release.

ghost commented 6 years ago

I am using MT 0.4.16 and am playing on Lubuntu 18.04 on an HP Pavilion dv4 laptop with a Intel CORE Duo 2 inside. I don't have any skin changing mods.

I was playing around again, and it happened after a player died. The log looks like this after one player "User" was killed by me "CSirolli": 2018-06-03 18:25:10: INFO[Main]: Left-clicked object 2018-06-03 18:25:10: INFO[Main]: SmokePuffCSO: constructing 2018-06-03 18:25:10: INFO[Main]: SourceImageCache::getOrLoad(): Loading path "/usr/share/games/minetest/textures/base/pack/smoke_puff.png" 2018-06-03 18:25:10: ACTION[Server]: CSirolli punches object 1: player User 2018-06-03 18:25:10: ACTION[Server]: Player User punched by player CSirolli, damage 1000 HP 2018-06-03 18:25:10: INFO[Main]: GenericCAO::addToScene(): mesh 2018-06-03 18:25:10: INFO[Main]: Irrlicht: Loaded mesh: 3d_armor_character.b3d 2018-06-03 18:25:10: INFO[Main]: Pointing at [node under=1073,2,-731 above=1073,3,-731] 2018-06-03 18:25:10: INFO[Main]: Started digging 2018-06-03 18:25:10: INFO[Main]: Client::addUpdateMeshTaskForNode(): (1073,2,-731) 2018-06-03 18:25:11: INFO[MeshUpdate]: getTextureId(): Queued: name="bones_top.png^[transform2^[applyfiltersformesh^[crack:1:0^[applyfiltersformesh" 2018-06-03 18:25:11: INFO[MeshUpdate]: getTextureId(): Queued: name="bones_side.png^[applyfiltersformesh^[crack:1:0^[applyfiltersformesh" 2018-06-03 18:25:11: INFO[Main]: Pointing at [nothing] 2018-06-03 18:25:11: INFO[Main]: Left button released (stopped digging) 2018-06-03 18:25:11: INFO[Main]: Client::addUpdateMeshTaskForNode(): (1073,2,-731) 2018-06-03 18:25:11: INFO[MeshUpdate]: getTextureId(): Queued: name="bones_rear.png^[applyfiltersformesh^[crack:1:0^[applyfiltersformesh" 2018-06-03 18:25:11: INFO[Main]: Pointing at [object 1] 2018-06-03 18:25:11: INFO[MeshUpdate]: getTextureId(): Queued: name="bones_front.png^[applyfiltersformesh^[crack:1:0^[applyfiltersformesh" 2018-06-03 18:25:11: INFO[Main]: Client: time_of_day=15005 time_speed=117 dr=1000 2018-06-03 18:25:11: INFO[Main]: SmokePuffCSO: destructing 2018-06-03 18:25:12: INFO[Main]: GenericCAO::addToScene(): mesh 2018-06-03 18:25:12: INFO[Main]: Irrlicht: Loaded mesh: 3d_armor_character.b3d 2018-06-03 18:25:16: INFO[Main]: Client: time_of_day=15169 time_speed=117 dr=1000 2018-06-03 18:25:16: INFO[Main]: Client: avg_rtt=0.001 2018-06-03 18:25:16: VERBOSE[Main]: Saving registered mod storages. 2018-06-03 18:25:16: INFO[Main]: GenericCAO: Got init data 2018-06-03 18:25:16: INFO[Main]: ClientEnvironment::addActiveObject(): added (id=8) 2018-06-03 18:25:16: INFO[Main]: GenericCAO::addToScene(): mesh

This is when the log is in verbose mode. It seems this only happens when a player with armor dies. Upon death, they become blank and white. This caries over when they respawn until they put armor back on. In one or two cases, it went white on death and then a second later updated to the correct skin. It only appears to other players, but not to the player who "went white." I can use F7 to see myself and it shows that this is happening.

I would tell you about my graphics drivers, but I have no idea where to find that data. Hopefully the information I have given you helps.

ghost commented 6 years ago

So it seems to be triggered only by death and continues until the player puts armor on. So it seems it has something to do with the mesh updating. I don't know how your code works, so I can only assume what is going on. This happens whether or not the player is wearing armor, but it isn't always consistent.

LoneWolfHT commented 6 years ago

I have also had this problem with newer versions. Weird...

ghost commented 6 years ago

@LoneWolfHT did this happen for you in the same circumstances?

ghost commented 6 years ago

I didn't see the last question. But yes it has always been white.

LoneWolfHT commented 6 years ago

Yes, pretty much. It occurred whenever I killed a player with a superpick (one-hit-kill), and sometimes when when the player was killed with minetest_game weapons

ghost commented 6 years ago

Played around a little more and realized that the "whiteness" goes away after some time, and is not triggered by armor being put on or taken off. So maybe it does have something to do with the mesh loading.

stujones11 commented 6 years ago

Thank you both for the info, there is nothing I can think of in this mod that could even cause the player to go white. If it was a texture error then the colour would be random and you would see a red error message. As you both mention that it seems to occur around death or being hit by super weapons, this does look more and more like this client issue https://github.com/minetest/minetest/issues/5739. Note that the issue was re-opened after a regression in my fix so this is likely still in MT 0.4.16

What does not make sense is that you say the problem did not occur until you updated, I wonder if that could just be a coincidence or perhaps some re-balancing has made it more likely to occur. I seem to remember the best way to trigger that bug was to have one player wearing strong armor and another repeatedly hitting them causing little damage. Admin armor is no good because you do need to trigger the 'damage-flash'.

I would be very interested to know if anyone can reproduce this with MT 0.4.17, if not then this is definitely a MT engine bug, or the fix was not back-ported. (need to check)

ghost commented 6 years ago

I can't reproduce it in 0.4.17. Probably an engine bug that got worked out.

ghost commented 6 years ago

It seems it was fixed here. And it updating when someone puts armor on may have been a coincidence, since it didn't always happen, as it would eventually go back to normal.

stujones11 commented 6 years ago

Thank you for the update, that seems pretty conclusive to me. Are you happy to close this issue now?

Edit: I see from your forum post that the issue is resolved with MT 0.4.17, thank you.