<?xml version="1.0" encoding="utf-8" ?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:tt="http://teletype.in/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"><title>n0mad coder</title><subtitle>Teacher | Technical artist | 3D generalist</subtitle><author><name>n0mad coder</name></author><id>https://teletype.in/atom/n0mad</id><link rel="self" type="application/atom+xml" href="https://teletype.in/atom/n0mad?offset=0"></link><link rel="alternate" type="text/html" href="https://teletype.in/@n0mad?utm_source=teletype&amp;utm_medium=feed_atom&amp;utm_campaign=n0mad"></link><link rel="next" type="application/rss+xml" href="https://teletype.in/atom/n0mad?offset=10"></link><link rel="search" type="application/opensearchdescription+xml" title="Teletype" href="https://teletype.in/opensearch.xml"></link><updated>2026-04-04T00:00:41.336Z</updated><entry><id>n0mad:Masked-Shadow-Catcher-in-Blender</id><link rel="alternate" type="text/html" href="https://teletype.in/@n0mad/Masked-Shadow-Catcher-in-Blender?utm_source=teletype&amp;utm_medium=feed_atom&amp;utm_campaign=n0mad"></link><title>Masked Shadow Catcher in Blender</title><published>2020-10-23T20:49:00.000Z</published><updated>2020-11-12T09:03:41.439Z</updated><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://teletype.in/files/93/94/93945ee6-ff20-4fda-9090-328dffa2cc2c.png"></media:thumbnail><category term="blender" label="Blender"></category><summary type="html">&lt;img src=&quot;https://teletype.in/files/c4/90/c49069fa-1c56-49ee-9fe7-e94d050a35da.png&quot;&gt;We can think about a shadow catcher as a shader that is shadeless but catches shadows and light from other objects. That way we can reconstruct objects present in footage allowing digital objects in the scene interact convincingly with them.</summary><content type="html">
  &lt;figure class=&quot;m_custom&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/c4/90/c49069fa-1c56-49ee-9fe7-e94d050a35da.png&quot; width=&quot;720&quot; /&gt;
  &lt;/figure&gt;
  &lt;p&gt;We can think about a shadow catcher as a shader that is shadeless but catches shadows and light from &lt;em&gt;other&lt;/em&gt; objects. That way we can reconstruct objects present in footage allowing digital objects in the scene interact convincingly with them.&lt;/p&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;blockquote&gt;I&amp;#x27;m pretty much sure there&amp;#x27;s an automatic button (there is one for Cycles) or plugin that does this in one click , but for the matter of knowledge, let&amp;#x27;s check how to mix a few nodes to achieve a shadow catcher inside Blender&amp;#x27;s eevee.&lt;/blockquote&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;h4&gt;1 - Create a mask from lighting info&lt;/h4&gt;
  &lt;p&gt;— First of all in a new created material we need to get rid of the default &lt;em&gt;principled-BSDF&lt;/em&gt; shader and add a simple &lt;strong&gt;diffuse BSDF &lt;/strong&gt;one.&lt;/p&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;p&gt;Then we have to add the main ingredient to the node recipe: a &lt;strong&gt;Shader To RGB&lt;/strong&gt; node. Note that this node only works inside eevee.&lt;/p&gt;
  &lt;p&gt;According to Blender&amp;#x27;s documentation this node takes the information from BSDFs and lighting and returns a computed surface color.&lt;/p&gt;
  &lt;p&gt;Data coming from &lt;strong&gt;Shader To RGB&lt;/strong&gt; needs to be translated into Black and White values so we can process it as a mask. The node &lt;strong&gt;RGB To BW&lt;/strong&gt; is the next to add in the recipe.&lt;/p&gt;
  &lt;p&gt;Last node we can add to the mask in order to gain some control over the incoming values is a &lt;strong&gt;ColorRamp&lt;/strong&gt; node.&lt;/p&gt;
  &lt;p&gt;Now we have to use that node chain as a factor for a &lt;strong&gt;Mix Shader&lt;/strong&gt; node that blends a single &lt;strong&gt;Diffuse BSDF&lt;/strong&gt; node with a &lt;strong&gt;Transparent BSDF&lt;/strong&gt; one. Note the color in the &lt;strong&gt;Diffuse BSDF&lt;/strong&gt; has been changed to black.&lt;/p&gt;
  &lt;figure class=&quot;m_custom&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/26/ba/26baa469-3be6-4d27-9e9d-8ea40305015d.png&quot; width=&quot;720&quot; /&gt;
  &lt;/figure&gt;
  &lt;p&gt;We can apply this material to a plane and check what happens:&lt;/p&gt;
  &lt;figure class=&quot;m_custom&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/a7/3a/a73a9d32-b283-47b0-b809-f14e47c88bbc.png&quot; width=&quot;720&quot; /&gt;
  &lt;/figure&gt;
  &lt;h4&gt;&lt;/h4&gt;
  &lt;h3&gt;2 - Create a mask for lighting info&lt;/h3&gt;
  &lt;p&gt;— As we can see once we the material is applied into the surface, the parts of that surface not receiving enough light info become darker. One quick solution is to increase light power, or add more light sources however, that will affect our main object in scene and maybe we don&amp;#x27;t want that since it can break background matching etc.&lt;/p&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;p&gt;Let&amp;#x27;s fix it by creating a rounded mask for the shadow catcher. Inside the same material we have to add the following nodes:&lt;/p&gt;
  &lt;ul&gt;
    &lt;li&gt;A &lt;strong&gt;Texture Coordinate&lt;/strong&gt; node set to &lt;em&gt;Object&lt;/em&gt;. That way we start using the object&amp;#x27;s center as the starting point for our coordinates.&lt;/li&gt;
  &lt;/ul&gt;
  &lt;figure class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/27/1f/271fc7e8-3964-4913-99a3-831bdf9fcfb7.png&quot; width=&quot;523&quot; /&gt;
    &lt;figcaption&gt;Texture Coordinates node set to Object.&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;ul&gt;
    &lt;li&gt;A &lt;strong&gt;Separate XYZ&lt;/strong&gt; node to extract only horizontal info from X and Y.&lt;/li&gt;
    &lt;li&gt;A &lt;strong&gt;Combine XYZ&lt;/strong&gt; node to merge the info from X and Y.&lt;/li&gt;
    &lt;li&gt;A &lt;strong&gt;Vector Math&lt;/strong&gt; node with a Length operation to calculate the length of the given vector.&lt;/li&gt;
  &lt;/ul&gt;
  &lt;figure class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/eb/93/eb93641a-29c6-4e48-9802-4fb7ffbea118.png&quot; width=&quot;537&quot; /&gt;
    &lt;figcaption&gt;Vector Math node calculating the given length of the X and Y values from TextureCoordinates.&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;ul&gt;
    &lt;li&gt;A &lt;strong&gt;Math&lt;/strong&gt; node clamped with a &lt;em&gt;Multiply&lt;/em&gt; operation so we get the ability to extend the length of the given point.&lt;/li&gt;
  &lt;/ul&gt;
  &lt;figure class=&quot;m_original&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/ee/f2/eef2fb3d-a698-452a-beff-53e4251797ce.gif&quot; width=&quot;480&quot; /&gt;
  &lt;/figure&gt;
  &lt;ul&gt;
    &lt;li&gt;A &lt;strong&gt;ColorRamp&lt;/strong&gt; node to control the mask&amp;#x27;s border softness.&lt;/li&gt;
  &lt;/ul&gt;
  &lt;figure class=&quot;m_original&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/7a/ec/7aec8d72-39ff-4b31-a279-f6d6e10fd633.gif&quot; width=&quot;480&quot; /&gt;
  &lt;/figure&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;p&gt;We have created a circular mask in 6 nodes! well... it is useful too as a circle primitive to do some procedural node creation (:&lt;/p&gt;
  &lt;figure class=&quot;m_custom&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/7a/b8/7ab85a12-7992-4ca1-8893-0f062c966448.png&quot; width=&quot;720&quot; /&gt;
  &lt;/figure&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;p&gt;The last step is to add a new &lt;strong&gt;Mix Shader&lt;/strong&gt; node which blends the &lt;strong&gt;Shadow Catcher shader&lt;/strong&gt; with a &lt;strong&gt;Transparent BSDF&lt;/strong&gt; one, &lt;em&gt;using our circular mask as a factor&lt;/em&gt;.&lt;/p&gt;
  &lt;figure class=&quot;m_custom&quot;&gt;
    &lt;img src=&quot;https://teletype.in/files/28/02/280248f8-8b08-4353-b889-ed23f1fa5003.png&quot; width=&quot;720&quot; /&gt;
  &lt;/figure&gt;
  &lt;p&gt;And we are done. &lt;a href=&quot;https://t.me/vertexfarm/26&quot; target=&quot;_blank&quot;&gt;Here&amp;#x27;s a quick screencast&lt;/a&gt; of the process just in case. Have fun!&lt;/p&gt;

</content></entry></feed>