2
\$\begingroup\$

When I bring my Blender file into Unity, I will attach the texture maps from my Blender material (left) to the Unity material (right) as follows:

  • diffuse/color map --> albedo

  • normal --> normal

  • roughness --> ?

  • specular --> ?

  • displace ---> ?

  • metalness --> metalic ?

I haven't found matches for the roughness, specular, or displacement maps. What should I do with those maps?

\$\endgroup\$
5
  • \$\begingroup\$ If you don't need them, don't use them. If the resulting visual differs from what you want, share what you have and what you want it to look like instead, and we can suggest ways to adjust the Unity material to achieve the effect you want. \$\endgroup\$
    – DMGregory
    Commented Jul 19, 2020 at 22:05
  • \$\begingroup\$ basically the only map that i need to use is the roughness. In blender, it control or mask which part of the surface has smooth or rough feeling. Smooth area will reflect light more and looks more 'glossy' while rough area will scatter the light. \$\endgroup\$
    – andio
    Commented Jul 19, 2020 at 22:20
  • \$\begingroup\$ Presumably you tried using the smoothness property in Unity for this then? Did you run into any trouble testing that out? \$\endgroup\$
    – DMGregory
    Commented Jul 19, 2020 at 22:21
  • \$\begingroup\$ @DMGregory yes, that was what i thought before. the problem is the smoothness parameter does not have the little box on its left where i can drag drop texture there. How should i connect the texture then? \$\endgroup\$
    – andio
    Commented Jul 20, 2020 at 7:28
  • \$\begingroup\$ This also depends on the shader you are using. Unfortunately the terminology is not really consistent among the standard shaders shipped with Unity. Especially between the three different render pipelines URP, HDRP and legacy. \$\endgroup\$
    – Philipp
    Commented Jul 20, 2020 at 9:10

1 Answer 1

2
\$\begingroup\$

the problem is the smoothness parameter does not have the little box on its left where i can drag drop texture there

That's because smoothness only needs a single channel, so it's common to pack this data in as the alpha channel of another map you're using to be more efficient with texture lookups in the shader.

(Remember that since smoothness is the opposite of roughness, you may need to invert the roughness map you're using when applying it as an alpha channel. You'll also want to save the result as something like .TGA or .PSD, as PNG compressors like to assume that zero-alpha regions are transparent/invisible so they can change the colours there to make the image compress better)

In the built-in or Universal Rendering Pipeline default shader, you have the option to take your smoothness from the alpha channel of either your Metalness texture, or the Albedo texture.

URP material inspector showing smoothness source drop-down

If you're using the High-Definition Rendering Pipeline, the setup is a little different, and you have multiple different variants you can use. Since it looks like you're using specular and displacement maps, you can set the "Material Type" to "Specular Color" and the "Displacement Mode" to pixel or vertex displacement, whichever is more appropriate for your effect.

That gives you a set of parameters that looks like this:

HDRP Material inspector

Your displacement map would go into the "Height Map" property, and your specular map into the "Specular Color" property.

Metalness and Smoothness are packed as channels into a single "Mask Map" as laid out in the documentation:

Color channel     Map
-----------------------------
Red               Metallic
Green             Occlusion
Blue              Detail mask
Alpha             Smoothness

If you want a material effect that's not adequately covered by the options above, I'd recommend posting a specific question about that. Show what the material should look like (in Blender or other references), and how you've attempted to build it in Unity so far, and users here can recommend options to better-match that effect - even creating your own new material shaders if you need a unique mix of features not present in the built-in assets or options available on the Asset Store.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .