keywords: UE4, Materials, How To’s

UE4 Materials How-To’s

How to metal only for a part of mesh

Using Texture Masks
https://docs.unrealengine.com/en-us/Engine/Rendering/Materials/HowTo/Masking

How to stack two textures of special part (invert Mask)

Creating materials with a mask
https://www.youtube.com/watch?v=5161qAPfev0&t=476s

How do I invert opacity mask?
https://forums.unrealengine.com/t/how-do-i-invert-opacity-mask/304770/2

How to make a stained glass window effect

Using Colored Translucent Shadows
https://docs.unrealengine.com/en-us/Engine/Rendering/Materials/HowTo/ColoredTransluscentShadows

How to create a richly colored metallic surface

Create a richly colored metallic surface in UE4
https://odederell3d.wordpress.com/2018/02/08/create-a-richly-colored-metallic-surface-in-ue4/

How To Use The Spiral Blur Material Node

How To Use The Spiral Blur Material Node
https://wiki.unrealengine.com/How_To_Use_The_Spiral_Blur_Material_Node

Font Materials and Outlines

Font Materials and Outlines
https://docs.unrealengine.com/en-us/Engine/UMG/UserGuide/Fonts/Materials

How to clip material in circle range

How can I make a 2D Material into a circle? ( circle range clip )
https://answers.unrealengine.com/questions/565198/how-can-i-make-a-2d-material-into-a-circle.html

Make a square material into a circle
https://answers.unrealengine.com/questions/717609/make-a-square-material-into-a-circle.html

How to manipulate texture repeat, uv on a material

Create a new material, with a Texture2D, or a Texture2D Parameter, difference being a paramater can be changed outside of the material editor!

There is an input UV on the Texture2D with UV on it. You can connect this with a TexCoord, but this texcoord is not a parameter, so can’t be changed outside of the material….

UV’s are values between 0 and 1. If it’s more than 1, it will repeat itself. So to make sure we can change it we need a so called Scalar Parameter. Give the scalar parameter a name to your liking, i.e. “UV Tiling”. Now multiply this value with TexCoord. Now Connect the multiply with the UV’s from the Texture2D node. Compile/Save.

Now in the Content Browser you need to make an instance. Because we can’t change a material directly, but we can change a material instance. Right click on the material and select “Create Instance”. Give it a cool name and put it on the object.

If you go into the material instance you will see your Scalar Parameter “UV Tiling”. You can change it by enabling it first with the toggle next. Change the value to see if it is actually tiling the way you want to.

Now you can change this parameter in Blueprint. Not really sure what the blueprint nodes are named exactly (currently not sitting behind my UE4 computer.). But if you look for material, or parameter you might find something you are looking for.

So remember: The object that you are changing should have the INSTANCE applied!

Side node: If you want different x and y tiling, you can append 2 Scalar Parameters together and multiply that with the TexCoord node.

Reference
https://answers.unrealengine.com/questions/17303/how-to-manipulate-texture-repeat-uv-on-a-material.html

How to set UV Coordinate offset of Texture and zoom in / out it

Can texture coordinate parameters be applied to material instances?
https://answers.unrealengine.com/questions/19412/can-texture-coordinate-parameters-be-applied-to-ma.html

How to make Outline material fade/hide with distance

Reference
https://answers.unrealengine.com/questions/470734/make-outline-material-fadehide-with-distance.html

Foliage Fade

Camera Depth Fade shadow fix for Foliage fade material
https://www.youtube.com/watch?v=RTtPDBRyqBg

Dissolve Effect

Dissolve effects in UE4
http://martiancraft.com/blog/2015/02/disintegrating-baddies/

Planar Dissolve Effect - Material Tutorial - (Unreal Engine 4)
https://www.youtube.com/watch?v=HR3flKges_A

Stylized Fire VFX

Simon Trümpler: Sketch #20 WIP
https://realtimevfx.com/t/simon-trumpler-sketch-20-wip/7654

How to make a mesh transparent

Reference
https://answers.unrealengine.com/questions/157780/is-it-possible-to-make-a-mesh-transparent-without.html

How to make Occlusion Masking

https://www.youtube.com/watch?v=O6W7pLF2GwU

How to combine Normal Maps aka blend Normal Maps

https://www.youtube.com/watch?v=IYutgr9m3Fg

How to blend seams in normal map

Also make sure the Texture Sample node in your material has its “Sampler Type” set to “Normal”. Colors sampled straight from a texture range from 0 to 1, but normal maps need a conversion step to properly reconstruct the normal vector from the texture data (with a range of -1 to 1). If you import the texture as a normal map and use a normal sampler, it should all happen automatically for you in the material sampler node. If you imported it as a regular texture, sampled it in a material as a regular texture, and then switched the texture compression type to normal map, the material sampler might still be expecting a regular texture so it won’t know to automatically apply the normal vector conversion.

Reference
https://forums.unrealengine.com/development-discussion/rendering/36176-normal-map-problem-seams-are-not-blending

Terrain Blending (Landscape Blending / Mesh Blending)

UE4 Terrain Blending: Part 1, Distance Fields - How, why, and why not
https://egray.io/blog/ue4-terrain-blending

UE4: Blending Meshes With Landscapes (or other meshes)
https://www.youtube.com/watch?v=tyLSH5zF-rI

Vertex Paint Materials Vol.1
https://www.unrealengine.com/marketplace/en-US/product/vertex-paint-materials-vol

Cliff Faces 2
https://www.unrealengine.com/marketplace/en-US/product/cliff-faces-01

Triplanar, Dithered Triplanar, and Biplanar Mapping in Unreal
https://ryandowlingsoka.com/Triplanar-Dithered-Triplanar-and-Biplanar-Mapping-in-Unreal-7844313e458e4316aca1e40e6394109e

How to make ring (cycle) material (unit selected vfx) using alpha texture

How to make flipbook animation

Unreal Engine 4 Tutorial: Animated Materials / Flipbook
https://www.youtube.com/watch?v=JHCH0v0CSgk

How to make a simple fade (disappearing) effect

Set Blend Mode as Masked.

Docs

Comprehensive

UE4 Materials How-To’s
https://docs.unrealengine.com/en-us/Engine/Rendering/Materials/HowTo

Materials. Controlling the appearance of surfaces in the world using shaders.
https://docs.unrealengine.com/4.27/en-US/RenderingAndGraphics/Materials/

Useful tidbits of information that help developers get more out of their Unreal Engine development experience!
https://www.unrealdirective.com/tips

Transparent

UE4透明材质的理解和应用
https://www.unrealengine.com/zh-CN/tech-blog/understanding-and-application-of-transparent-materials-in-ue4


渐渐的知道了,很多东西可遇而不可求,不属于自己的,何必拼了命去在乎,你在意什么,什么就会折磨你,期待是所有心痛的根源。