Design Connected is one of the great online 3D model resources out there and recently they also started offering Maxwell ready files which contain the .MXS scene file and separate .MXM materials. That’s great since it saves a lot of time for Maxwell users – it allows you to use their models with any 3D app that has a Maxwell plugin, but you may find some materials aren’t “converted” so well, for example cloth materials. This tutorial will show you how to quickly tweak the cloth materials to create a realistic looking cloth in Maxwell. You can use this basic formula to create most of your typical diffuse looking cloths. Hopefully you’ll also better understand how the r2 parameter works and how its effect is also influenced by a few other parameters.
The default vs adjusted cloth
Out of the box, the cloth material doesn’t look much like the intended cloth. It looks more like a semi metallic specialty cloth (which can look cool too!):
What it’s supposed to look like:
The material from Design Connected is a basic setup of base BSDF and shiny BSDF in a top Layer set to additive mode. It’s way too shiny and the bump is a bit too strong. It’s also missing that typical “fuzzy” look that cloth has at grazing angles.
Adjusting the bump and shinyness
- Uncheck the bump in each of the BSDFs and instead use the Global Bump (click on the Global Properties row). Set the bump strength to 4 or 5. The bump parameter in Maxwell is pretty sensitive and you rarely need to go over 10. Also keep in mind the more contrast a bump map has = use lower bump parameter. If you set the bump param too high you will start to get artifacts in the material.
- This particular material also supplies a “glossy” map. Add it as a Layer mask to the top additive layer. Next, lower this layers opacity to 15%. If your cloth material doesn’t have a glossy map, just set the Layer opacity to 15%.
- For the top BSDF, set the Nd to 1.4 and uncheck Force Fresnel. Also set the roughness to about 55.
- The Design Connected material is using the supplied glossy map for the Reflectance 0/90 in the top BSDF. This is wrong, it should use the main diffuse texture. So set both the 0 and 90 to use the diffuse texture and for the 90 texture, adjust its brightness from 0 to about 40. This will depend on how bright your diffuse texture is to begin with. The idea is to make it almost white but let it retain most of its original color.
Creating the fuzzy cloth look
Because cloth has little hairs frizzled away from the cloth fibers, and the visual influence of these hairs increases as the viewing angle increases, cloth has a brighter soft fuzzy look at the grazing angles. This effect is more visible the darker the cloth is.
In order to create this effect, we need to have a better control over which viewing angles the Reflectance 0 and 90 colors appear. Without the r2 parameter, as you increase the surface roughness the Reflectance 90 color will matter less and less. At roughness 100 for example you can set the Reflectance 90 to any color – it will not show up in the material. Only the Reflectance 0 will be visible. So we can’t create a difference of color based on viewing angle at high roughness levels. And we need to keep the roughness high or the cloth will start looking metallic.
So the r2 parameter is basically an override of the default behavior of the relationship between the Reflectance 90 and surface roughness. The first parameter lets you decide – indifferent of the roughness parameter, at which viewing angle the Reflectance 90 color should begin to appear. The second parameter acts as an overall strength of the effect, with 0 having the most influence. But here things get a bit screwy (CG technical term). The thing is there are more parameters than these two that will influence how much of the Reflectance 90 will actually appear. Here are the “rules” I like to keep in mind when using r2:
- Turn Force Fresnel off when using r2. Both FF and r2 control the Fresnel curve of the material, so they create a conflict if both are active.
- Roughness will still have an influence with r2 turned on, especially between 90-99. First of all, if you set the roughness at 100 it’s as if r2 is unchecked, and you’ll see only the Reflectance 0 color. Between 90 and 99 roughness the r2 effect fades off substantially. At 90 roughness the Reflectance 90 color will be much more visible than at roughness 97 for example. At roughness values lower than 90, there will be a minimal change in how visible the Reflectance 90 color is, but of course the overall surface starts looking more and more metallic.
In the above example, notice also that I’ve set the Nd to 25, from the default of 3. Why:
When using r2, I boost the Nd to 25 or more, for two reasons. One is that with the default of 3, the r2 effect will be minimal, even with a roughness of about 95 (I avoid lower values to keep the cloth looking very diffuse). The other reason is because turning on r2 has an overall darkening effect on the material. Raising the Nd also fixes this darkening, while also boosting the r2 fuzzy effect. All good. This gets the material back to more or less how bright it was when r2 was off. I have no clue why this happens when r2 is on, I just figured to raise the Nd enough until the darkening is gone, and with a roughness already so high, raising the Nd so much will have next to zero influence on overall reflectivity of the material – ie it will not get super shiny. Going over Nd 25 only has very slight impact, so I usually just set it to 25 and don’t mess with it anymore.
Finally, for further fine tweaking you can use the second r2 parameter. Raising it will have a fading effect. Going from just 0 to 5 has a huge influence. But remember you also have a fading control via the roughness. For diffuse looking cloth, I tend to raise the roughness as much as I can while still keeping the fuzzy effect somewhat visible. This is usually around roughness 95-98. There is a big fading of the effect between 98 and 99, so I avoid roughness 99 when using r2. If I still find the fuzzy effect too strong, even at roughness 98, I then change the r2 from 0 to 1-3. This is faster than messing with the brightness of the refl90 texture, which again, just set it so it’s as bright as possible while still retaining some color.
- Turn off Force Fresnel and set the Nd to 25.
- In case you’re using a refl0 texture, copy it also to the refl90 and raise its brightness so it’s almost white but retains some of its original colors. Or go nuts and raise its saturation and change the hue for some interesting fuzzy effects. Some cloths behave in this way, like Taffeta.
- Set roughness between 95-98 (for a diffuse looking cloth, otherwise feel free to use lower roughness).
- Turn on r2 and set the angle to your liking, 75 is a good starting point. Leave the second r2 parameter at 0.
- If effect is still too weak, lower the roughness. If too strong, raise the roughness until 98, and/or raise the second r2 parameter.