LWC (Large World Coordinates) do not work for First Person Shooters/Driving games. Wobbly rendering artefacts UE5 only (UE4 works fine)

World rebasing does not cause halts or slowdowns based on amounts of items.
Or else, just imagine how long it would take to rebase something with foliage. It would never be seamless.
But do continue to be convinced you are doing things right. By all means.

The end result is that eventually your company will be forced to hire an actual professional like me to implement a proper rebasing system instead of someone who doesn’t understand the basics of computing.

And sure, he’s found a bug.
No one said thats a bad thing.

What has been repeatedly said is that who cares.

No one should expect the engine to function with any precision past 200m from origin.

Unless you dont understand math, then sure, you can expect anything you like.

1 Like

@MostHost_LA OP repeatedly pointed out that in UE4 they were able to go massive distances without issues.

Basically, the OP’s use case should be a valid, and jitter free experience. And it would appear that with a slight modification to the engine noted above fixes/improves the issue at hand.

1 Like

I’ll give this a try myself. Thank you for posting a possible workaround.

1 Like


Not exactly confidence inspiring. This is 5.1

Hi @Elitic, can confirm your suggested value of 524288.0 worked like a charm. We were having issues where individual bones in our animation/skeleton would increase in jitter the further from 0,0,0 you were. I tested up to 995740, 1147270, 62 coordinates without seeing the jitter AT ALL.

1 Like

Math is not an opinion.
Though by your own writing it already seems clear that 2x2 is 24 for you. You are perfectly free to wallow in your own ignorance.

LWC are still busted in 5.1 along with HLOD generation and a bunch of other issues, including but not limited to rendering pipeline and nanite problems.
Just like before, you need rebasing to deal with anything that requires any kind of accuracy.
That’s unlikely to change, ever, really.

I’m out at 1,000,000 x 1,000,000 and attached meshes to my skeleton don’t shake anymore. I used #define UE_LWC_RENDER_TILE_SIZE 128000.0

1048576.0 /* Maximum distance representable by a float whilst maintaining precision of at least 0.0625 units (1/16th of a cm) - Precision issues may occur for positions/distances represented by float types that exceed this value */

So 2097152.0 would be 1/8th of a cm at max tile distance. Which is way too loose for what we needed.

Seems that TILE_SIZE does some form of offset/rebasing:

float3 Offset = (LWCGetTile(Lhs) + LWCGetTile(Rhs)) * UE_LWC_RENDER_TILE_SIZE + Lhs.Offset;

The render side of things is still using floats.

So is the animation/skeletal mesh, and you are looking for micrometer precision on most world applications for skinned mesh usage.
Anything above 1mm precision will cause possible gaps and lines in composite characters, even when properly merged.

Ergo, world origin shifting is the only way to achieve this.

Was able to fix the issue OP was having without using origin shifting. (Edit: Do not abuse flagging posts)

1 Like

Hey @EvoPulseGaming can you explain how you fixed it?

Currently we made two changes in Engine/Source/Runtime/Core/Private/Misc/LargeWorldRenderPosition.cpp:

//#define UE_LWC_RENDER_TILE_SIZE 2097152.0
#define UE_LWC_RENDER_TILE_SIZE 128000.0

//#define UE_LWC_RENDER_MAX_OFFSET (2097152.00.5)
#define UE_LWC_RENDER_MAX_OFFSET (128000.0
0.5)

Our world is only ~20km x 20~km, so we were able to do this. I don’t think this would work in the max 80x80km.

There is still a very faint jitter, which was acceptable for us as you would need stop moving and stare at it pretty hard to see it.

Honestly would be nice to see a WorldSettings slider that let you choose a tile/render offset and spits out the “recommended max world size”.

Also, (I have not tried this yet) you could reduce the UE_LARGE_WORLD_MAX size. It is 87km square by default. As the comment suggests:
// Note: Modifying WORLD_MAX affects UE_LWC_RENDER_TILE_SIZE in Engine\Source\Runtime\Core\Private\Misc\LargeWorldRenderPosition.cpp and may introduce precision issues in shaders using world coordinates.

2 Likes

Jittering meshes is still a problem in UE5.2
Origin shifting does not help much at all. In fact you can even see some very, very small amount of jitter at a 0.0 world location.

3 Likes

I’ll test 5.2, but it’s possible they introduced a bug. 4.* is stable at 0,0,0, and ok up to at least 500 units from it.

I have found one reason why stuff flickers, it might be related to the problems you guys are seeing.

3 Likes

Some improvements for this might be coming in 5.4:

https://portal.productboard.com/epicgames/1-unreal-engine-public-roadmap/c/1253-large-world-coordinates-on-gpu?utm_medium=social&utm_source=portal_share

4 Likes

Hi, do you put this code in the master material of the static mesh?