Navmesh for giants

I’m trying to setup a project where the player is at the scale of a cockroach. I tried playing around with two approaches

  1. Scaling player down by factor of ~80
  2. Scaling Environment up by factor of ~80

Scaling player down, I’m facing problems with matching animations with walk speed. Those are just surface level problems. There might be potential precision problems down the road.

When scaling up, I’m having trouble configuring the Navmesh to work with Manny scaled by 80:
The NavMesh wont generate for AgentHeight close/above 3000, I need to get it up to ~13600!

Obviously, these are big stroke naive attempts, I will continue searching.
In the meantime, can anyone hint at the right direction here?

1 Like

You could remake the animations from a 3D editor by only adjusting them a little, or you could increase the play rate of your animations directly from the engine. But I doubt that’s the problem since you mentioned that this happens because of the scaling. So I think all you’d need to do is just decreasing the player speed.

That’s where different techniques come into play like world partition, moving the world origin an more. Here’s a video you might wanna check out: https://m.youtube.com/watch?v=2nnpZtMDbhM

Keep in mind that the best way to overcome performance issues is always optimizing. So I recommend you scaling down those giants along with the player before you start implementing world partition. They can still look big next to the player, nobody will know their actual scale in the world :wink:

I don’t think that World Partition origin rebasing is really relevant to the issue.

If going for scaled down player I’d say just fix up the animations and movement speeds and not worry too much about float precision issues. Even with your character at 1/80th of the standard Character scale you’ve got a lot of room before precision starts to become a serious problem, especially with Unreal Units being centimeters.

For scaled up world, set the AIs to the maximum scale that navmesh supports, and then scale up their skeletal meshes the rest of the way and adjust movement speeds to match the animations of the scaled up skeletal mesh.

[edit] Alternative that occurred to me last night: split the difference. Scale up the ‘giants’ to the maximum allowable agent size, then scale the player down to 1/80th of that.

Do you purpously go put of your way to write BS on this forum mate?
If you have precision issues with character at X meters from origin, its only obvious that by shrinking said character you now have issues much sooner - likely around 80% sooner in this case.

@Fortron
Peobably avoid navmesh alltogeter. Try using nav invokers.

Generally speaking scale doesn’t really matter to your player - your camera setup is much more critical to make believe that you are small and everything is huge, so games like Grounded generally just enlarge other objects.
(Which doesn’t really get you more precision due to floating point, you still get the same as a 100% scale, unlike when you shrink, where the precision will loose more accuracy).

Anyway, try out nav invokers on scaled up meshes, let the topic know what results you get so if anyone else happens to be looking for the same they can get an idea.

1 Like

Thanks everyone for your input.

So I played around with the RecastNavmesh settings and got it to work by also scaling up the Default entry in NavMeshResolutionParams. I was able to get past AgentHeight = 2600 which was the limit before.

To recap, It’s looks like AgentHeight is limited by the settings from NavMeshResolutionParams.
In my tests I scaled both of these settings by a factor up to 40. (Not the initial 80 I was going for)

rescastnavmesh

EDIT: @MostHost_LA Thank you for suggesting Navigation Invokers, I was not aware of those! I’ll put that into my toolbox.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.