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

Creep is sometimes generated with abnormal vertex coordinates #2892

Open
VReaperV opened this issue Jan 6, 2024 · 4 comments
Open

Creep is sometimes generated with abnormal vertex coordinates #2892

VReaperV opened this issue Jan 6, 2024 · 4 comments
Labels

Comments

@VReaperV
Copy link
Contributor

VReaperV commented Jan 6, 2024

Creep is sometimes generated with vertices with very high or very low (negative) numbers for its coordinates. So far I've only seen this happen on grangermaze. This might be happening because of nothing else being written on those pixels so they have the values obtained from glClear/glClearColor, and possibly in combination with portals. I would assume that if it didn't require a combination of both, then the game would have been crashing when noclipping out of the map. However, that may also be because creep never actually gets drawn if you're noclipping. That needs further confirmation.

Here's an example:
unvanquished_2024-01-06_092550_000
unvanquished_2024-01-06_092747_000
Red wireframe are the creep mesh triangles:
unvanquished_2024-01-06_081228_000
unvanquished_2024-01-06_090349_000
This is some output from Nsight:
image
This is also the cause of DaemonEngine/Daemon#1002. To test this, use this map: http://dl.zittrig.eu/pkg/map-grangermaze_0.5%2B1.dpk with the following layout: portaltest3.dat.txt (rename to portaltest3.dat). Do the following in-game:
`/g_neverEnd on

/devmap grangermaze portaltest3
/noclip
Fly up out of the current room (this is needed to unload the creep mesh)
/setviewpos -2792 889 68 -57 -12 or /setviewpos -3664 3562 153 -15 21
Fly around, there will be no crashes and nothing weird rendered in the portals.`

(You'll still crash if you happen to spawn in one of the rooms where this bug happens as the creep mesh will still be loaded)
You can also do /cg_marks off instead of changing the layout with the same effect since it prevents creep from being rendered at all (you'll still need to go to a different room or noclip to unload the creep mesh).
unvanquished_2024-01-06_082501_000
To see where the creep mesh is drawn, use /r_showTris 1 (you'll need e4251b0 to not crash).

@VReaperV
Copy link
Contributor Author

VReaperV commented Jan 6, 2024

This also partially causes #1005.

@VReaperV
Copy link
Contributor Author

VReaperV commented Jan 6, 2024

This might be linked to an issue described in DaemonEngine/Daemon#1005 (comment), where wrong meshes are rendered through portals.

@VReaperV
Copy link
Contributor Author

VReaperV commented Jan 6, 2024

Likely caused by the combination of the above and https://github.com/Unvanquished/Unvanquished/blob/274b074385c8d9140a7fed58eba0a1c984292e8c/src/cgame/cg_buildable.cpp#L311-322. If nothing's rendered behind the portal, it might cause cent->currentState.origin2 and/or tr.endpos to get incorrect values. Will need to add some logging to check this either way.

@VReaperV
Copy link
Contributor Author

The only known cause of this issue is fixed in DaemonEngine/Daemon#1031, but there might still be some wrong code somewhere that makes creep superstretched like that.

@slipher slipher added the T-Bug label Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants