Announcement

Collapse
No announcement yet.

Landscape Texture Atlas, ARTIFACTS HELP!!!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Landscape Texture Atlas, ARTIFACTS HELP!!!

    Hi there!!!
    Ive been strugling those days to get rid of those nasty artifacts...
    My base Mat works great but with ARTIFACTS....

    anyway tried some solutions could manage to get anywhere.. i saw the https://forums.unrealengine.com/show...ixel-artifacts

    return Tex.SampleGrad(TexSampler,UV,ddx(UV1),ddy(UV1));

    But it wont compile the MAT...

    Also checked the MipMapLevel Solution, and even thought it worked, it had some minor seams between textures.... AND ALSO it did not compile for ES2 , as a targeting mobile devices...

    CAN ANYONE PLEASE HELP?

    Click image for larger version

Name:	mat1.PNG
Views:	1
Size:	432.2 KB
ID:	1186659
    Click image for larger version

Name:	mat2.PNG
Views:	1
Size:	355.0 KB
ID:	1186660
    Click image for larger version

Name:	mat3.PNG
Views:	1
Size:	354.7 KB
ID:	1186661
    Attached Files

    #2
    I used to struggle with this earlier but now that we are not limited to ~13 or so texture sheets I can't really see a reason to do it this way anymore. May I ask why you're not just setting sampler source of the texture 2d to shared instead?

    Comment


      #3
      Can you share a screenshot please? Am targeting mobile so it won't compile since there's a limit on using many textures

      Comment


        #4
        I am quite sure that
        return Tex.SampleGrad(TexSampler,UV,ddx(UV1),ddy(UV1));
        will not compile because that is HLSL

        https://docs.unrealengine.com/latest...erence/Custom/

        Also, ddx and ddy are not available for ES2

        Comment


          #5
          Is there any workaround for having many layers for es2?

          Comment


            #6
            Tried Some other solutions.. didnt get me anywhere....

            does anybody knows, if theres a TRUE TEXTURE CROP inside MATERIAL EDITOR to be used on landscapes???

            or maybe shared wrap texture shader source.... [ could get more than 3 per component : which from what i read is the current limit... ]

            the only workaround i see is with TEXTURE ATLAS... but as for now am struggling hard to getthis to work...

            can someone please help???? am trying a smaller texture with black edges between my 4x4 ATLAS , but again cant get any NON ARTIFACT RESULT

            ES2 [ MOBILE ]

            Comment


              #7
              The Most "Well Seen" Result was By Disabling MipMaping, i advise all those who develop Mobile Landscape to do the same UNTIL a real solution is UP :-)

              Comment


                #8
                There are a few ways you could handle this:

                1) Make your function output just UVs and then sample using a regular TextureSample node but set to "Derivative" mip mode. Then you need to plug in ddx, and ddy of UVs of the same scale but without the atlasing and the mips will be perfect.

                2) If you need to sample the texture in your function, you need to also pass in ddx and ddy to the function using the ddx and ddy nodes. The reason being that ddx and ddy are actually exposed using macro's with capital DDX,DDY, but due to the way the compiler parses custom nodes it does not seem to work with that either so the only thing I have seen that works is to use the nodes and pass them in.


                I just re-read your post and node and it seems like the only thing you were doing is the gradient sample so you shouldn't end up needing a custom node at all, so option #1 is your best bet.
                Ryan Brucks
                Principal Technical Artist, Epic Games

                Comment


                  #9
                  Also note that even if you solve your mip issue you may see a seam because the texture filtering and mips will blend to the other textures. This too is solvable and I have some material code to do it, but you need to author the textures a certain way (you can use a material to convert them too). If you want to fix just mip0 then you need to have 2 extra pad pixels per cell, and then for each additional perfect mip you want,y you must double the pixels sacrificed.

                  For example, if you render 8 extra pixels (so 4 per side), that will get you 3 perfect mips which should be pretty good.
                  Ryan Brucks
                  Principal Technical Artist, Epic Games

                  Comment


                    #10
                    I have a problem as same. It works well on editor but It doesn't work on mobile with ES2... How should I do? someone help me please..

                    Comment

                    Working...
                    X