supertuxkart / stk-code

The code base of supertuxkart
Other
4.51k stars 1.06k forks source link

Geometry detail needs to be improved #4401

Open SvenAndreasBelting opened 4 years ago

SvenAndreasBelting commented 4 years ago

Geometry detail is made to simplify tracks on lower settings so that they can still run smooth on older computers.

But at moment it works not very efficient. The problem is that it's only possible to stop objects completely from loading into a race. That's very bad because it can only be used for objects that are irrelevant for the track.

Let's say I modeled a very detailed house and if I place a lot of them into the track it starts to lag on older computers, the only options I now have is: to ignore this problem, to place less houses or to remove some details from the house.

A much better way to handle geometry detail is by allowing to have different models of the house and depending if the geometry detail settings are set to high, or low the detailed version of the house or the version of the house with less details will be shown. This way players with good computers could still enjoy the detailed house but players with older computers could still play the track without lags

Of course this could cause some problems with the hitbox of the objects in online races but a simple solution would be to set all objects which are using object detail settings to ghost and then simply another objects with "psychics only" would be added for the hitbox.

If the setting would work also for library nodes, that would be very nice, but I'm not sure if that's possible.

I would really like to improve the performance of some tracks for older computers but at the moment that's not really possible, so I think that would be a very helpful feature.

qwertychouskie commented 3 years ago

This will be fixed when https://github.com/supertuxkart/stk-code/pull/3970 is merged. I've tested that PR and everything works, @Benau / @Alayan-stk-2 can it be merged?
image

SvenAndreasBelting commented 3 years ago

One thing I forgot to say is that until this issue: https://github.com/supertuxkart/stk-code/issues/3805 is fixed it's important that it's possible to reduce the amount of objects with this setting because otherwise it wouldn't improve much.

Alayan-stk-2 commented 3 years ago

Though #3970 has been merged, I don't think this is satisfyingly resolved yet. There is no way still to have advanced models that never "popout" in lowest geometry, and the control over geometry is crude.

Also currently the performance benefits are rather limited likely because of what Sven linked to.

Alayan-stk-2 commented 5 months ago

I think this is more or less done with the recent commits improving auto-LoD, especially https://github.com/supertuxkart/stk-code/commit/37e024f1e134a7054d36ccc171a5037c6fb61071

I'm leaving this open for now because it needs testing.

CodingJellyfish commented 1 month ago

Everything in this issue seems to be solved now except #3780 and lod popout that's impossible to fix and won't fix, shall I close it?