I noticed that textures are flickering a lot when using big scales. For my application, I defined 1 unit = 1 cm, so I have rooms that are 1000x1000x1000 units big. I guess this is to big, so I will scale down my whole scene to 1 unit = 1 m.
But why does the renderer have problems with this?
And which maximum frustrum far value can you recommend?
I do have weird issues with big “numbers” in a scene, but it’s way higher than 1000. It’s more at the “distance” of 500 000 where you see things getting slightly funky. At close to 1 000 000 the camera jumps and skips all over the place. More than that and it’s impossible to use. But this doesn’t affect texturing.
As @Momoko_Fan mentions, I think this is more of a depth problem than anything else.
It is shows up much on transparent or reflective materials. I tried to attach only one ambient light, but the results are the same. Near plane is 1f, far 1200f.
It’s plain to see, it is a depth precision issue. Specific recommended near/far min/max values would satisfy me.
Does the issue occur only on the object in the screenshot (blue thing)? Or do other objects have similar symptoms? It is possible there’s several co-planar triangles on that object so the issue is apparent only when depth precision is low at that location.
Curious, if you are using a directional light, does changing the lighting direction slightly fix the issue?
I’ve seen dark flickering textures on surfaces that are nearly parallel to the direction of the light… at least it seems so. Moving the light direction fixes it in cases where I can do that.
I’m using point light and ambient light. Even if only the ambient light is attached, the issue occurs. I know this issue with the parallel light direction, but this is something else.
Edit: Ok, I did not realize there is a setting “DepthBits” in AppSettings. Changing it from 16 to 24 bit solved the problem!
I came across similar problem:
I have ambient light and directional light in my app.
loading untextured model from blender, putting textures in app. Blender adds lighting to the scene - removing it greatly reduced the flickering. Now i have quite funny effect: if a geometry goes out of the screen (but not completely, i see about 20% of the shape) the texture disappears.
It might be happening because i quite clumsily put those textures (first quite careless attempt) also i should have probably done that in blender.
@tralala said:
floats lose accuracy if too big or too small.<br />
a + 1 != 1 + a.
Please do not spread misinformation.
a+1 == 1+a
what you probably meant was that
a + 1 - a -1 != 0
Second thing - floats are not losing accuracy if too small or too big (unless we are talking about real extremes in range of 10E30). Entire point of floating point is that it preserves relative accuracy regardless of the scale.
@abies said:
Please do not spread misinformation.
a+1 == 1+a
what you probably meant was that
a + 1 - a -1 != 0
Second thing - floats are not losing accuracy if too small or too big (unless we are talking about real extremes in range of 10E30). Entire point of floating point is that it preserves relative accuracy regardless of the scale.
…which was from a 3.5 year old post because this thread was necro’d for what is probably an unrelated issue without enough information to actually help.
i once tried to create sphere with real-world earth radius, never tried it again
everyone should realise, that common real-world things must be “cheated” in game engine, so user should believe it is true, when it is not
like you can have huge world, but not loaded at once… what is not seen should not exist
Again, I’ll remind folks that this is a 3.5 year old thread that someone resurrected from the dead with a likely totally unrelated problem. Hard to say because not enough information was provided.
So, bravo to the OP for doing a web search first but if the thread is > 2 years old then it’s ok to post a new one with a full description of your problem.