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:

Thanks

There is the NormalFromHeightmap function here: https://docs.unrealengine/latest/INT/Engine/Rendering/Materials/Functions/Reference/Procedurals/index.html#normalfromheightmap

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:

e.g

-SSbump ://ssbump-generator.yolasite/
-https://developer.nvidia/nvidia-texture-tools-adobe-photoshop

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 , 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):
://oliverm-h.blogspot.de/2013/09/udk-material-normals-from-height.html

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: https://forums.unrealengine/showthread.php?8147-Ocean-shader-normal-issues!&p=71995&viewfull=1#post71995

Hi,

For normal map generation I use this photoshop filter
https://developer.nvidia/nvidia-texture-tools-adobe-photoshop
I get excellent results with it :slight_smile:

Cheers,
Klaus

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

Thansk

Hi,

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

d954d792a66fefb918aafd69e07719e6df9b192d.jpeg

Cheers,
Klaus

Hi,

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

0b137292e1e5bb3e1fb6b38c48dda978fc5504ec.jpeg

Cheers,
Klaus

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 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:

MaterialFunctionā€™/Engine/ArtTools/RenderToTexture/MaterialFunctions/CheckerPattern.CheckerPatternā€™

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ā€¦
noiseā€¦

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.

ie,

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.