Cycles new microdisplacement testing, discussion and blend sharing

:yes:

another shot :slight_smile:



Amazing stuff !
I like it !
:yes:

Was anyone able to bake microdisplacement onto a texture?
This causes my blender instanly to crash.

I donā€™t see how thatā€™s possible as microdisplacement as I understood it does LOD management based on view angle, occlusion, etc, and with full texture bake, you have nothing to remove with LOD. It would be the same as using a very high level of subdivision. Youā€™d basically get nothing extra with microdisplacement.

If itā€™s a crash, itā€™s a bug. Just report it, itā€™ll get sorted out.

Thereā€™s no ā€œmicrodisplacementā€ feature, itā€™s two independent features: OpenSubdiv Subdivision (may be adaptive or not) and Vertex Displacement.

Itā€™s true that the ā€œadaptiveā€ part is based on the view frustum (not sure about occlusion), but thereā€™s no fundamental reason why it shouldnā€™t work with baking. After all, Blender lets you bake a ā€œfull renderā€, which also is view-dependent, i.e. the camera is taken into account.

Even if you turn off the adaptive feature, thereā€™s still a difference between subdividing with or without OpenSubdiv. Render startup time and memory usage will be different (not sure which is better though).

Actual vertex displacement only comes into play after subdivision, no matter how subdivision is performed. It should always work with baking.

For the Blender Internal, there is a displacement bake type. BI have a displace slider in texture influence panel.

Cycles displacement socket of output node never quit experimental status, except for Bump.
There is no displacement bake type available for Cycles.

The only thing that you can expect is to bake displacement as a bump map.
In material, Displacement method should be set to Both or Bump to obtain something.

Yes i will open a ticket.

For baking i don`t need the adaptive subdevision, but it would be very nice to use procedual Textures made in the node-editor trough the displacement output. It also crashes with the subdevisunSurface-modifier without adaptive turned on but with true displacement enabled.

alternatively there is the Texture-mode within the node-editor. But I found no posibility to put this output into the displacement-modifier.

I was talking about using displacement during baking for any of the available passes, not baking displacement itself.

Iā€™ve tested baking true displacement with a procedural texture and I can reproduce the crash when ā€œadaptiveā€ subdivision is enabled, but it worked with regular subdivision (even with OpenSubdiv enabled). I used the latest buildbot build. You may want to try again. Maybe the crashes donā€™t happen 100% of the time, I did not perform more tests.

alternatively there is the Texture-mode within the node-editor. But I found no posibility to put this output into the displacement-modifier.

This used to be possible, but it was disabled because it was unstable.

Loving this microdisplacement. Here are a few cubes in an array. All textures are procedural,ā€¦ no images used. Iā€™ve attached a screenshot of the shader.



Loved your shader!

Toke me 10 mins just to copy it.
It will take me 10 hours to figure how it works.

Thx for sharing

Itā€™s not too bad if you break it down into smaller chunks. This was done quickly so there is probably a lot of room for optimization as well.

Hereā€™s a quick description that may help:

  • First, everything uses the object coordinates from an empty. Nothing special here, but I can control global position and scale of the shader if I need by simply moving/scaling the empty. This also allows the shader to carry the same bumps across multiple objects.

  • The surface part is just a simple AO shader with a falloff as the color. This helps give the electron microscope feel.

  • The line of mostly horizontal nodes ending with the gradient is for the stripes. It is a mask used for the noise node above it that has been stretched out into lines.

  • The cluster underneath that is just using several noise textures added together in different ways to break up the standard noise look. I feed a voronoi into the noise as a displacement, and even the voronoi has a noise affecting itā€™s size. Itā€™s all about breaking up shapes into more complex looking shapes.

  • On the bottom there is a noise with a Greater-than node. This makes a few more chunks that stand out when they are mixed back into everything.

Iā€™d suggest using node wrangler if you donā€™t use it already. You can click on each part and see what it does individually.

Thanks a lot rcpongo,

I already use the wrangles to break shaders and see the ā€œMasksā€.
Your explanation is just the ā€œcherry on top of the cakeā€
I need to waste some more time on the math node to understand some of the ā€œmodesā€.
I already use multiply and subtract in some of my own shaders, but module and greater than is something that i donā€™t yet understand totally. Were is my Copy of your picture with probably less dicing scale. Once again, Thank you for sharing


Itā€™s been a while since Iā€™ve played with Cycles specifically. Just noticed yesterday this was actually in master, which means Iā€™m way out of the loop. Is there a way yet to force BVH updates in viewport rendering? Right now my habit is to go in and out of rendered view to get it to force the update. Quick enough, I guess, but sometimes a little to have to do it manually. Thereā€™s no checkable box to get Blender to do this on its own yet, correct?

If I understand you correctly, all you have to do is cycle through the tab button to get it to update. Is that what you meant?


a first test procedural plannets, a small step for microdisplacement but a big step for me :wink:

Razorblade

interesting results
can you share nodes set up

thanks
happy cl

@Razorblade
I thought you were playing with it already :wink:

Remember the Cycles Procedural Moon by solarforge (solved BA thread)


is also on blendswap

its a bit complex node setup, the main idea behind it was to use a vornoi texture.
to create a dot pattern, then connected to a rgb curves so, so you get crater depthā€™s and walls.

next to have some effect inside the crater and not to have them flat as pancakes i used musgrave
to gether with some color inverting (as black times black stays black, but white dots get effect ā€¦ i guessā€¦ ).
This is the group i circled around with greace pencil.

There is another pattern that is also over the surface its a small group of 2 math nodes and 2 noise textures.
Then there is object random (also feeds varonoi) to get simple differences between various planets (color and crater sizes).


Btw one could group the crater part and create various sizes over each other.
the other planet is nice to

oh and here is the blend file : displacement moon.blend (915 KB)

I press Shift+Z and Z with holding the Shift key to update, I think itĀ“s faster than pressing two times Tab.
Some dirt/sand displacement, so much fun playing with this feature.



blend file
Sand_microdisplacement.blend (112 KB)



Not as fancy as some of the other stuff here. But I think itā€™s neat that tires are easier to do now. Can do things with textures that was previously pushing pretty hard in terms of what was possible with mesh. Also added a bit of noise for that tiny detail of pitting and wear marks. Donā€™t mind the tread pattern too much though, as it was a bit hastily done on this WIP car Iā€™m still bashing together.