This option allows to create a smoother transition between Bricks and Mortar - 0 applies no smoothing, and 1 smooths across the whole mortar width.
Mainly useful for displacement textures.
Details
- Reviewers
Brecht Van Lommel (brecht) Thomas Dinges (dingto) Sergey Sharybin (sergey) Martijn Berger (juicyfruit) - Commits
- rCcb72f075babd: Add smoothing option to the Brick Texture
rB199d7dc70dc4: Cycles: Add smoothing option to the Brick Texture
rBSb2974d7ab79a: Cycles: Add smoothing option to the Brick Texture
rC1c0c44e0ff63: Add smoothing option to the Brick Texture
rBb2974d7ab79a: Cycles: Add smoothing option to the Brick Texture
Diff Detail
- Repository
- rB Blender
Event Timeline
Seems fine, but can we enable some smoothing by default, so you get better looking displacement without having to know to tweak this setting? I'm not sure what a good default value would be.
| intern/cycles/kernel/shaders/node_brick_texture.osl | ||
|---|---|---|
| 31–32 | The builtin OSL smoothstep(0.0, 1.0, x) does the same I think. | |
By the way, eventually it would be nice to automatically filter all texture types with ray differentials. But unfortunately these are not available in SVM currently.
Yes, OSL's smoothstep is indeed better here.
I'm not sure about default smoothing, since it would change existing scenes - maybe it'd be possible to set smoothing to zero while loading .blends, but having a default in new nodes?
Should be possible in versioning code, or setting the default value in node_shader_init_tex_brick like this:
for (bNodeSocket *sock = node->inputs.first; sock; sock = sock->next) {
if (STREQ(sock->name, "Mortar Smooth")) {
((bNodeSocketValueFloat*)sock->default_value)->value = 0.1f;
}
}