Flickering road textures in terrain

Discussion in 'Content Creation' started by Driv3r1142, Dec 3, 2015.

  1. Driv3r1142

    Driv3r1142
    Expand Collapse

    Joined:
    Feb 15, 2015
    Messages:
    1,941
    A few of the roads on my terrain are flickering. Dont know why, Dont really have any info other than that some are flickering, while a few are not, or do it less than others.
    I will upload a video here in a little bit showing what I mean, but does anyone know what might be causing the texture flickering?
     
  2. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    Z-height? Two textures can't be in the same place. Road textures are actually elevated above the terrain. In T3D that's the decalBias setting, it should not be zero. More like 0.0005 or similar.
     
    • Like Like x 1
  3. Driv3r1142

    Driv3r1142
    Expand Collapse

    Joined:
    Feb 15, 2015
    Messages:
    1,941
    I will check. Last I checked I hadnt made it the same height as the terrain.
     
  4. Driv3r1142

    Driv3r1142
    Expand Collapse

    Joined:
    Feb 15, 2015
    Messages:
    1,941
    I have ZBias and DecalBias. DecalBias is .0005.
     
  5. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    Does this problem affect complete decalroads, or just certain segments?
     
    • Like Like x 1
  6. Driv3r1142

    Driv3r1142
    Expand Collapse

    Joined:
    Feb 15, 2015
    Messages:
    1,941
    It affects certain roads and certain segments usually.
    I have been having issues with roads being "Clipped" in terms of the wireframe being stretched too far, but none of my roads that are flickering are also clipping in this way.
    I will try to upload a video here shortly showing the flickering.
     
  7. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    Hopefully the video will help.

    You could try increasing the decalBias, just to see what happens. I'd double it as a test.

    Are there any decals or anything in that area? (overlapping roads too, anything that's not just terrain + a single decalroad).
     
  8. Driv3r1142

    Driv3r1142
    Expand Collapse

    Joined:
    Feb 15, 2015
    Messages:
    1,941
    Not that I am aware of. I was about to say yes but then I remembered I had a road that didnt have any decals on it that was flickering. Gonna film a quick screencapture video and upload it to my YT.
     
  9. Driv3r1142

    Driv3r1142
    Expand Collapse

    Joined:
    Feb 15, 2015
    Messages:
    1,941
    My screen capture software(MSI afterburner) isnt quooperating with me right now, so its gonna be a few before I get anything filmed.
     
  10. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804
    Try setting decal bias to .0007 or .0008. Don't go much beyond that or your vehicles will have a bunch of flat tires:p.
     
    • Like Like x 1
  11. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    How so? Do decals have collision?
     
  12. Driv3r1142

    Driv3r1142
    Expand Collapse

    Joined:
    Feb 15, 2015
    Messages:
    1,941
    No, the Bias is supposed to adjust the height of the textures. at that point it would look as if your tires are flat.
     
  13. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804
    When you raise the decalbias it actually separates upward the decal from the road below it and gives the impression of
    flat tires. The flickering is some kind of Z fighting. Decals do not have collision.
     
  14. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    I got that part - I just pointed it out in post #2 after all. I simply didn't get the joke. ;-)
     
    • Like Like x 1
  15. Driv3r1142

    Driv3r1142
    Expand Collapse

    Joined:
    Feb 15, 2015
    Messages:
    1,941
    I figured.
    I am currently working on a couple things, but It seems that it may not be the DecalBias or ZBias affecting it.
     
  16. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804
    Don't feel bad bro, I seriously need to learn to read threads better:p.
     
  17. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    No sweat folks.
     
    • Like Like x 1
  18. Scepheo

    Scepheo
    Expand Collapse

    Joined:
    Feb 10, 2015
    Messages:
    601
    Playing around with Z-bias might alleviate your problems a bit, but there's something else you can try: centring your terrain. T3D will quickly run into Z-fighting* (which causes your flickering) issues when you get further away from the origin (due to floating point precision errors). To do this, look at your terrain size and its maximum height property, then place your terrain so their centres align. For example, if your terrain is 2048x2048 with a maximum height of 200 (like Jungle Rock Island), place it at "-1024 -1024 100" (yeah, terrain z doesn't work like anything else).

    * Note that Z-fighting or Z-bias doesn't have anything to do with an objects Z-coordinate. Those "z"'s refer to rendering, it's their depth in screen space.
     
    • Like Like x 2
  19. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    Scepheo, this is useful info. You posted about the limits of T3D RE: floating point precision errors in that map-size thread as well. Do you have any... OK, I may be in the process of answering my own question right now, let's see....
    Floating-point precision and why we can't get around it @ GarageGames

    That was a nice, quick, read which reinforced my understanding of the issue... but it did not answer my question: Do you have any recommendations as to a practical limit for the distance from the origin that we should work -ideally? Clearly the stock maps function and don't seem to need any workarounds, so somewhere beyond that I assume...
     
    • Like Like x 1
  20. Scepheo

    Scepheo
    Expand Collapse

    Joined:
    Feb 10, 2015
    Messages:
    601
    It's impossible to give a hard limit to what's a good idea and what isn't. The post you linked mentions 10 KM from the origin (so 20 KM x 20 KM, although 16384 x 16384 would probably be easier), and I've seen Z-fighting happen before that, so that seems like a good extreme limit for any desert-or-similar projects.

    The biggest problem you'll run into is the fact that the height and material maps are limited to 4096 x 4096. Every time you increase the meters-per-pixel you lose a great deal of control all across the terrain, and the terrain will start to look and feel blocky. The required degree of control over the terrain should, as such, always be your starting point.

    But assuming a flat, desert, outer space or other not-in-need-of-precise-terrain map, your considerations change. The precision for objects and decals (that includes roads) isn't affected by the size of the terrain, but only by their distance from the origin. Around 4 KM away you'll start to notice Z-fighting with roads, but at that distance it's still somewhat possible to alleviate these issues with the Z-bias and DecalBias. This means that as long as precision isn't required near the edges of the map (say, a city surrounded by a desert) you can go fairly big.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice