Hi guys,
I am working on a project that involves “infinite” worlds. Well. At least very very large world…
For this purpose, I am using the World Origin Rebasing functions in Blueprint.
I, however, noticed a weird behavior from the values of this origin. So I have a few questions.
- 1 - Is the World Origin Location a 32 ou 64 bits value on the engine side?
- 2 - Is it normal that when we print the value of the World Origin Location, when we go up along an axis, when we reach about 2.1billion (int max value), it loops it back to -2.1 (int min value).
- 2.1 - If this is normal and the real value is more than the printed value, everything is normal.
- 2.2 - If this is normal but the real value is the one displayed, we have an issue.
- 2.3 - If this is not normal. Well…
- 3 - Is it normal that when we print the value of the World Origin Location, when we go down along an axis, when we reach about -2.1billion units (int min value), it DOES NOT loops it back to 2.1 (int max value?)
I think that either the 2 or the 3 is a bug.
But I would tend to say that the 3 is just missing the looping back as it would make no sense to loop the value in a way and not in the other (it forbids you to go back).
I also noticed that, if you look on the x axis for example and go forward until it loops and gets back to world origin “0” on the axis. the “0” seems not to be the same.
How can I tell?
I have an octree that is placed on a grid based on the World Origin location.
Basically, when the world Origin location is near 0, it will snap it to the grid and put it at the 0 position of the world location.
It then uses this position to procedurally generate stars around it.
The thing is, we do not have the same result from the 0 before the shifting and after the shifting.
Proofs:
http://puu.sh/kjzvI/363ade9678.jpg
Original spawn generation
http://puu.sh/kjzDn/86686ff5e9.jpg
After Origin complete loop
You can really see that it’s not the same.
So, what is the real min/max value of the World Origin Location?
Is it meant to loop from max to min value but not from min to max?
Is it normal that after looping the 0 value is different when it’s being forcefully snapped to the grid? (precision loss?)
Those questions are quite important for the generation of our “infinite” universe.
Thanks!