Create a normal map inside Unreal 4?

Is there a way to create texture with only one bitmap, but i also want normals map, is there something inside Unreals material editor that turn a bitmap into a normals, something better than just taking the blue channel and to plug it into the normals :stuck_out_tongue:


There is the NormalFromHeightmap function here: Procedurals | Unreal Engine Documentation

Should do the trick, not as well as a dedicated normal map but it does a pretty good job.

You could also use normal map generators outside of the ue4 :slight_smile:


-NVIDIA Texture Tools Exporter | NVIDIA Developer

But generating it from a high poly mesh will give you a better result :wink:

I try to use that, but that only work with bitmap and not with utility (sometime, when i use a noise for spec, i want to use the samething for the normals)

And Fighter5347, by creating a bitmap of a normal map, iā€™m adding bitmap to the scene, i want to be able to create the NM inside unreal, to lighten the game

The NormalFromHeight function is not doing a good job, you should rather rebuild it manually for better quality (same instrucion count btw):

This is not a good idea. The noise function already is pretty expensive. For generating normals you would have to calculate it at least 3 times.
That being said itā€™s totally possible by using the NormalsFromFunction material function: Ocean shader normal issues! - Rendering - Unreal Engine Forums


For normal map generation I use this photoshop filter
I get excellent results with it :slight_smile:


Thanks, i tought i was saving by generating normals inside unrealā€¦oh well, iā€™ll keep creating my normals with Xnormals



That thought is technically not really wrong.
By creating the normal maps functionally inside UE, you save the memory for and streaming overhead of the normal map texture.
It is just that the gain of this is less than the performance loss due to more extensive calculations on the material.

I doodled a bit around with the material editor and created a checkered material without the use of any texture. :slight_smile:
But I doubt that it will be in any way more efficient or performant than using a small texture.
(In this case, actually a 2x2 texture would suffice).




Just a little update on my checker material example. There was some optimization potential :slight_smile:



Use The black/white pattern for a Lerp and you can cut off another instruction.

Also not a big fan of multiple If nodes hereā€¦

In Blender Jazz Jackrabbit 3 map called JMPForts.unr has too smart proportions.I want to know how easy I can make this map in Unreal Editor 4?

Fwiw there is already a checker material function checked in here:


no If nodes, its set up a bit more like the 2nd example but no clamps.

Also I forgot to mention, I also made a function called ā€œNormal from Functionā€ that will do exactly what you guys are talking about, make a normal from random math functions. it is a bit harder to use though since you actually have to hook up your math twice so that it can solve the slope equation. Let me know if you have any problems with it.

When I see to much umm nodes I have got a migraine.

Iā€™ve long thought this as well. Putting an equivalent of ā€œonline normal map generatorā€ right inside unreal itself.

should be simple enough no ? maybe alongside quixel bridge and mixer, but done using any image right inside unreal.

import image, or take any image and apply effectā€¦
the app would take the sample image, be it from a cell phone or cameraā€¦
process it using deep learning , and increase its resolution to 16k, sharpening it etc etc, removing artifactsā€¦

then it would generate normals, POM displacement, specular, occlusion,
allowing you to change lighting direction and displacement,/normals stength in realtimeā€¦

seeing a preview in a mixer like appā€¦

then output the image directly to the content browserā€¦

or directly into a new material based on the master materialā€¦

the idea, to save you the time of going outside unreal to do it. not to save memory etc.

just to save you the hassle of even leaving Unreal to do it all.


I have this polar bear texture mapā€¦
only a jpeg at 8192ā€¦

so I right click, and generate normals/displacement mapsā€¦
and an app similar to online normal map generator opens up, within unreal itself.

and I save out a material instance based off the master material.