17
$\begingroup$

For an architectural visualization, I would like to use MakeHuman models, but:

  • Only get them to render white with a black outline (on reflection surface too, if possible).

  • Interact with light like normal human bodies in the scene (cast shadows, etc).

I can do the outline in freestyle, but any in-Cycles solution would be appreciated (OSL?)

$\endgroup$
2

6 Answers 6

9
$\begingroup$

Update

Freestyle is natively supported in cycles as of this commit (will be in 2.72). This means that you can do exactly as in Utas's answer, but without the extra scene/renderlayer.

enter image description here


Original answer:

You could try using this node setup, it works with composite nodes and is render engine independent.

Here is an example render:

enter image description here


Here are some other methods I thought of:

Method one:

You can get outlines by using the index passes:

  1. Enable the Material Index pass in Renderlayers > Passes:

    enter image description here

  2. Create a new material and set the Pass Index in Properties > Material > Settings:

    enter image description here

  3. Create the material:

    enter image description here

You can then use the pass index to create an outline in compositing nodes:

enter image description here

Note that a limitation is that overlapping objects will not have lines between them:

enter image description here

This can be worked around by using the object Index for each object individually, however for large scenes this is probably too tedious.

Method two:

Another way is with the Filter node:

  1. Repeat steps 1-3 from method one.

  2. Enable the Normal pass in Render layers > Passes:

    enter image description here

  3. Use the normal pass to create lines, then limit the lines with the material index pass: (click for full size):

    enter image description here

Result:

enter image description here

$\endgroup$
0
15
$\begingroup$

Render your scene twice. First in cycles and then in Blender Internal. Leave cycles materials in BI and change the alpha to transparent in the shading setting. There will be edges only in BI. When you get both of your scenes rendered. Use the compositor with the "alpha over" node.

If you want your human to be a shadeless white, you could use a material index node in Cycles that creates a mask of your object without shadows but it will still cast shadows under image.

Node setup:

Test render:

$\endgroup$
3
  • $\begingroup$ yep looks nice, I'm on 2 big projects at the moment, so sorry, but I can't test it tonight. I'll experiment a bit later, thanks a lot for your help :) $\endgroup$
    – matali
    Commented Jun 3, 2013 at 22:59
  • $\begingroup$ Now that freestyle is included in cycles I think you should update your answer. $\endgroup$
    – PhoneixS
    Commented Feb 3, 2016 at 10:26
  • $\begingroup$ Is this node setup available for download? $\endgroup$
    – Pa_
    Commented Feb 19, 2021 at 8:57
7
$\begingroup$

I tried solving the problem you have posed and could achieve the following result using Cycles shader nodes.

I have used the cross product between the shading normal and incoming direction vector and passed it to a math node whose output is fed to the mix shader that plugs in to the material's surface socket. The mix shader is fed with another mix shader which feeds an emission shader for the camera ray, otherwise the output of second mix is black.

Cycles Silhouette

Link to high-res version: http://www.pasteall.org/pic/show.php?id=52714

$\endgroup$
4
  • $\begingroup$ looks nice, thanks for your proposition :) But the biggest part of the problem is to get the humans white (for the camera only, achieved with an emission shader) but casting shadows (not emitting light for the environment). $\endgroup$
    – matali
    Commented Jun 2, 2013 at 15:20
  • $\begingroup$ I have worked out a solution and have edited my original answer. The silhouettes are not that well defined for very curved objects though.. $\endgroup$
    – satishgoda
    Commented Jun 3, 2013 at 4:08
  • $\begingroup$ thanks a lot satishgoda, it's really near from what I want to achieve :) I have to test it when I'm back home. $\endgroup$
    – matali
    Commented Jun 3, 2013 at 12:30
  • $\begingroup$ Great.. Let me know how it goes. I am still trying to figure a way out to get consistent silhouettes. $\endgroup$
    – satishgoda
    Commented Jun 3, 2013 at 13:08
3
$\begingroup$

In the Materials panel, in the top right, there should be a drop-down menu with 'Data' selected. Open the menu and select 'Object' instead. Then, if you use an Emission shader, the object will still cast a shadow (although a weak one), and will not affect the lighting on other objects.

$\endgroup$
1
  • $\begingroup$ hmm, not sure why, but it now works in both data and object mode with strength connected to "is camera ray" from the "light path" node. I compiled latest SVN too, so it was maybe due to a bug, no idea... anyway geting 100% white objects with shadows and no light emission now works :) thanks $\endgroup$
    – matali
    Commented Jun 2, 2013 at 16:51
0
$\begingroup$

In cycles, use a mix shader between emission and diffuse. Set the factor to be Input > Light Paths > Is Camera Ray. Hope this helps!

$\endgroup$
0
$\begingroup$

Eevee

You can use a nice trick (specifically in my case I needed outline only for some objects in my scene) - Solidified mesh with flipped normals.

There are two ways Geometry nodes ...

enter image description here enter image description here

... object has assigned two materials. Pink material at first slot is automatically used for whole object. For flipped faces assign white material - Emit shader and enable Backface Culling in material properties.

enter image description here


Another way is to use Solidify modifier and enable Flip Normals and Material Offset > 1.

Source https://www.youtube.com/watch?v=EsY7FdNFOoQ

$\endgroup$

You must log in to answer this question.

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