Fencing anti-alias problem.

Discussion in 'Track Modding' started by toebee, Feb 25, 2012.

  1. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    Does anyone have any suggestions on what may be causing this and how to fix it? I have tried different settings on my video card, in game, texture, and on the material itself. Nothing seems to make it better. Any help would be appreciated. Thanks.
     

    Attached Files:

  2. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    1. enable mipmapping
    2. if you have mipmapping, then you probably have too much negative lod bias

    And then there's the question if you're using alpha blending or alpha test (chroma transparency)

    With blending that would be enough.
     
  3. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
  4. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    Mipmapping.
     
  5. DJCruicky

    DJCruicky Registered

    Joined:
    Jan 25, 2012
    Messages:
    1,592
    Likes Received:
    1,121
    See if you get any better results switching on 'Antialiasing Transparency' in your NVidia drivers? Only a guess I need to warn you.
    By the way, it kills FPS, so expect to turn it straight off.
     
  6. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    I wasnt using any mipmapping before with a bias of 0. When I turn on mipmapping the image gets blurry. I added some negative bias to make it sharper but then I run into the same problem. Any suggestions on mipmapping settings? I see a whole bunch.
     
  7. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
  8. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    I already had it set to multisampling. Setting it to super or off didn't have any noticeable effect.
     
  9. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    It is the case.
    A solution (doesn't remove it completely, but reduces a lot) is to use mipmapping and adjust lod bias to a value that gives good compromise between bluriness and moire effect.

    That is of course if you're using blending, as mentioned before. If yo use alpha test (chroma) for transparency then there is also a matter of alpha channel value in mipmaps that needs to be dealt with.


    Other stuff that helps is anisotropic filtering but this is something every user sets individually anyway (nice feature in game engine would be to allow modders to set anisotropy bias for individual textures aswell).
     
  10. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    I think im using alpha test (chroma). That is I have the source blend to one and dest to zero and the chroma checked in the material rollout. I will give the other way a try but I believe it had no effect the last time I tried.
     
  11. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    Changing the way the transparency is shown doesn't seem to have any effect on the moire effect.
     
  12. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    In a way having the moire effect is "realistic". You can observe it in real life too if you have the right (or wrong) kind of structure.
     
  13. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    That maybe but it seems to be exaggerated. I went through a ton of mipmap settings. Some make the appearance fuzzy some sharp. Then I would adjust the bias to make it look decent but I would always end up with the same moire effect.
     
  14. mianiak

    mianiak Registered

    Joined:
    Oct 5, 2010
    Messages:
    691
    Likes Received:
    46
    You could try make your wire texture um,, how to put it,, make the wire parts it's own mesh and material and instead of having the whole wire on the texture, have a section of it and tile it. You will end up with 2 faces together, 1 with the wire tiled, the other with the poles and safety cables.

    Keep the texture the same size, but redo the texture as if you had just enlarged a section (but don't just enlarge it cause it will look bad, re-do it again). Then go remove the wire parts from the existing texture. Now you should have no blurry mipmaps, if you still do, then try manually making your mipmaps.

    To duplicate the mesh, copy the fence object to a new object, then in poly submode, extrude it a few mm (bout 5) then switch to edge loop submode and select the edge loop, then ctrl + click poly submode (this will select the sides that were created from the extrude), then delete them, set your new material ID use uvw xform to set the tiling.
    Now just attach this new mesh to the existing fence mesh and your done.

    [ED] Why you extrude it like that is just to move it evenly away from the other mesh, so they aren't on top of each other, and use local normal when extruding.
     
  15. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    ..
     
    Last edited by a moderator: Oct 18, 2013
  16. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    I just tried this with a section. Increasing the size of the chain link texture didn't really help for me. I have a 512x512 texture with one link now. Even with my own mipmaps. It does help having the chainlink on another material because I can fuz out most of the anti-alias without making the post fuzzy. Im still playing with it but so far no clear (pun intended) solution.
     
  17. CdnRacer

    CdnRacer Banned

    Joined:
    Feb 4, 2011
    Messages:
    1,894
    Likes Received:
    31
  18. deak1944

    deak1944 Guest

    Required:
    Direct3D 10
     
  19. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    This sample was written in DX10, that's why it requires DX10, but the trick itself only requires DirectX 8 vertex shaders, so you could do it on GeForce 3 Ti. And it's not the only way of doing it.

    Either way, it's too early to dig into this kind of details. ISI needs to focus on more important things.
     

Share This Page