Download

Errors after following tutorial

I want to draw an outline around objects that are selected in-game and I found this tutorial. I followed it as well as I could but I am getting 2 errors.

One of the errors was in mf_extractDepth, and the other was in the material itself.

Hereis 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.

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. Thisis 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?

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

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.

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

The main material is set to additive already.

that’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.

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

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.

Uhmm, so like this?

mf_extractDepth.txt (14.3 KB)

mf_sampleSceneTextureNeighbourUVs.txt (77.6 KB)

mf_convolveTextures.txt (87.3 KB)

mat_outline (main material).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 :slight_smile:

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…

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.