4
$\begingroup$

Learning Blender+Cycles (2.79b), I'm trying to experiment with vertex displacement and bump mapping.

My understanding: bump mapping is to adjust face normals and create shadows/highlights suggesting (inexistent) height variations, while displacement truly changes the vertex height.

In Cycles:

  • I created bump mapping using a bump map for the normal value of a Diffuse BSDF node.

  • I tried to create actual displacement using the displacement input of the Material Output node.

On the left, the bump mapping result, on the right the displacement result:

enter image description here

It appears the result is the same (for the magenta texture), and looking at the edge of each sphere confirms no displacement of mesh vertices.

Material settings used

For bump mapping:

enter image description here

For displacement:

enter image description here

Question 1: How does work the Displacement input of the Material Output node? The latest documentation (2.79) talks about three modes (bump mapping, displacement, both), but doesn't explain how to use modes.

Question 2: In the documentation (2.79) two nodes are expected to be connected to the Material Output node: Displacement and Vector Displacement. Both seems to be about actual displacement. None are present in the latest version of Blender (2.79b). Have they been replaced or removed in 2.79b?

I saw in the jumble of Blender forums, that Displacement may be only accessible when the Feature Set option is set to Experimental in Render tab of the Property Editor. But activating the option does do nothing (even with Blender restarted).

$\endgroup$
  • $\begingroup$ The first question is related to this post. $\endgroup$ – quiliup Aug 14 '18 at 20:24
3
$\begingroup$

Question 1: How does the Displacement input of the Material Output node work?

Depends what feature set you are using for rendering:

  • In Supported feature set it does Bump mapping, same as plugging Bump node into all your shaders.

  • In Experimental feature set is follows what you set in the Material properties:

    enter image description here

    So for True Displacement you need to set the feature set to Experimental, and set a setting for the Material. More on this here:

    Blender Cycles True Displacement

Question 2: In the documentation (2.79) two nodes are expected to be connected to the Material Output node: Displacement and Vector Displacement.

The documentation is continuous work in progress and does not adhere to any specific Blender version. There might be sections outdated or put beforehand of features that will come in future, like in this case Vector displacement.

$\endgroup$
2
$\begingroup$

For actual mesh displacement to work on the Material Output Displacement socket, you need to activate micro displacements and set the right settings in a few places. Andrew Price does a very good tutorial where he explains exactly how to do it. I followed the tutorial and it worked. In case my link doesn't work, the tutorial is called "Introduction to Microdisplacements" at blenderguru.com The YouTube link to the tutorial is: https://www.youtube.com/watch?time_continue=1391&v=dRzzaRvVDng

$\endgroup$
0
$\begingroup$

In this answer, I only sum up information from Caspar David Friedrich (link to a great video tutorial) and Jaroslav Jerryno Novotny (application of some principles which can be found in the video too). I have upvoted both answers, however I'd like to provide a step-by-step explanation with pre-requisites to prevent learners from being blocked at some point. This is a kind of answer I was waiting for.


1. How to create a true displacement with the Material Output node

Prerequisite: This procedure is valid for Blender 2.79b.

A Material node has an input (aka socket) for a Displacement function (one of three shading components of a material object):

enter image description here
Three inputs of a Material Output node: Surface, Volume, Displacement

What I learned is, without specific user action, in spite of its name, the Displacement input works as the bump mapping obtained by providing a function to the Normal input of a shader (except it applies to all shaders at once):

enter image description here
Normal input of a shader can be used for bump mapping, not for displacement

This is the reason why the two spheres have the same aspect for the pink texture in the question.

Blender added an option to Cycles rendering engine (it seems it was with version 2.78), to customize the Displacement mode of a material. Displacement can now act as a bump mapping effect (no actual displacement of the vertices), or true displacement, or a mix of both.

However this possibility relies on features which need to be activated in Cycles: Micro-displacement, itself taking advantage of adaptive division, all that is well explained in the video linked by Caspar David Friedrich (here). These features are considered experimental in 2.79, which means they are not available by default. I don't know if activating this extended feature set permanently has side-effects, nothing related in the documentation.

Prerequisite: Activate Experimental Feature set in Render tab.

enter image description here
Experimental Feature Set is allowed in the Render tab of the Properties Editor

Now the displacement mode in the Material tab can be set to True displacement (as explained by Jaroslav):

enter image description here
Displacement modes Bump, True and Both can be set in the material tab of the Properties Editor

In the rendering below, the middle sphere displacement mode has been set to Bump. This is equivalent to the material behavior when experimental features are inactive. For the right sphere, this mode has been set to True. The material node is the same for both spheres otherwise:

enter image description here
A third sphere with True displacement has been added

In the third sphere, the vertices are really displaced. The level of detail is limited by the mesh grid resolution, which could be increased with a Subsurf modifier (none used here), or selecting Both for the displacement mode, which adds bump mapping to the actual displacement.

2. Displacement and Vector Displacement nodes

Nothing like this in 2.79b, even with Experimental rendering features set in (Cycles) rendering tab. Just a confusing documentation.

It seems those nodes are for the future (and are possibly available in previews / daily builds).




FWIW, I've a general comment (ok, it's more a ranting) about the official documentation and answers to questions asked by learners: If we want to allow learners to not give up with Blender, we need to be didactic and not forget about the pre-requisites when explanations are provided. Yes it's tedious, very boring, but without them, explanations can be a loss of time, they generate frustration, people cannot move forwards, and at some point some switch off to another 3D product more easy to learn (this is especially true for Blender with its, well... creative GUI). I've used Lightwave and 3ds Max a lot in the past. Tools are just tools, they don't prevent artists to create something, even if they miss some features. But without an easy way to master it, a tool can be a problem for creativity. It often boils down to availability of good learning material vs poor / confusing documentation. I just hope we, as Blender users, especially with the help of this Q&A dedicated site, can do as well as commercial products, and level off confusing explanations, including in the official documentation when this is the case, in favor of value-adding material.

$\endgroup$
0
$\begingroup$

This is bizarre - my initial reply seems to have "disappeared" ....

To your Question #1: A Bump Map, as you mentioned, only simulates surface detail without changing the geometry (a normal map does this as well, but reacts much more accurately/predictably to light) - so a Bump Map would be used when you only need minor surface details.

A displacement map actually modifies geometry. The details you will get from a displacement map depend on the resolution of your displacement map, it's bit depth, and how dense your displaced mesh is. Usually, either a very heavily subdivided mesh is used - or - a Subdivision Surface modifier is added.

When would you use "Both" (Displacement and Bump)? Let's say you had a mesh that you weren't going to get that close to, but you wanted it to look like it was heavily subdivided and had nice details (example, a tree trunk). You could use a displacement map on a lower-poly mesh to make the shape irregular , and a bump map to add surface details. This is pretty much what you see in games - i.e. moderate resolution mesh for shape, normal maps (bump maps) to add all of the surface details.

Question 2: The Displacement node is added between the material node and the texture (or procedural) that you are using to drive your displacement. The Displacement node gives you controls that allow you to "tune" how the displacement affects your object. Traditional displacements only carry height information - so this is where Vector Displacement comes in. Vector displacement displaces a surface along multiple vectors - in a nutshell, Vector Displacement allows for overhangs and cavities.

I don't know exactly which version of 2.79 introduced vector displacement, but I'm pretty sure you have to be using one of the daily builds. You can get the builds from here: https://builder.blender.org/download/


Under your Material Tab, under the "Settings" roll-down, are you set to "Bump Only"?

Also, be aware that sometimes you may need to force a refresh when changing displacement and bump parameters - i.e. hit Shift-Z then hit it again to go in and out of screen rendering mode

$\endgroup$
  • $\begingroup$ I don't see a Bump Only Option in my Settings Panel on the bottom of the Material tab. Can you please explain, where this option is? $\endgroup$ – quiliup Aug 14 '18 at 19:47
  • $\begingroup$ Make sure you have the object selected, go to the mateirials tab and select the material. Scroll down past Surface, Volume, etc, and click on the "Settings" roll-down. You should see an entry for "Geometry" with a roll-down menu under that - it might say "Displacement Only" - but from that roll-down you can choose "Bump Only" or "Displacement and Bump" - it's important to note that you might have to hit Shift-Z twice to see the effects of changing that setting. $\endgroup$ – j.williamsen Aug 14 '18 at 20:04
  • $\begingroup$ Thanks for this detailed explanation, but there is really not such an option. Maybe it's because I am using Blender version 2.79 (sub 0). $\endgroup$ – quiliup Aug 14 '18 at 20:16
  • $\begingroup$ This is very incomplete. Follow Caspar David Friedrich's advice. | In a nutshell however: For displacement to work as expected, you need Microdisplacement - As of 2.79b you need to enable experimental features for this to work. Also, you need a Subdivision Surface modifier at the bottom of the modifier stack of your object. And finally you need to set the Displacement in Material-Settings to True (or Both). Only then, that displacement socket will do what you expect. But as mentioned before, watch one of the many tutorials online about the topic, as it can easily crash your PC if done wrong. $\endgroup$ – michaelh Aug 14 '18 at 21:56
  • $\begingroup$ Actually, you don't need microdisplacement, nor do you need a subdivision surface modifier. Any suitably dense mesh can be displaced via material alone - and when combined with a bump map, a reasonable approximation of a higher-density mesh can be created (for non-hero objects). If you want microdisplacement, then you must have experimental features turned on + a subdivision surface modifier + adaptive enabled in the modifier with a suitable Level chosen - and yes, there are a number of tutorials on youtube - and yes you can choke your computer with improper values. $\endgroup$ – j.williamsen Aug 14 '18 at 23:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.