How to make a normal map effect

Hi everyone. I don’t recall anyone ever posting anything about that method ever on the internet, so here’s a little tutorial.
This is basically a kind-of normal-map faking trick.
I am gonna do this on a road texture.

Final result:

So first, get an asphalt/road texture. I used this one [the first one that’s seamless]:
https://www.textures.com/download/asphaltdamaged0056/46482?q=asphalt
Now just slap that as a texture on a part, or like I did, just set the part material to Concrete and the color to any you want [no texture].

Now the fun part:
Open Photoshop. I’m not sure if it’s possible on any other software, but I think you’ll figure out if you are able to.
With the Color pick, select the kinda “general” color of the road. - image
Then go to Select > Color Range.


Adjust the fuzziness until it selects the cracks/“deep” spots, then click OK and press Del 1-2 times (depending on how much fuzziness you selected, maybe you don’t have to) while mask is selected. You should now be left with an “extraction” of the cracks or “deep” spots.
You should get something like this:

Now you make an invisible brick above your main road part, set it’s material to Air and change the texture to the new image. I suggest playing with transparency of the texture a little.

Why air?
You set it to air to get rid of the specular highlights on the crack texture(s), which gives it that normal map effect we are looking for. You set it to air by just doing [yourpart].Material=Enum.Material.Air in the console or a script.

Optional continuation:

I had 2 different variations of that texture simultaneously on the road (air) part.
image



The 0,0,0 color one is the cracks themselves, and the 222,222,222 color one is basically like a little texture-filler for better looks.
Note how I changed the cracks texture(s) to white instead of black in photoshop, and made the edges transparent. The white color is in-case you wish to recolor the cracks texture. The edge removal is to avoid overlapping when making actual road curves.
However, you might notice, that without the 222,222,222 color filler and only cracks the transparent edges might be very noticable

This is where the filler texture with a higher StudsPerTileU/V comes into play, hiding the transparent edges of the crack texture and adding more texture to the road.

That’s pretty much it.
Enjoy!

note: we obviously have no guarantee of the Air material working like that forever, but I am super-positive that it will last until we get Custom Materials

EDIT: There is another way to do the Color Pick part/Cracks texture part. So, instead of selecting “the kinda “general” color of the road”, select the color black, then adjust the fuzziness to your liking. When you click OK and PS highlights the selection, press CTRL+ALT+I to invert the selection, and press Del.
It should be the better way, especially if your texture has different colors.

EDIT 2: Specular map faking trick

82 Likes

I actually only just realised the Air material could be set for parts, other than some really odd behaviour with unanchored parts I didn’t notice anything else. While it might be a hacky way to do it, it’s very clever nonetheless.

Nice one! I’ll be sure to take advantage of this in the future.

2 Likes

Could you bake the texture to get the same effects?

2 Likes

A baked texture wouldn’t changed based on angle and lighting. It would only work in a static scene, as the texture is a static image.

This method isn’t really specular highlighting, it’s a clever workaround- it uses lack of highlighting. By setting the Part to Air, the texture will not be affected by lighting. This means that while the rest changes, this one stands out, creating a normal map effect.

4 Likes

What I’ve been looking for the whole time.

1 Like


Also how can I get this more realistic.
Edit: If you don’t mind can you send over a template.

3 Likes

The “realism” in the roads (or normal mapped textures in general) heavily depends on the lighting/shading. Just get some lighting to affect the road such as simple light sources, or set the time of day to sunset/sunrise so the part would reflect it like in the pics I sent.

1 Like

I forgot to add something, if your texture has multiple colors then do this instead.

1 Like

Ok, this tutorial has been very helpful but unfortunately, it’s outdated a bit. You can still get beautiful 3d textures with this; but instead of using air, use fabric for the areas that you don’t want specular highlights on. Air doesn’t remove specular highlights anymore sadly.

1 Like

Very nice but now we have PBR. Great tutorial though.