Material Rendering

Getting a bug in rendering a material with normal map.

It seems that your textures have the resolution of 797x532 pixels. Unreal will import these textures but will not calculate MIP maps for them, that feature only works on “power of 2” sized textures. Without mip maps the texture will show a moire pattern when the camera is further away, I’m guessing that’s what you are seeing. Try to scale them down to 512x512, reimport and double check that mips are calculated.

I’m not sure what’s going on… The issue is related to textures not materials or material instances. Maybe the texture samplers need to be adjusted, I don’t know. What you can try is to delete all texture samplers involved and drag the (now properly sized) textures to the material editor again.

I’m trying to set material onto object at run-time.

I’m creating material from texture & displacement map image file. These image files are loading from folder using Victory Plugin’s “Load Texture 2D from File” Node.

Victory Plugin Link :

I’m creating the material instance dynamic of the “test material”. Now I’m setting the texture and displacement parameter as shown in figure 4.
After creating material instance dynamic, I’m setting this material to the object.

figure[1] test material:
figure[2] texture:
figure[3] displacement map:
figure[4] Method:

Now here is the problem.

When I directly create material in material editor from texture and displacement map and set it onto object. It doesn’t generate** moiré pattern.**

But when I run-time set the material onto object using figure [4]. It will generate moiré pattern.

Here are the sample screen shots of both.

figure[5]: Material Editor result:
figure[6]: Runtime result: Imgur: The magic of the Internet

I think the “Load Texture 2D from File” Node is not calculating the Mip Map correctly.

Yes, you are probably right, the mip generation seems to be skipped entirely. I can think of two fixes:

  • #1: Importing the textures beforehand (using the content browser) so Unreal has the chance to produce those mip maps during import.
  • #2: Trying to load .dds files (which contain mips maps) using the Victory plugin.