Distant lands and frozen cliffracers

Feedback on past, current, and future development.
Falc
Posts: 31
Joined: 18 Jun 2017, 22:14

Distant lands and frozen cliffracers

Post by Falc »

I'm using the 0.43 release with distant lands on. My issue is that this results in frozen cliff racers everywhere around Red Mountain. Is there a fix I can use for this, either to disable them or animated them? Its very immersion breaking.
User avatar
jirka642
Posts: 117
Joined: 23 Aug 2014, 11:39
Location: Czech Republic
Contact:

Re: Distant lands and frozen cliffracers

Post by jirka642 »

This happens when you load more exterior cells then default 1. Because AI is only activated in range of 1 cell width: viewtopic.php?f=2&t=3940
Falc wrote: 26 Dec 2017, 19:28 Is there a fix I can use for this, either to disable them or animated them?
iirc, fixing this would require some rework of AI system.
Or you might be able to disable them by using "exterior cell load distance = 1". (Have not tested this with distant land)
CMAugust
Posts: 285
Joined: 10 Jan 2016, 00:13

Re: Distant lands and frozen cliffracers

Post by CMAugust »

Thanks to the way Morrowind handles the camera and player visibility, you can leave cell and view distance at default and still see this phenomenon quite easily; it's fairly common to spy frozen Cliff Racers in the corner of the screen. I agree this will need to be addressed sooner or later if distant land is to be fully utilized.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Distant lands and frozen cliffracers

Post by scrawl »

There are actually two mechanisms at play here: AI distance and animation distance. Both are set to the same distance right now.

You could increase the animation distance, so that the cliff racers would at least fly in place rather than being frozen. If you want to do it, search the code for animation->setActive. You could also increase the AI distance, but be aware that is more than likely going to break some badly-scripted quests. And in both cases there will be a performance impact, of course.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Distant lands and frozen cliffracers

Post by scrawl »

After much contemplation, I've made some changes to help with the frozen cliff racers phenomenon, which interestingly resulted in other interesting changes.
The animation distance now defaults to slightly larger than the AI distance; in result, actors now tend to get frozen in their idle state instead of mid-movement. Creatures with the 'flying' flag will always get their animations updated regardless, to prevent the uncanny appearance of hovering motionless. Alas, the performance impact turned out to be big; around 10-30% in a typical cliff-racer-laden scene. But I've mostly removed the impact with what some might call magic. After doing the magic, I considered expanding the magic to any actor anywhere for a nice performance boost regardless of the distant-ness and cliff-racer-laden-ness of it all, with the potential theoretical adverse side effect of some skinned objects being culled when they shouldn't, but only marginally so and only if their animation is doing really weird out-of-body type things. 'Magic' may be an overstatement, as all this does in a nutshell is no longer updating off-screen animations. If the user was previously bottle-necked by the main thread, they might see a spendidly decent boost from this; if not, they won't notice. It's enabled for now, but I do half expect to get a bug report at some undetermined time in the future that will make us question my sanity and turn off the *cough* 'optimization' again.
User avatar
AnyOldName3
Posts: 2666
Joined: 26 Nov 2015, 03:25

Re: Distant lands and frozen cliffracers

Post by AnyOldName3 »

Is there a possible source of problems if the player spins around really quickly? That would make an actor leave the screen and re-enter it shortly afterwards, which might look weird depending on how things are done. If we still keep track of the time since the animation started but just stop applying the animation, everything would be fine, but if we pause the animation and resume it or start the animation from the beginning, there's a source of problems.

I'm pretty sure, though, that disabling animation for off-screen objects is a common optimisation in games provided bounding volumes are set up correctly so that things don't get moved outside the bounding volume. I wouldn't be surprised if the original engine had the optimisation (although being a Bethesda game, a good decision may well have been avoided). Someone was asking something about bounding volumes for bones on the forums here a few months ago, and that might have something to do with this, but I don't think he ever got a good answer.
Chris
Posts: 1625
Joined: 04 Sep 2011, 08:33

Re: Distant lands and frozen cliffracers

Post by Chris »

scrawl wrote: 11 Jan 2018, 03:01 'Magic' may be an overstatement, as all this does in a nutshell is no longer updating off-screen animations.
How does this affect moving actors (since they move via animations), or 'dynamic' animations like head-tracking? It actually kind of bugs me when I see in some engines that an NPC coming into view starts moving from an idle pose that does not reflect their intended state (e.g. turn to look at a walking character, and they do their 'start walking from a stand still' animation, or an NPC that's supposed to be using a specific idle will 'snap' to that animation from a basic pose as they come into view).
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Distant lands and frozen cliffracers

Post by raevol »

Really excited to see this in action...
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Distant lands and frozen cliffracers

Post by scrawl »

In short, the animation controller and timer still runs, but the actual result of being in that particular position of the animation track isn't applied to the node's transformation.
Is there a possible source of problems if the player spins around really quickly? That would make an actor leave the screen and re-enter it shortly afterwards, which might look weird depending on how things are done.
As far as I can tell, they'll show in the animation pose they were in when they were last on screen, then flick to the current one. I can't easily avoid this without undoing the nice separation between Update and Cull visitors. :/
But I think this will only be visible if you spin really fast, because the entire bounding sphere is a lot wider than the NPC is. (OSG uses bounding spheres for intermediate nodes, such as the root of the skeleton, and then bounding boxes to cull each Drawable).
Anyway, test ahead and let me know.
I like your new signature, sounds like a title out of game of thrones :)
How does this affect moving actors (since they move via animations
They still move properly, because the offset of the root bone is retrieved directly from the animation track, and not grabbed from an actual node or anything. Head tracking should not be affected, if I remember right.
Really excited to see this in action...
I'd be more excited to not see it in action, because the point was that you wouldn't notice ;)
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Distant lands and frozen cliffracers

Post by raevol »

scrawl wrote: 11 Jan 2018, 18:09 I'd be more excited to not see it in action, because the point was that you wouldn't notice ;)
HAHAHA true, I mean the performance boost. :D
Post Reply