# Errors after following tutorial

**URL:** <https://forums.unrealengine.com/t/errors-after-following-tutorial/145419>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [June 9, 2020, 12:07pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419 "2020-06-09T12:07:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![keenestt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@keenestt](https://forums.unrealengine.com/u/keenestt)\
**Post date:** [June 9, 2020, 12:07pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/1 "2020-06-09T12:07:04Z")

</div>

I want to draw an outline around objects that are selected in-game and I found [this tutorial](http://www.michalorzelek.com/blog/tutorial-creating-outline-effect-around-objects/). I followed it as well as I could but I am getting 2 errors.

One of the errors was in [mf\_extractDepth](https://imgur.com/2e8uqcF), and the other was in the [material itself](https://imgur.com/OJOC4ad).

[Here](https://imgur.com/a/oKp40ku)is a imgur album of the material functions and materials.

Could someone explain how to fix these errors? As I’m quite new to unreal engine it would be appreciated if I could get a detailed explanation.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 9, 2020, 12:22pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/2 "2020-06-09T12:22:02Z")

</div>

> [@keenestt](#):
>
> I want to draw an outline around objects that are selected in-game and I found [this tutorial](http://www.michalorzelek.com/blog/tutorial-creating-outline-effect-around-objects/). I followed it as well as I could but I am getting 2 errors.
> 
> One of the errors was in [mf\_extractDepth](https://imgur.com/2e8uqcF), and the other was in the [material itself](https://imgur.com/OJOC4ad).
> 
> [Here](https://imgur.com/a/oKp40ku)is a imgur album of the material functions and materials.
> 
> Could someone explain how to fix these errors? As I’m quite new to unreal engine it would be appreciated if I could get a detailed explanation.

‘Scene texture expressions cannot be used in opaque materials’ = Click on the background of the material graph, you need to set your blend mode to something other than opaque ( it’s in the tutorial ).

‘Missing function input texture UV’ = those two big function nodes need a UV input. Right click on the graph background and find the node ‘texture coordinate’. Plug that into the UV pins on the function calls.

---

<div class="post-metadata">

**Author:** ![keenestt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@keenestt](https://forums.unrealengine.com/u/keenestt)\
**Post date:** [June 9, 2020, 1:45pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/3 "2020-06-09T13:45:34Z")

</div>

> [@ClockworkOcean](#):
>
> ‘Scene texture expressions cannot be used in opaque materials’ = Click on the background of the material graph, you need to set your blend mode to something other than opaque ( it’s in the tutorial ).

I fixed the other error but this one I don’t really understand. I’m guessing you want me to change the blend mode in the material functions detail pane but there isn’t an option to do that. [This](https://imgur.com/a/Akf4HII)is how it looks.

I feel stupid because I remember doing it in the other ones.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 9, 2020, 1:59pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/4 "2020-06-09T13:59:03Z")

</div>

> [@keenestt](#):
>
> I fixed the other error but this one I don’t really understand. I’m guessing you want me to change the blend mode in the material functions detail pane but there isn’t an option to do that. [This](https://imgur.com/a/Akf4HII)is how it looks.
> 
> I feel stupid because I remember doing it in the other ones.

I think you have to change it in the material you’re trying to use the function in?

---

<div class="post-metadata">

**Author:** ![keenestt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@keenestt](https://forums.unrealengine.com/u/keenestt)\
**Post date:** [June 9, 2020, 2:00pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/5 "2020-06-09T14:00:54Z")

</div>

> [@ClockworkOcean](#):
>
> I think you have to change it in the material you’re trying to use the function in?

The material I’m using it in has additive as its blend mode.

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [June 9, 2020, 2:11pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/6 "2020-06-09T14:11:44Z")

</div>

Not in the material function’s detail pane…in the material function’s graph or in the graph of the material that uses the material function (or both)…click in an empty area of the graph so the general settings show off to the left and select a different blend mode

sorry, didn’t see the further replying until I posted…

If the material it’s used in is Additive, then it would be the material function’s graph to change the setting from Opaque to something else.

---

<div class="post-metadata">

**Author:** ![keenestt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@keenestt](https://forums.unrealengine.com/u/keenestt)\
**Post date:** [June 9, 2020, 2:24pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/7 "2020-06-09T14:24:43Z")

</div>

> [@presto423](#):
>
> Not in the material function’s detail pane…in the material function’s graph or in the graph of the material that uses the material function (or both)…click in an empty area of the graph so the general settings show off to the left and select a different blend mode
> 
> sorry, didn’t see the further replying until I posted…
> 
> If the material it’s used in is Additive, then it would be the material function’s graph to change the setting from Opaque to something else.

No “general settings” pane shows up to the left. Only the “details” one.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 9, 2020, 2:29pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/8 "2020-06-09T14:29:05Z")

</div>

> [@keenestt](#):
>
> No “general settings” pane shows up to the left. Only the “details” one.

In the main material, click on the background of the graph, then on the left you have the details panel 🙂

---

<div class="post-metadata">

**Author:** ![keenestt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@keenestt](https://forums.unrealengine.com/u/keenestt)\
**Post date:** [June 9, 2020, 2:31pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/9 "2020-06-09T14:31:42Z")

</div>

> [@ClockworkOcean](#):
>
> In the main material, click on the background of the graph, then on the left you have the details panel 🙂

The main material is set to additive already.

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [June 9, 2020, 2:36pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/10 "2020-06-09T14:36:39Z")

</div>

that’s what I meant, details panel…sorry, wrong term lol

---

<div class="post-metadata">

**Author:** ![keenestt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@keenestt](https://forums.unrealengine.com/u/keenestt)\
**Post date:** [June 9, 2020, 3:02pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/11 "2020-06-09T15:02:35Z")

</div>

> [@presto423](#):
>
> what’s what I meant, details panel…sorry, wrong term lol

np, but I can’t change the blend mode on the material function, the details pane looks like [this](https://imgur.com/a/Akf4HII).

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [June 9, 2020, 8:25pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/12 "2020-06-09T20:25:46Z")

</div>

well, Not sure what else to suggest…why would it print that message then?

---

<div class="post-metadata">

**Author:** ![keenestt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@keenestt](https://forums.unrealengine.com/u/keenestt)\
**Post date:** [June 9, 2020, 9:07pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/13 "2020-06-09T21:07:18Z")

</div>

> [@presto423](#):
>
> well, Not sure what else to suggest…why would it print that message then?

Not a clue.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 10, 2020, 11:37am UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/14 "2020-06-10T11:37:52Z")

</div>

> [@keenestt](#):
>
> Not a clue.

You can attach the material and function here as text files. I will take a look if you like.

In the material editor just select all, copy and paste in a text file.

---

<div class="post-metadata">

**Author:** ![keenestt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@keenestt](https://forums.unrealengine.com/u/keenestt)\
**Post date:** [June 10, 2020, 3:19pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/15 "2020-06-10T15:19:55Z")

</div>

> [@ClockworkOcean](#):
>
> You can attach the material and function here as text files. I will take a look if you like.
> 
> In the material editor just select all, copy and paste in a text file.

Uhmm, so like this?

[mf\_extractDepth.txt](https://forums.unrealengine.com/uploads/short-url/ieLO13njNrYiJHSWnqS6LPBk59n.txt) (14.3 KB)

[mf\_sampleSceneTextureNeighbourUVs.txt](https://forums.unrealengine.com/uploads/short-url/k6ESC8b48rRx3pjHMg5RhdwpRpD.txt) (77.6 KB)

[mf\_convolveTextures.txt](https://forums.unrealengine.com/uploads/short-url/6BvG4szSH88N0rfFRsUhKCv7O4I.txt) (87.3 KB)

[mat\_outline (main material).txt](https://forums.unrealengine.com/uploads/short-url/uPko3XOP98zilWnnsSr8AEDLkMo.txt) (136 KB)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 10, 2020, 6:45pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/16 "2020-06-10T18:45:11Z")

</div>

> [@keenestt](#):
>
> Uhmm, so like this?
> 
> [mf\_extractDepth.txt](https://forums.unrealengine.com/uploads/short-url/ieLO13njNrYiJHSWnqS6LPBk59n.txt) (14.3 KB)
> 
> [mf\_sampleSceneTextureNeighbourUVs.txt](https://forums.unrealengine.com/uploads/short-url/k6ESC8b48rRx3pjHMg5RhdwpRpD.txt) (77.6 KB)
> 
> [mf\_convolveTextures.txt](https://forums.unrealengine.com/uploads/short-url/6BvG4szSH88N0rfFRsUhKCv7O4I.txt) (87.3 KB)
> 
> [mat\_outline (main material).txt](https://forums.unrealengine.com/uploads/short-url/uPko3XOP98zilWnnsSr8AEDLkMo.txt) (136 KB)

Ok, the error was caused by having two function result nodes chained together in the extract depth function.

Get rid of one and tell me if it’s ok 🙂

---

<div class="post-metadata">

**Author:** ![keenestt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@keenestt](https://forums.unrealengine.com/u/keenestt)\
**Post date:** [June 10, 2020, 7:00pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/17 "2020-06-10T19:00:41Z")

</div>

> [@ClockworkOcean](#):
>
> Ok, the error was caused by having two function result nodes chained together in the extract depth function.
> 
> Get rid of one and tell me if it’s ok 🙂

I can only see one result node in the extract depth function, could you maybe send a screenshot of how it should look?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 10, 2020, 7:22pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/18 "2020-06-10T19:22:04Z")

</div>

> [@keenestt](#):
>
> I can only see one result node in the extract depth function, could you maybe send a screenshot of how it should look?

Sorry, ignore that, me going nuts, hold on…

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 10, 2020, 7:33pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/19 "2020-06-10T19:33:44Z")

</div>

> [@keenestt](#):
>
> I can only see one result node in the extract depth function, could you maybe send a screenshot of how it should look?

Ok, so the function error doesn’t matter, because if you have the material in the right domain when you use the function, the material compiles ok.

The other errors, as we discussed earlier, is because you need to plug a TextureCoordinate node into those two big function nodes.

Any good?

---

<div class="post-metadata">

**Author:** ![keenestt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@keenestt](https://forums.unrealengine.com/u/keenestt)\
**Post date:** [June 10, 2020, 7:52pm UTC](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419/20 "2020-06-10T19:52:37Z")

</div>

> [@ClockworkOcean](#):
>
> Ok, so the function error doesn’t matter, because if you have the material in the right domain when you use the function, the material compiles ok.
> 
> The other errors, as we discussed earlier, is because you need to plug a TextureCoordinate node into those two big function nodes.
> 
> Any good?

I’m not getting any errors in game but the whole screen’s blue. I’ve been looking through the tutorial but I can’t find the issue. I probably just missed something obvious still though.

[Next page](https://forums.unrealengine.com/t/errors-after-following-tutorial/145419.md?page=2)
