In the game engine at certain distances. Objects would appear with strange squares blinking on the edges another thing is when objects are placed on a plane “like a tree on a ground” when far away the edges start blinking with squares i tried a further distance but no matter the distance the same issue happens.
I dont get it i tried what you said on your other post the 3D objects still are fighting with each other. My game is very high poly and its a large game with big enviornments i cant properly place far objects without them fighting one another.
Is there like a feature in Blender were this issue can be resolved?
Putting them in the air away from the ground still wont help
The Z-Buffer typically runs with decreasing precision on further distance. That is the reason why you discover z-fighting at larger distance rather than close distance.
The solution is the same, ensure you have enough space between overlapping faces.
While this sounds simple it might be not, as the question is what is “enough”?
Nevertheless you can solve this issue be using LOD. The far away (low detail models) can have a bigger overlapping distance (if it is necessary at all).
This is one of the reasons why lots of early 3d games used mist to cover up far distances. It’s also the reason so many early 3d games were set indoors.
In your game, if an object is very far away it’s going to be pretty small on screen and such problems should be unnoticeable. Unless you zoom in close, in that case you can set the near clipping of the camera to be higher/further away from the camera making the z-buffer deal with a smaller distance range. Either use two different cameras, one for normal distance view and another one for zoom and switch between the, or use python to chance the clipping distance of the main cam when zooming.
I notice if the game was shrunk to fit the grid in 3D view it kinda fixes the issue however it does not do well with character movment the character would easily even at lower speeds break through the structure and so i had to reset the game back to its original size.
Your right on the mist thing smoke it kinda does help but partly in my own experiance and most levels dont use mist.
Il try to do some more editing to see what i can do about this if anyone has some opinions please let me know.
Oh thank you Monster i realized what i did wrong and you were right the problem was some models were joined with other models and had to be reworked on and like you said to give it enough space i asure they were not touching at all and when played on the game engine the issue was resolved.
I do not think that was the reason. The main reason for mist is:
A) adds mood
B) hides the hard cut at the end of the camera frustum
C) mist with z-Buffer is very cheap
Indoor scenes used a complete different technique for rendering. Typically it was not Z-Buffer but a BSD-Tree with face sorting. This applied very well with small rooms (indoor), but very badly with large areas (outdoor).
I guess you forgot to scale the near and far clipping distance with your scene. Otherwise there would be no difference.
The near and far clipping distances determine the granularity of the z-Buffer. The “enough” space can be reduced by reducing the distance between near and far. Obliviously you can’t see that far anymore. So you need to balance the view range with the precision.