- Home /
Glitches issues (huge world) 20k x 20k
hey i am using the Floating Origin script solution that would fix this glitches,
you know when you go to far from the space origin and stuffs that u have start glitch between each other. I am building a very big map and i use this in my test scene:
U-FPS the character and simple terrain from unity and i magnifying the terrain to 20000 X 20000.
then i place may say 30 buildings in a line from the one corner to the other corner and the start running. so the first building ofc i don't see any glitches, but when i come to the we say to the twentieth building the i see glitches. and i use the FO script.
the script is placed in my character camera there it should be. and i see in my scene that the script is working , i move and when i go 100 units from the origin then i flips back to the origin and the world (terrain and the buildings) flips towards me.
I'm a bit bad at explaining, if you don't understand me (Click Here) so can you see the video
so how to solve this glitches issue??? i thought this FO should solve this!!
.
2H later
I kind of find the problem.
it is the terrain that is too large. for I minimize the terrain to 2000 x 2000 and placed it in the same place where the building where I saw it glitched and no glitches were found. the problem now is that in my real scene I already have a terrain that I want to avail myself of that I have built up. I understand that I may need to be split up my terrain into several pieces. but how do I do that? and is this the solution?
Have a video of this to (Click Here)
FO = Floating Origin
solution
i find the solution I bought this and this is good sh't
Wow, that's bad. But I don't think your problem is floating point precision. Floating point precision errors shouldn't even be visible until you get out around 20,000 units out. A typical FO threshold is 6000 units, not 100.
Unfortunately I'm not familiar enough with the graphics side of Unity to tell you what the problem is. But its not floating point precision.
I kind of find the problem. it is the terrain that is too large. for I $$anonymous$$imize the terrain to 2000 x 2000 and placed it in the same place where the building where I saw it glitched and no glitches were found. the problem now is that in my real scene I already have a terrain that I want to avail myself of. I understand that I may need to be split up my terrain into several pieces. but how do I do that? and is this the solution?
Personally I think it is floating point precision, and I believe the problem is because when you are at the far corner of the terrain, even though the camera is near the origin, the terrain object which is so large, has its origin at the opposite corner which is therefore ~28000 units away from the origin.
Therefore your solution of splitting the terrain up should work well as then no object that is being rendered will be further than ~2800 units which should be fine.
If you have a heightmap that you are building your terrain from it should be quite easy to split the terrain up and set the heights of each segment to a part of your heighmap, else you could write an editor script (or runtime though editor would be better) to break up your terrain. Check out the TerrainData class!
http://answers.unity3d.com/users/358112/the-watzr.html <--SA$$anonymous$$E PERSON
Dude.. you are going to need to learn how to program to solve this. There are lots of examples of people using terrain chunking. http://lmgtfy.com/?q=unity3d+terrain+chunks
Answer by adde210 · Aug 30, 2014 at 06:34 PM
I answer myself, I found this solution that works fine for me.
Answer by alok-kr-029 · Aug 28, 2014 at 10:19 AM
try this may be this can help http://docs.unity3d.com/Manual/script-AntialiasingAsPostEffect.html
this answer does not belong to my question
but thank you for the tips of graphic blur on edges
the Q is about how to stop the glitching between object and the terrien and i found out that i cant have a big terrain and i need to cut my terrain that i have (that is 20kx20k) in to chunks or something.
I do not even know if this is the solution to cut or whether it is through the script or how to solve the problem with the glitches
look at the Q again, and read it probably also check the videos to see what I mean
It CAN be the floating point precision, because at 20,000 x 20,000 you lose a lot of precision , if the terrain size was at maximum of 9999 x 9999 you would be able to move objects at millimetre precision but now you are at over that of 20000x20000 so you only have a centimetre precision, and that can maybe cause the jittering of your object ?
This explains way better read it pls :) http://www.davenewson.com/dev/unity-notes-on-rendering-the-big-and-the-small
Answer by AngryBurritoCoder · Aug 29, 2014 at 09:27 PM
It CAN be the floating point precision, because at 20,000 x 20,000 you lose a lot of precision , if the terrain size was at maximum of 9999 x 9999 you would be able to move objects at millimetre precision but now you are at over that of 20000x20000 so you only have a centimetre precision, and that can maybe cause the jittering of your object ?
This explains way better read it pls :) http://www.davenewson.com/dev/unity-notes-on-rendering-the-big-and-the-small
Hey Fal it's a bit pathetic that you come in to my question and tell me I'm somebody else. I went in to the_W .... and saw that he / she had a similar issue as me. but do not see that you had something sensible answer to his / her question. I want to slice my map like on this (video) but i am using the free vertion of unity3d
how far can we go in unity before its start to jittering?
or how big platform area can i have before enay jittering providing Effects ?
so the maximum of the terrain should be max 2000 X 2000 big ? or 200 x 200?
beosound that it's gonna start jittering?