x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Render To Texture Normal Maps Appear Incorrect

Hello. I'm using the render to texture features for the first time whilst following the 'Baking Materials to Textures' Live Training video by Unreal and so far my textures have all baked correctly apart from the normal map.

I'm assuming the idea is that you bake the normal that has normal compression into a regular texture and then use that without normal compression. So following this, the baked normal looks fine in some areas, but in some it still appears incorrect. Mainly it seems like the red channel is much weaker than it should be.

I imported the baked normal into Photoshop and set the bits to 8Bits per channel as according to the video, but they don't show the baked normal map in effect so I don't know if I'm alone here. I plugged both the correctly functioning normal map into an emmisive of an unlit material and compared it to the baked normal shown below, there's literally no visual difference in the normal map. I'm confused.

I'm assuming all normal compression and then baking messes up somewhere along the lines and results in this, though I can't seem to pinpoint why it looks this way. Any help is much appreciated.

alt text alt text

Product Version: UE 4.16
Tags:
more ▼

asked Jul 24 '17 at 10:55 PM in Rendering

avatar image

Geosmith Tech.
68 14 18 20

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Thanks to a blog post made by Oliver M-H (linked below) I've managed to successfully bake a normal map correctly.

Turns out multiplying a normal map by 2 and then subtracting 1 will have the same effect of normal compression, so reversing this (adding 1 then dividing by 2) on your material normal output then baking will result in what looks like a correct normal map (like on the right in image in main post). Then simply take that and set up the normal compression settings a standard normal map would have.

As mentioned in the video, taking the baked texture into Photoshop to set the bits per channel to 8 which was supposed to fix some depth problems, for me just broke the normal map again. I'm unsure whether this affects overall performance, but looking at the sizes a 32bit HDR is still smaller than a 8bit TGA, which doesn't tell me much since TGA seems to always be locked at 48mb. Under the details panel the resource size seems to be half The baked normal with 32 bits per channel appears correctly so far, there are a few minor artifacts but I'm unsure whether much can be done about them.

http://oliverm-h.blogspot.co.uk/2014/03/ue4-quick-tip-dxt1dxt5-normal-maps.html

more ▼

answered Jul 25 '17 at 02:37 PM

avatar image

Geosmith Tech.
68 14 18 20

avatar image Geosmith Tech. Jul 30 '17 at 08:00 PM

One extra note. Using the 'BlendAngleCorrectedNormals' node to combine multiple normal maps will bake out incorrectly! Use a Add/Multiply blend instead as shown here: http://www.jackcaron.com/techart/2014/11/14/ue4-normal-blending

(comments are locked)
10|2000 characters needed characters left

I'm also rendering normals to textures. After solving the N*2-1 conversion, it was still generating very strong normals. To fix I Normalize the normals before the N*2-1 conversion. It now outputs normals identical to the original ones. And I do the conversion using the ConstantBiasScale node. The default values of 1 and 0.5 are exactly what we need.

Also, for anyone else baking material outputs into textures, for the BaseColor to appear correct, I had to do BaseColor^(1/2.2) to render the colors in sRGB. Then, after creating the static texture from the normal map, I always activate sRGB in the texture properties.

The baked textures now result in a material identical to the original one.

more ▼

answered Sep 06 '18 at 06:01 AM

avatar image

RVillani
1.1k 27 37 89

avatar image Geosmith Tech. Sep 06 '18 at 09:09 AM

I don't remember exactly my set up since this was quite a while ago but even after managing to replicate identical materials, the biggest issue I had is that mipmaps wouldn't really work or be created with the baked textures. I wanted this baking process to be as automated and as isolated in UE4 as possible, but that was the deal breaker for me since I couldn't find a way to get mipmaps to work correctly.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question