Creating big world (double precision)

Hi all!
I have a stupid question: if I use double precision (LWC) and create a world, for example, 1000 km in size, and then move up to 300 km, for example, will everything be drawn and work correctly?

Probably not.
The character animations and materials / really most of the engine / suffer from floating point precision anyway.

Enable world origin shifting and set the rebasing to happen around 300m from origin.
Then prettymuch everything will always work.

Arguably 300m could already be too much if you need animations to be at millimetric precision.

The only problem with shifting is the computational overhead.
It’s not an issue on anything modern, but if you need to run things on a toaster, then you have to keep levels and objects at a bare minimum…

1 Like

Thanks for your reply.

What if I don’t need animation? You just need to draw the static mesh correctly (rocks, mountains, trees, etc.).

The rendering doesn’t just convert double precision to single precision, it offsets the world space position to be relative some anchor, and the floating point precision is always calculated in, essentially, camera space.
Shader “world position” parameters are still a problem, though.

That, and they are used even in engine by stuff like the light alognment gizmo.

Its not uncommon.

For op.
If you need to render only why would you be 300km out?
Just set the scene up at 0,0,0 where you are rendering…

Otherwise, it depends what you are doing and how you render…

Then what is the advantage of using double precision? Where could this be even useful at this point?

I searched the forum, but didn’t find a specific answer.

The documentation says that a world of up to ~80 million km is supported, but why? If you can’t render it

You can render it, you just loose precision.

To understand what happens you can do 2 things.

One is to set up a random level, move to 300 km from 0,0,0 melt the engine a bit, and re-orient the lights with the engine shortcut.
The gizmo on the lower right will show you what happens.

The other is to look at the works modders are trying to get Bethesda’s starfiled to be any decent.
Withough serting anything up you get to see exactly what happens in gameplay and on rendering of such a situation.

As far as rendering from 0km to 300k away.
Thats not exactly possible due to earth’s curvature. But it is in Unreal… a flat earther’s wet dream…
Its just that the mountain range, building, whatever way out there will look like a messy smudge with a vertex every half a hour.

Double precision would make it look like a smudge with a vertex every 30m instead…

Thank you, now I understand

Hi, i am currently in the Main-Branch (current as of 1/23):

from what i understand LWC is enabled by default now? UE_USE_UE4_MAX_WORLD_SIZE = 0 (i have confirmed that this was so in the code),
however i am getting a failure from D3D12Texture.cpp on landscape generation, it appears it is using int32 Float.
is there something additional i need to do in order to enable the double precision to be used?

[follow up to above post:] i have narrowed the particular error down to ( i believe) an In-Editor issue, when loading/editing tiles that are very far apart. The issue has not appeared during runtime (so far)

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