Very high resolution normalmaps

Hello, im making my first game in UE4, not first at all, but also first to have some advanced graphics involved too (sorry Unity). Well, i’ve never have used normalmaps before, they are awesome though i have a nice GIMP plugin to generate them and it makes the surfaces seem more real.

Anyway I have a nice new from a plant’s orbit in my game. To make it look nicer i applied a normalmap to the planet’s surface material.
It look absoultely gorgeous when viewed from the material preview.
However when viewed in the game, pretty up close the normals are horribly visible, lines all over the surface.


Here you can see the view from far on the left and the view up close in the actual game scene.

Do you guys have any ideas how to solve this problem? Increasing the resolution is a no-go, it’s already in 4K. Also i thought about increasing the distance in the scene but that would disturb the scene. Maybe a bit blurring the normalmap would make the edges less visible but i dont know what would that do with the map being rendered. Dunno.
Thanks for any replies.

Try to add higher frequency detail normal map.

I’m not sure hod do i do that

Like Jenny Gore said, usually to circumvent this kind of problem you overlay your normal with a detail normal. It will distract from the jagged low resolution lines you’re seeing but not fix them. What you could try is following this: http://www.polycount.com/forum/showthread.php?t=75437 and use that to blur your normal map, which would make your jagged lines smoother, that together with a detail normal will probably look way better. But the only “true” way of getting that close up quality is to increase resolution. I know another user on the forum stitched together tons of high resolution normal maps to get proper quality on a similar project.

These kind of artifacts are usually caused by a combination of limited bit depth in your source heightmap and a simplistic normalmap filter that does not take this into account.

A standard 8 bit per channel image only gives you 256 grayscale steps, so in a smooth gradient some adjacent pixels might have the same value, for example, imagine that in a single line of your source image you have the following height values:

100-100-100-101-101-101-102-102-102

A simplistic normalmap filter might only looks at the neighbor pixels and conclude that this represents three flat terraces and two ridges between them instead of the intended smooth gradient.

To solve this you can:

  • Author the heightmap in a higher bit depth format, however, the software you are using has to support it.
  • Use a lower resolution, contrary to what you might think a higher resolution will actually make this worse as the chances of multiple identical adjacent pixels will actually increase with resolution. This would obviously make you lose spacial detail.
  • Use another normalmap generator that is better at preventing these kind of artifacts.
  • As Jenny stated, hide it with detail textures.

Or use a combination, these can all be used complementary.

Ok, by combination of a better quality program to generate surface heightmap and blurring the normalmap i managed to bring it to an acceptable level.

Its still not of my desired quality however, I also tought about generating a huge resolution planet map and then making it into a cubemap.
Though i have no idea how would i make the rotation effect then, because using a regular panner deforms the cubemap instead of rotating it.

I’d use some kind of a distance based texture blending if you’re looking for extra detail. Closer to the planet surface you would have 4k tillable normal map. Such techniques are used for landscape materials where you simply cannot apply one single texture. Other solution I think of is “Granite” (http://graphinesoftware.com/products/granite_for_unreal) but I haven’t used it.

That’s very unusual for game dev :slight_smile:

Ever heard of displacement and parallax? Normals are way old.

Completely different things, neither displacement nor parallax occlusion mapping removes the need for Normal maps.

I agree, i never needed such things, i’m still learning.

I dont think i need a tilable texture since I don’t have such close view to the planet. Im thinking though about stiching multiple large textures together, like mentioned before, but i have no idea how. The only solution i see is to further increase resolution somehow.

Try adding a detail normal as suggested. In addition, depending if it fits your vision of the planet, you could add atmosphere layers that cover up the planets surface.

To go even further, you can use masks to create some point of interests on the surface which adds detail and distract from the lack of detail. In addition to your normal maps, try to make the diffuse more interesting so the normal issues won’t be so obvious to the viewer.

Thats a great idea! To make a blurry low res base texture and add some hi-res points of interest using masks.

Thanks very much to you all guys, you’ve helped me a lot. I’ll look to all the things you listed in here.

stupid question, What file format are you generating your normal maps in/from? Is it a lossless format or something with compression?

Yes, I have.

It really depends on your workflow. General rule to avoid artifacts or dithering in your normal maps is that you should keep source textures as a 16bpp (or 24bpp) images (when you bake out normals from 3ds Max for example). Then you can save it as a 8bpp .TGA (with lossless compression) file or keep the original 16bpp and save it as a .PNG/.TIFF. Most Normal Maps I’m working with are saved in .TGA format. Just make sure Unreal Engine knows that your texture is a Normal Map (Check Texture Group in Texture Editor Details panel)

@DELTA_12
Sorry to wake up this thread but I’m confronted to the exact same issue you have for our own project which takes place on a space station in low orbit around the earth, which means at an altitude of ~400km above the surface of the planet.

On my side and from my experience in the movie industry, you can’t skip the texture resolution factor and detail maps won’t help. I’ve made a little Houdini asset that simulates the situation and shows the actual portion of the planet seen from that altitude. Its very tiny and on a 2K game screen and from my calculations, you must use, for the entire planet, a map of 64kx32k (32k16k would almost do but on our side we also anticipate 4K displays too). Anything lower and you will see pixels or blurred pixels, nothing sharp. This, of course, if you want a dynamic planet which actually rotate and change light condition (the station is orbiting the planet so the lighting varies quite quickly). If not, most games then use skyboxes with static matte painting of just the portion seen.

At first I’ve experimenting by simulating UDIM and splitting the planet in several UV areas but this led to a very heavy Material yet with seems artefacts when using shared texture samplers, artefacts I don’t have when using map texture samplers but then I needed more than 16, which is the limit.

I finally find the solution, sorry if that sounds like an advertisement but this is really the only solution we found for that kind of situation: we ended up using the Granite plugin from Graphine which is able to stream huge textures little tiles by little tiles (mipmaps included), and by using a set of 64kx32k textures (created from NASA/BlueMarble).

The only other solution I can think of is to split your planet piece by piece and create different materials for each piece but… this will be very heavy and I’m not even sure about not having texture seems in this case.

Did you actually solved this issue on your side ?

Why not just use detail normal maps? Giant unique textures is a bit overkill.

@ZacD
Because it simply does not work : /
Try it yourself with a simulated situation of orbiting the earth at ~400km using the Blue Marble map at 2K or even 4K + detail normal maps. It wont work because in this case what matters is not the ‘detail normals’, but the actual normals from the original map.