Sign In
Sign in
English

TopBanners120604.jpg



June 4, 2012 8:00 AM

 

By Daniel RadialRonnie Metien


Basic Cycles Cavity shader tutorial.


weo8Z.png

This walk-through is thorough and detailed in its explanation and only assumes only basic knowledge of interface manipulation. 

ZWjwM.png

Firstly you need to insure that your mesh is high-poly enough because we will be using Vertex Colors. The monkey mesh shown about is NOT high-poly enough and will show streaking in the final result if not subdivided.

Add a sub-div modifier and apply it if you think it's needed.

idXd1.png

Hop on over to the Vertex Painting mode.

2dXRG.png

In the Paint menu in the footer, select "Dirt Vertex Colors."

xY6qv.png

This is the result of the bake with the default settings:

8JKWE.png

Directly after giving the AO bake command, press F6 to open the settings for this command;

jNBWM.png

Enter a smaller value for the Highlight Angle field to make the exposed areas stay white, and the cavities become darker.

3FhJz.png

This makes the overall result too bright, so you need to repeat these steps several times (I had to do it ~5 times)
[edit] To clarify, you need to rebake, and change that setting for each time to repeat the process. Simply pressing F6 several times won't change anything.
Keep in mind that once we are finished with this shader, Pure White will only be our one shader while Pure Black will be only the secondary shader.

This looks much better:

iVWNL.png

Now for the fun Part:
Add a new material, and change the surface type of Mix Shader:

VUsFL.png

Change the two mixed shaders to Glossy and Diffuse (in that order)

lqprJ.png

Now split a new node window making sure that you are seeing material nodes.

YkPIu.png

Change the shader colors to suit your needs. Here I set the Base glossy color to a brassy color, and the cavity shader to a bronze patina color (with exaggerated saturation).

DqkhA.png

Add a new attribute node:

LlEod.png

Quickly pop open the Object Data tab:

lpvKr.png

Copy the Vertex Color name.

0tWvS.png

Paste the copied vCol name into the attribute node:

hMWjP.png

Plug in a a color invert node:

hfi8v.png

This is what everything should now look like. Notice the attribute's output is plugged into the Col value of the invert. By default it'll go into the Factor value which is something totally different.

DWoih.png

Upon render, your shader could look something like this:

tUMjB.png

lp2tM.png

vBu33l.jpg

There several things you could do differently. For example, you might have used different settings at the AO bake stage. You might have tweaked the baked vertex colors manually with the paint brush getting 'custom' results.

The shader is as basic as you can get it. You could modify this to your heart's content to get exactly the results you want.

Check out the .Blend file if you have trouble following the tutorial:
.blend (130kb)


Related Links:

1. http://blenderartists.org/forum/showthread.php?241389-Dirt-procedure&p=2036346&viewfull=1#post2036346

2. http://danielsarts.tumblr.com/

3. http://www.livelightstudios.com/

4. http://dan52t.deviantart.com/gallery/

Views :
122256
Registered Date :
2012.06.04
21:46:03 (*.226.203.124)
Trackback :
http://blendernews.org/xe/1262/03f/trackback
Article URL :
http://blendernews.org/xe/1262
List of Articles
Subject Datesort Views
Blender Retrospectives 2020 Blender Retrospective Feb 20, 2021 324048
Tutorials Free Online Blender Tutorials Released in 2019 Worthy of Your Note - for Animation & VFX file Jan 25, 2020 676261
Tutorials Free Online Blender Tutorials Released in 2019 Worthy of Your Note - for CG, Games & Viz file Jan 25, 2020 539382
Tutorials Top 12 Free Online Blender Tutorials Released in 2019 file Jan 25, 2020 546605
Tutorials Top 15 Highest-Rated Free Online Blender Tutorials Released in 2019 file Jan 25, 2020 489584
Tutorials Free Online Blender Tutorials Released in 2018 for Blender 2.8 file Jan 23, 2019 462171
Tutorials Free Online Blender Tutorials Released in 2018 Worthy of Your Note - for CG, Games & Viz file Jan 23, 2019 807935
Tutorials Free Online Blender Tutorials Released in 2018 Worthy of Your Note - for Animation & VFX file Jan 23, 2019 526047
Tutorials Top 12 Free Online Blender Tutorials Released in 2018 file Jan 23, 2019 459724
Render of the Year Render of the Year Awards 2018: Winners Annouced file Jan 02, 2019 497600
Blender Retrospectives 2018 Blender Retrospective file Jan 02, 2019 488714
Tutorials Top 12 Free Online Blender Tutorials Released in 2017 file Jan 09, 2018 1084851
Blender Retrospectives 2017 Blender Retrospective file Jan 01, 2018 809777
Render of the Year Render of the Year Awards 2017: Winners Annouced file Dec 26, 2017 662845
Tutorials Top 12 Free Online Blender Tutorials (Videos) Released in 2016 file Jan 16, 2017 881452
Blender Retrospectives 2016 Blender Retrospective file Dec 29, 2016 1173693
Render of the Year Render of the Year Awards 2015: Seven Winners Annouced file Jan 20, 2016 898666
Blender Retrospectives 2015 Blender Retrospective file Jan 12, 2016 870500
Tutorials Top 12 Free Online Blender Tutorials Released in 2015 file Jun 26, 2015 914369
Render of the Year Render of the Year Awards 2014: Five Winners Annouced file Jan 02, 2015 937222
Tutorials Top 12 Free Online Blender Tutorials Released in 2014 file Dec 11, 2014 986629
Render of the Week 'Self Portrait' by Alexander Wilding - the Winner of the Week of October 15, 2018 file Oct 16, 2018 14184
Render of the Week 'HellBlade' by Fotis Tsantilas - the Winner of the Week of October 22, 2018 file Oct 23, 2018 12638
Render of the Week 'First Contact' by Adam Skovran - the Winner of the Week of October 29, 2018 file Oct 30, 2018 12801
Render of the Week 'Fire-Coughing Mechanical Graboid Ass Blaster' by Bohdan Lvov - the Winner of the Week of November 5, 2018 file Nov 06, 2018 19021
Render of the Week 'Ferrari F1 2000 - Melbourne Front wheel lockup' by Maxence Leret d’Aubigny - the Winner of the Week of November 12, 2018 file Nov 13, 2018 14878
Render of the Week 'Red Bull - BO-105 Aerobatic' by Justin Müller - the Winner of the Week of November 26, 2018 file Nov 27, 2018 13762
Render of the Week 'Master Car Creation in Blender' by Chris Plush - the Winner of the Week of December 3, 2018 file Dec 05, 2018 14942
Render of the Week 'Unseen Westeros: Golden Tooth' by Manuel Grad - the Winner of the Week of December 10, 2018 file Dec 12, 2018 33678
Render of the Week 'Retired Unit' by Carlos Andrés Sosa - the Winner of the Week of December 17, 2018 file Dec 19, 2018 14421
Render of the Week 'Dynamo Episode 6' by Ian Hubert - the Winner of the Week of December 24, 2018 file Dec 25, 2018 17057
Render of the Week 'Winter Morning in an Unknown City' by Pavel Suschenko - the Winner of the Week of January 28, 2019 file Jan 29, 2019 18024
Render of the Week 'Procedural Knitwear Shader' by Simon Thommes - the Winner of the Week of February 5, 2019 file Feb 06, 2019 18375
Render of the Week 'Sheldon' by Thiago de Sul, Thiago Paladino, José Mauro Lobão, Robson Ribeiro - the Winners of the Week of February 11, 2019 file Feb 12, 2019 26593
Render of the Week 'Lava Castle' by Sangil Yu - the Winners of the Week of February 18, 2019 file Feb 20, 2019 16175
Render of the Week 'Bruce Wayne Stylized Realistic Portrait' by Kevin Mucollari - the Winner of the Week of February 25, 2019 file Feb 27, 2019 23763
Render of the Week 'Classroom' by Tim Diaz - the Winner of the Week of March 4, 2019 file Mar 06, 2019 17728
Render of the Week 'Uruk Hai Soldier' by Juan Hernández - the Winner of the Week of March 11, 2019 file Mar 13, 2019 16832
Render of the Week 'Demon, aka 'the Human BBQ Lover!'' by Aitor Pérez Alonso - the Winner of the Week of March 18, 2019 file Mar 20, 2019 16406
Render of the Week 'Ellie' by Cheryl Chen - the Winner of the Week of March 25, 2019 file Mar 27, 2019 17063
Render of the Week 'Dancing Pig' by Colory Animation - the Winner for the First Week of April, 2019 file Apr 03, 2019 17711