How do I properly use Roughness and Specular?

Started by Higuchi, March 03, 2021, 07:52:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Higuchi

Hi all,

Let's see the attached image, this is just one example. I usually use architectural materials which are needed to be sophisticated to express a real image. I always use 4 kinds of texture data, which are usually gotten on online texture stores, on Plastic base material.

1. Diffuse
2. Roughness
3. Specular
4. Bump

1 and 4 are easy to understand how effective it is. But, my question is the difference between 2 and 3. If I use both or either, the consequence usually looks same or a bit difference. How do you properly use Roughness and Specular?

Best,

KristofDeHulsters

Hopefully the image below answers your question. Basically the difference is that your specular map controls the amount of sharp reflections you are getting from your material where as the roughness map controls how diffuse the material is. There are definitely some objects where the specular and roughness look very similar. If you use bodywork for cars, you'll see the difference between the two right away!

Higuchi

Thank you for the helpful image! It's still difficult for me to intuitively understand. I'm going to test some cases to learn the difference, anyway.

KristofDeHulsters

No problem, it isn't that intuitive for me either. I would definitely do a little test with a car model to see the effect in your render. That should clarify better what is going on as it is a complex shape with lots of reflections. Good luck!

DMerz III

#4
Specular controls the color+amount light being reflected off a surface, and roughness controls the random scattering of the rays reflecting off a surface. Specular can have color information (such as make the highlights appear green) but Roughness is only looking at light vs dark values to determine how 'randomized' those surface bounces are.

Darker values meaning lower roughness (or glossier - less random scattering of reflections). Lighter values = higher random scattering of reflections which makes the surface appear more diffuse or 'matte'.

Specular is somewhat similar because you can also use the value (light vs dark) to control how 'reflective' a surface is but it does not change the random scattering of rays. You can have a surface that is less reflective (by using a darker value color) but still be 'glossy'  or 'low roughness'.

Hopefully that helps with the difference.

For more learning - I would suggest the Keyshot 10 manual for a little breakdown. https://manual.keyshot.com/manual/materials/general-parameters/

Also - the principals of how this works is not unique to Keyshot, if you do some searching for PBR (physically based rendering) materials and how they're structured, you'll find LOTs of videos that explain this all a bit more illustratively.

And lastly - often the maps we find online are produced with a workflow that may need to be tweaked to work properly in Keyshot. I often find that I need to change the gamma of an image in the textures tab for it to read the values correctly, especially for maps that are reading black and white values (like roughness maps) - to experiment with this, try changing the Contrast parameter on a texture node to 0 instead of 1, and see if that is giving you a more predictable result.

Higuchi

Thank you!
The difference between each map seemed to be a bit difficult for me to intuitively understand, actually. But through your simplified explanation "Specular can have color information (such as make the highlights appear green) but Roughness is only looking at light vs dark values", I understand them a bit, of course not perfect. Surely, such as some complex metal material, while they don't have any hue on the diffuse, they look some color by the specular, it's just an example.

This field looks much deeper than I thought firstly. But, there would not be any short cut way except for understanding the principle.

richardfunnell

That's a great explanation, David!

@Ryosuke It's a little bit older, but I recorded a webinar that goes into specular vs roughness textures which you can find here: https://youtu.be/1jJzQ82NEzw?t=1012 

This recording used KS6, but the concepts still apply (and to David's point, apply almost universally to other engines and workflows).

Higuchi

#7
Thank you so much, Richard!

It's the first time to watch it, and it's so really understandable for me to learn the basic knowledge. That is exactly what everyone had to firstly watch before spending the time for learning another things!

By the way, I'm curious about how much point we should firstly set for the bump. While you recommend "0.2" point, it depends on how much range between black and white the bump map has, doesn't it? Namely, when I make bump or roughness texture data from the single diffuse bitmap data, I'm always debating whether I should set the range from the darkest to the brightest value, since I can freely select it by using level adjustment command on Photoshop. This is my understanding, if I use from nearly 100% black to 100% white level for the bump map, I should firstly try "0.2" point, and then I would adjust it as it looks proper, right?

richardfunnell

Glad it helped!

I don't there's an absolute right/wrong for bump textures, but if you have a technique that works well for you (like adjusting the while and black values in PS) or changing contrast like David suggests, then go for it! I don't like using a high bump value since it can look too dramatic.

The other reason I suggest using less than 1 for the bump texture mostly has to do with mapping; when using the standard box mapping techniques larger values tend to create artifacts where the bump "catches" the texture from a perpendicular projection direction. For example, when adding a tile texture to a floor, artifacts are visible when using high values because the texture is being captured from the sides as well. Changing to planar projection, in this example, would fix the issue; and higher bump values can be used. I try to use planar or UV projection (when possible) for flat surfaces.

Higuchi

Thank you again, Richard!

Could you please tell me more details about that you mentioned "when using the standard box mapping techniques larger values tend to create artifacts where the bump "catches" the texture from a perpendicular projection direction." I can almost understand your caution, but what kind of specific situations does cause this error?

While I tested two types projection type "1.Box" and "2.Planear", just under this condition, they look totally same. I think that even if I use completely flat surface model such as a floor and a wall, the appearance would be totally same, right?

Anyway, your sophisticated consideration is always so helpful for us!

richardfunnell

This example is a complete corner case, and you probably won't run into it very often (if ever). In the attached images, the material properties (metal, roughness 0.05, 16 samples) are the same, and use the same bump texture. The only difference is box vs planar mapping; both have the same bump height.

In the planar example, the reflections are more "correct" since the brushing is linear and the highlights run across the grain direction; in the box map version the reflection is much more muddy. Again, this isn't a huge deal for most scenarios, but I would simply use planar projection when possible (on a wall or ground, for example) to get a better representation of the bump map.

In your example, with a less reflective material and less extreme angle, no real difference is visible.

Higuchi

Wooow! Looks totally different, I tended to misunderstand. Honestly speaking, I can't intuitively understand why it happened due to lack of CG experience. But, anyway I learned there are indeed a bit some cases which output different appearance, Thank you so much. I'm going to check what factor causes it by comparison of some conditions.