How to draw a mesh's wireframe and its material

Hi,
i have two materials for my mesh… a normal one with a texture and normal-map and a second one, where i selected wireframe and set the emissive color to get a nice glowing wireframe…

now i want to use the normal material and let the wireframe glow on the same mesh…

As far as i can tell you would create a material function and blend between them but i cannot find any reference to the wireframe functionality…

Is there any possibility to draw the wireframe and the material at the same time?

here i used a blueprint, dublicated the mesh and applied two different materials…
it kinda works but it doesn’t seem like the right way to do this…

Hey Dave4723 -

You are correct that the blend of the two materials would be the way to get this effect. If I am understanding what you are looking for, you will want to add a “Make Material Attributes” before the Output module in the Material Function, then build one of your materials.

Good Luck -
Eric Ketchum

Also Dave4723, Take a look at this tutorial on our wiki which might help you out https://wiki.unrealengine.com/Creating_Layered_Materials_(Tutorial)

yes BUT where can i set the material attributes to wireframe?..
that’s what i didn’t find :slight_smile:

Hey Dave4723 -

I am looking into a more streamline way to achieve this effect, but I understand what you are looking for now. One possible solution would be to render out a black and white texture of the mesh in wireframe and then build your emissive material by multiplying your wireframe texture by a 3 constant.

If you need clarification let me know,
Eric Ketchum

Thanks! that should get it done

hey dave, did you ever find a way to set the material attributes in a material function to wireframe?

also looking for an answer to this !!!

I don’t believe this is possible. To make a layered material as many people seem to suggest does not solve the problem. If you toggle the “wireframe” on a standard material, and plug a series of layered materials into that using “material attributes” the wifreframe from the standard material will override the previous layered material work. Anywhere you have white in your alpha (or all of it if you are not using an alpha) will become wireframe. Seems like an odd conundrum .