Try / OpenGothic

Reimplementation of Gothic 2 Notr
MIT License
1.14k stars 80 forks source link

Got lags when use lamp in G2NoTR. #680

Open Domarion opened 2 weeks ago

Domarion commented 2 weeks ago

Describe the bug When I am trying to use lamp which opens path to the chest in house i got lags and very slow lamp rotation animation.

Setup Linux, kernel 6.1.100, commit https://github.com/Try/OpenGothic/commit/29d30f70edba95c33500dbdc079f61ad92235216, game started without any mods (all mods are installed as mod files). G2NoTR: GOG gold russian installation.

AMD Ryzen 7 5800X 8-Core Processor Radeon RX 6800 32GB memory

Save-game & Screenshot & Video screen video save_slot_20.zip

Application log log.txt

Try commented 2 weeks ago

Hi, @Domarion !

Yes, this issue is related to slow update of ray-tracing acceleration structure. Engine uses heuristics to predict, if object is movable or not, to build TLAS once during the loading. For same reason animated characters/items are excluded from RT, as it just too slow.

There are about 2 cases when engine fails to predict, if Vob is static or not: portal to Jarkendar and the hidden wall controlled by this lamp.

For now this issue is "wontfix" - as we need to build solution for RT+animation and then just put this lamp and wall into animated bucket (tilt heuristics)