What's causing these shader artifacts?

Those ThingsThose Things Posts: 1,113

I'm getting these weird pixelated artifacts around the edges of my mesh:

image
They are not there in the non-raytraced views. They are also not on the texture map itself. Here is the texture shaded view: 
 

image
And here is Filament: 
image
Does anyone have any idea what's causing this? 

ETA: I have the latest nvidia gpu driver, running on an RTX 2070 Super. I have taken the texture map into photoshop, and examined it closely, and these artifacts are not present. I have adjusted smoothing in every possible way, even turning it off, and nothing works. Ditto for corners across materials. I have the latest version of Studio, and I have restarted it, and my PC, to no avail.

Post edited by Those Things on

Comments

  • barbultbarbult Posts: 23,049

    Maybe compression artifacts. Look in Render Settings on the Advanced tab and increase the Medium threshold and High Threshold (double them). If that is not enough, double them again. This will use more memory on the graphics card, so don't make them higher than needed.

  • Those ThingsThose Things Posts: 1,113

    barbult said:

    Maybe compression artifacts. Look in Render Settings on the Advanced tab and increase the Medium threshold and High Threshold (double them). If that is not enough, double them again. This will use more memory on the graphics card, so don't make them higher than needed.

    Thank you! I tried it, doubled it twice even, but it didn't work. :(  

  • barbultbarbult Posts: 23,049
    edited January 2022

    Did that make any improvement at all? If so, that would seem to indicate that it is compression artifacts and you are on the right track. What values did you try for medium and high compression settings, and what is the size (dimensions) of your texture file? If it didn't change anything, either you need still higher values or it is some other problem entirely.

    Post edited by barbult on
  • barbult said:

    Did that make any improvement at all? If so, that would seem to indicate that it is compression artifacts and you are on the right track. What values did you try for medium and high compression settings, and what is the size (dimensions) of your texture file? If it didn't change anything, either you need still higher values or it is some other problem entirely.

    Its possible, but it could also be something different. I'm getting something similar on a bunch of primitive planes. I don't know if in my case it would be texture compression since I tried removing all of the textures & set the Base Color to 255 255 255, and it went away. However, as soon as I add enough Saturation and/or Value to the color values(HSV) or add a texture to the Base Color, the artifacts show up again. So I made a new primitive plane and changed the number of Divisions from 1 to 100, copied/pasted the surface settings from the other plane, and the artifacts went away(see images below). So the issues may or may not be related.

    I also noticed the artifacts would disappear if I rotated the dome so that the main light source was coming from behind the camera. However, they would appear again if the camera was repositioned to the same orientation in relation to the main light source's direction. I guess I have my work cut out for me since now I have to possibly remake all of the primitive planes unless there's some way to change their divisions without having to remake them. frown

     

    Artifacts1.jpg
    1621 x 1235 - 333K
    Artifacts2.jpg
    1037 x 898 - 155K
    Artifacts3.jpg
    965 x 774 - 144K
  • Those ThingsThose Things Posts: 1,113
    edited January 2022

    barbult said:

    Did that make any improvement at all? If so, that would seem to indicate that it is compression artifacts and you are on the right track. What values did you try for medium and high compression settings, and what is the size (dimensions) of your texture file? If it didn't change anything, either you need still higher values or it is some other problem entirely.

    Well, I cranked both values up to 4096, instead of leaving the medium threshold half of the high threshold, and that did the trick! They are now both at 4096. Now, my only question is why? It's just a simple prop with a 4k texture. I load and make those all the time. What's so special about this one?

    Since this is working, I dropped the texture resolution back down to 2048, and still no problems. Well, except that I have a simple crate that wont render without artifacts unless I crank up the texture compression settings. :(


     

     

    Crate.jpg
    1070 x 881 - 321K
    Post edited by Those Things on
  • cgidesigncgidesign Posts: 432

    The compression in general works like explained below:

    Medium Threshold: Any texture with a resolution below this or equal to this value will not get compressed
    Inbetween Medium and High Threshold: Any Texture with a resolution in this range will get medium compression
    High Threshold: Any texture with equal or greater resolution will get maximum compression

    E.g. if you have a texture with resolution of 4096x4096 pixel and you set High Threshold to 4096 then you tell Iray to use max. compression. This can lead to visible compression artifacts.

    If you don't want compression in this case you need to set Medium Threshold to more than 4096 (e.g. 4097) and High Threshold to e.g. 8192.

    This way you tell Iray: any texture equal to or less than 4096 pixel will not get compressed, any texture inbetween 4096 and 8192 will get medium compressed, any texture equal or above 8192 gets maximum compressed.

    A thread discussing the compession issue is here:

    https://www.daz3d.com/forums/discussion/comment/7266671/#Comment_7266671

  • Those ThingsThose Things Posts: 1,113

    cgidesign said:

    The compression in general works like explained below:

    Medium Threshold: Any texture with a resolution below this or equal to this value will not get compressed
    Inbetween Medium and High Threshold: Any Texture with a resolution in this range will get medium compression
    High Threshold: Any texture with equal or greater resolution will get maximum compression

    E.g. if you have a texture with resolution of 4096x4096 pixel and you set High Threshold to 4096 then you tell Iray to use max. compression. This can lead to visible compression artifacts.

    If you don't want compression in this case you need to set Medium Threshold to more than 4096 (e.g. 4097) and High Threshold to e.g. 8192.

    This way you tell Iray: any texture equal to or less than 4096 pixel will not get compressed, any texture inbetween 4096 and 8192 will get medium compressed, any texture equal or above 8192 gets maximum compressed.

    A thread discussing the compession issue is here:

    https://www.daz3d.com/forums/discussion/comment/7266671/#Comment_7266671

    Perfect explanation, thank you so much. Between you and Barbult, I've got this sorted out now. Current settings of 2048 Med and 4097 High, seem to be doing the trick.

  • PerttiAPerttiA Posts: 9,293

    The compression algorithms also don't like all colors, certain shades of red are notorious, but there might be others as well.

  • Those ThingsThose Things Posts: 1,113

    PerttiA said:

    The compression algorithms also don't like all colors, certain shades of red are notorious, but there might be others as well.

    I had a feeling that was the case. Thank you for confirming. 

  • barbultbarbult Posts: 23,049

    I've had the greatest problem with visible compression artifacts when there are strong color diferences between adjacent areas, like a red trim on a white garment. One issue with relying on the Render Settings compression values to resolve the problem, is that they may be set to different values by different users. I don't even know how to create a preset for it, or if it is possible.

  • Those ThingsThose Things Posts: 1,113

    barbult said:

    I've had the greatest problem with visible compression artifacts when there are strong color diferences between adjacent areas, like a red trim on a white garment. One issue with relying on the Render Settings compression values to resolve the problem, is that they may be set to different values by different users. I don't even know how to create a preset for it, or if it is possible.

    Maybe it can be included in a render settings preset? 

  • barbultbarbult Posts: 23,049

    Those Things said:

    barbult said:

    I've had the greatest problem with visible compression artifacts when there are strong color diferences between adjacent areas, like a red trim on a white garment. One issue with relying on the Render Settings compression values to resolve the problem, is that they may be set to different values by different users. I don't even know how to create a preset for it, or if it is possible.

    Maybe it can be included in a render settings preset? 

    I didn't see the option. Please pose how, if you discover it.

Sign In or Register to comment.