20
$\begingroup$

Is it possible to use Matcap materials as an actual material for a model so that I can render with it? There are certain parts that I want to apply specific Matcaps textures to but I want to actually use them to render and not just for sculpting purposes.

Is this at all do-able?

$\endgroup$
6
  • 3
    $\begingroup$ Yes, see blender.stackexchange.com/a/554/599 $\endgroup$
    – gandalf3
    Commented Oct 4, 2015 at 18:59
  • $\begingroup$ If this is for Blender Internal, this video explains it. If for Cycles, this BA thread is a place to start. $\endgroup$
    – Mentalist
    Commented Oct 5, 2015 at 1:14
  • $\begingroup$ The problem in Cycles is how to do the mapping. I've seen people suggest solutions using the Mapping node, the Geometry node, the Texture Coordinate node, you name it... but which will actually give an accurate mapping and what are the settings? I do not know. I will ask my own question specific to this if nobody answers yours. $\endgroup$
    – Mentalist
    Commented Oct 5, 2015 at 4:15
  • $\begingroup$ Possible duplicate of Can matcaps be used for all objects and not just selected objects? $\endgroup$
    – sambler
    Commented Oct 5, 2015 at 7:03
  • $\begingroup$ @sambler That question is for viewing matcaps in the viewport, not really aimed at rendering. Although you could render it - only if using Blender Internal. There are no Cycles solutions posted here yet. OP was not clear which render engine the question pertained to, or if it pertained to both. Anyway, the link you posted is the same as gandalf3's. $\endgroup$
    – Mentalist
    Commented Oct 5, 2015 at 7:20

1 Answer 1

24
$\begingroup$

For Blender Internal it's as easy as making a material shadeless and mapping the Matcap texture with Normal mapping:

enter image description here

For Cycles you need to stack some nodes to get the correct mapping:

enter image description here

Note: In versions 2.76rc3 and earlier this doesn't work when Open Shading Language and CPU rendering is enabled. The Vector Transform gives invalid output. This is a bug that has been fixed in the latest builds.

Important Update: From version 2.76 we now must change the Vector Transform Node's vector type from Point to Normal. Apparently it should not have worked with Point before, but it did because not all location information was being taken into account - now it is.

Set Vector Transform type to "Normal"

$\endgroup$
17
  • 2
    $\begingroup$ @Mentalist You can visualize the Normal Tex Coords when you directly plug them into emission shader. You will see a surface direction relative to the object's space, what we need is surface direction relative to the view - that's why the conversion from object-space to camera-space (any other conversion doesn't make sense and that's where similar setups failed). Doesn't matter if the type is Point/Vector/Normal, but it matters for the Mapping node so I kept it consistent. $\endgroup$ Commented Oct 6, 2015 at 9:16
  • 1
    $\begingroup$ @Mentalist As for the Mapping node: the converted normal vectors go from -1 to +1, but the texture is expected to be mapped from 0 to +1. That's why it's first offsetted and then scaled up to cover -1,+1 mapping range. Scale of 0.5 will make the texture 2x larger (similar setups failed at trying to scale 2x with putting 2.0 into the scale value). $\endgroup$ Commented Oct 6, 2015 at 9:21
  • 1
    $\begingroup$ @Mentalist You will also get correct result with Mapping node set to: Texture and offset values of 1.0 (x, y location) and both x and y scale values: 2.0. That will make the same transformation as the node set to Point and with values 0.5. But I like how it can be consistent and all set to and be done around Point vector math. $\endgroup$ Commented Oct 6, 2015 at 9:38
  • 2
    $\begingroup$ Update: I reported the OSL bug (thanks to you tracking down the cause) and Campbell and Sergey got right on top of it - was fixed within a day! Would never get that kind of response from Autodesk, lol. Man, I love Blender! $\endgroup$
    – Mentalist
    Commented Oct 8, 2015 at 17:27
  • 1
    $\begingroup$ @Mentalist About the update: Yeah it was very weird this node gave the same result in all the modes :D Glad it is fixed now, and I have a feeling you had something to do with it by bringing this to devs attencion with the bug report, so gj $\endgroup$ Commented Nov 5, 2015 at 21:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .