Closed Asaak232 closed 2 years ago
I can reproduce this issue now
When debugging this issue suddenly I cannot reproduce this issue anymore. Very weird.
It deadloops inside Frustum#offsetToFullyIncludeCameraCube
. This method tries to move back the frustum to include the 8x8x8 cube that the camera is in. (this does not interfere with immptl frustum culling code). Normally this method should work and not deadloop.
By testing, I found that without pehkui it won't deadloop. Then I suspect that it's related with pehkui changing the near plane of the projection matrix, then I changed pehkui config to make the near plane not zero, and the issue vanished, however when I change the near plane back to 0 the issue cannot be reproduced.
I simply made the loop to limit to 10 times and it will probably fix the issue.
Does the issue still occur in this version? https://github.com/iPortalTeam/ImmersivePortalsMod/releases/tag/v2.2.1-1.19.2
Does the issue still occur in this version? https://github.com/iPortalTeam/ImmersivePortalsMod/releases/tag/v2.2.1-1.19.2
sorry for the delay, and thanks, new version fixed the problem. But there is a bit strange effect, then you go through a portal that changes size, all chanks disappear for a brief moment. I think effect lasted noticeably longer, if you go smaller portal first, and then go back through the portal from which you came out.
@Asaak232 Can you show a video about that? Does the "chunk disappear" issue occur without Pehkui? Have you tried deleting pehkui config file and re-launch the game (deleting config file make it to reset config)?
@qouteall Chunks disappear happens only to portals that uses pehkui, other portals are fine. It works a bit weird, i did some tests, and sometimes all chunks dissapear, but one that beneath me doesnt, as long as i dont touch the mouse, and stay at the same chunk, it will stay like that. Also, sometimes all chunks dissaper, even one that beneath me. But there are still a lot of cases when all chunks disappear only for a moment, or all except the one below me. I tried deleting config, but promblem is still here. I recorded video, and here it is https://youtu.be/6nW9bg7Ds5s
I can reproduce this issue again.
The real cause of this issue has been found. The projection matrix's near plane can be set to 0 and its determinant become 0 then frustum related code will malfunction
In Pehkui's modifyProjectionMatrixDepth
, the player scale is almost 0 in the frame that the player teleports
It seems to be a Pehkui's issue. Right after teleportation ScaleUtils.getBoundingBoxWidthScale(entity, tickDelta)
returns a very small value. But if tickDelta is 1 it will return a normal value
Pehkui introduces a lot of complexity. The original scale is normal but the scale modifiers make the scale nearly zero. The scale modifiers involve a lot of hard to debug over abstraction code. It contains tons of nesting of calculating scales and contains lamdbas that are hard to debug.
Anyway this is a Pehkui's issue. Calling ScaleUtils.getEyeHeightScale(entity, 0.5f)
immediately after teleportaion. ImmPtl does not change the scale modification code and this issue does not occur with the old Pehkui
@qouteall, even so, thanks for figuring that out, but could you please post the issue at the pehkui github? I'm afraid that i will not be able to convey the essence of the problem.
This should now be fixed with the Pehkui 3.4.1 release.
The next version of immptl will have "breaks" "pehkui": "<3.4.1",
According to your testing, does the issue occur with ONLY Immersive Portals mod and Farbic API?
No
Describe the issue
Scaling portal causes game to completle freeze. There is no crashlog, i just go through the portal, game completly dies, and after i manually kill the process, and enter the same world, only to find out that my size changed, and i am on the other side of a portal. All pehkui console commands working just fine. It only occurse when i use portal. I use 1.19.2 latest version of immersive portals, so as pehkui, gravity api and miniscaled. There is also world edit, but i tried without it, changed nothing.
Post the log here