13
$\begingroup$

If I have a modeled rock and I want to somehow to add details to it like the ones from an Asteroid (like, little holes) which kind of Node setup should I need?

My actual node setup (it's on cycles) is pretty simple, it's just a regular Diffuse color and with the Output, due to the figure itself, it reacts well to lighting. But I do want little details that can also react to light (like a bump, but random).

Reference: enter image description here

$\endgroup$
  • $\begingroup$ Sorry, I think I misread the question (or it was edited while I was answering!) Are you looking for a procedurally generated bump texture? $\endgroup$ – Todd McIntosh Jun 8 '15 at 21:00
  • $\begingroup$ Hmm, something like that, some 'random' pattern along the rock, without the need of a texture. (or also UVs) $\endgroup$ – beavoru Jun 8 '15 at 21:02
  • $\begingroup$ Ok, so you do want a procedural texture then. Are you using it for surface colour or for bump or displacement effects? $\endgroup$ – Todd McIntosh Jun 8 '15 at 21:04
  • $\begingroup$ Related: blender.stackexchange.com/q/31696/599 $\endgroup$ – gandalf3 Jun 8 '15 at 22:21
  • $\begingroup$ you could just do it with geometry... $\endgroup$ – Scalia Jun 8 '15 at 22:25
20
$\begingroup$

I was able to get something pretty close to what I think you are looking for using a voronoi texture.

enter image description here

Here is my node setup (click to enlarge):

enter image description here

Here is a close up of the nodes that make the holes (there are actually two of these sets, one for the larger holes and one for the smaller ones).

enter image description here

The upper voronoi texture, set to cells, is sent through a less than node to "weed out" a few cells I then use that result to mask the lower voronoi, set to intensity. If that didn't make any sense here is an image that will hopefully clarify it:

enter image description here

  1. Cells voronoi texture.
  2. Put through less than 0.4 node (converter > math) to "grab" 40% of the cells.
  3. Used to mask intensity voronoi texture.
  4. Color ramp node added to (mostly) eliminate the hexagons. (Try playing with the color ramp swatches to see how this works.)

The main material is simply two of these setups with a noise texture for added roughness, all put into the bump of a grey diffuse shader. The asteroid itself is simply an icosphere with a subsurf and two different sized displacement modifiers.

Here's the .blend:

$\endgroup$
  • $\begingroup$ Amazing result! $\endgroup$ – Paul Gonet Jun 9 '15 at 11:35
  • $\begingroup$ Where's the ''less than'' option? was it from MixRGB? $\endgroup$ – beavoru Jun 9 '15 at 13:08
  • 1
    $\begingroup$ @beavoru It's a converter > math node. Sorry about that, I clarify that. $\endgroup$ – PGmath Jun 9 '15 at 14:07
  • $\begingroup$ Wait, a last question, what kind of UV does the object has to have in order to work with this? my object shows the 'dots' as boxes $\endgroup$ – beavoru Jun 9 '15 at 15:43
  • 1
    $\begingroup$ Woo hoo! I can comment now! This answer is actually what inspired me to accumulate 50 rep points so I could make the comment "This is such a great answer!" I especially appreciate that you provided the blend file. Being able to to explore the nodes and tinker with them was very educational, not only to learn the nuts and bolts of how it works, but also to gain insight into your creative problem solving process. Very creative indeed. Nice work! $\endgroup$ – YoeyYutch Jul 14 '15 at 0:11
8
$\begingroup$

You can use a greyscale version of the image texture to create either:

  • a Bump Map or
  • Mesh Displacement via the Displacement Modifier.

The Bump solution is the lighter, less resource-intensive solution, and it will be easier to render. However it will give you the illusion of craters on the surface, and will not affect the silhouette of the object.

The Displacement modifier solution will give you actual changes to the surface of the mesh and WILL affect the sillhouette of the object. However you will have to subdivide the mesh (or apply a SubDiv modifier) many times to get a good clean result, and this will make the mesh difficult to work with. Another challenge of this technique is that it works better with higher bit depth images. Higher bit images (16bit, 32bit) have a wider variance between dark and light values, giving more variance in the range of the displacement effect. For most scenarios, however, you'll likely be working with 8bit images which doesn't provide a huge range in displacement values.

In reality, you'll probably always want to set up the Bump Map. It will give the fine details you need. The Displacement mod is really only helpful for larger features on the profile of mesh. You can always use both together if need be.

Here's a screenshot with an asteroid with Bump Map only (on Left).

enter image description here

Here's a screenshot with the asteroid with Displacement only (on Right)

enter image description here

$\endgroup$
  • 5
    $\begingroup$ I think he wants a procedural solution. $\endgroup$ – PGmath Jun 8 '15 at 23:29
  • $\begingroup$ Yep, I think so too. $\endgroup$ – Todd McIntosh Jun 9 '15 at 0:08

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.