Different Materials for Edges and Surfaces

Is there a way to apply different materials to an actor, say a cube, the edges or the lines of the cube is applied a material and the surfaces or the planes another material? So as to draw a very thin border between different actors of the same class that are very close?

You can work with brushes and cut faces into fragments and apply different materials to different polygons. You can do the same with specialized 3d editors and export cubes into your project. Or you can create a custom image with borders and apply it to your cubes.


That solved the border problem. But a custom images border is fixed in its resolution and when I move far enough from the objects that are applied with it, the borders would disappear, and if I move close enough it may become a bit thick. so is there a way to fix the borders thickness no matter how far away I am from the objects? Like the borders of the texts that are displayed in office, no matter how large the texts themselves are the borders` thickness always remains the same?

That may be tricky. I believe it’s somehow possible to use something like GeneratedBand in the material and change its thickness depending on distance to camera, but I can’t tell you exactly how to do that. Maybe some people who know the materials better could help.

Nvm the previous comment, I think I’ve figured that out. Try doing this:

You can play with the numbers to reach the desired effect, but that kind of works as I imagined it would.

Is that what you wanted?

I dont know much about blueprint, Im sort of a noob, so I have to ask how can the nodes that show raw numbers, like 0.01, 1, 0.5… be added to the blueprint? I can`t seem to find the corresponding one. And how can the first parameter of the Divide be altered to 1024?

Thanks again for taking your time:)


First of all, this is not a blueprint, but a Material Graph.

To add a single number you can either hold 1 and left click on the graph, or right click and find “Constant”.

To alter the parameters of math functions, you just click on them and you’ll see its details to the left of your window, right under where your material is shown.

Thanks for your patience.

And yes, that is the effect I so desired. Thank you very much:)

You’re welcome.
You should write an answer to this question and set it to “Resolved”.

Thank you, Tuerer, for your patience and taking your time and solving this.

Im still on my way to figure out what these nodes are for, so cant really explain them in detail for now.