Parallax texture model

Hi. How can I add a parallax texture to a model using the engine? Or is it possible to add it via Blender?

You can store parallax inside a texture that contains Metallic (in R channel), Roughness (in G), Ambient Occlusion (in B) while the parallax is in Alpha.

You could also provide it when exporting glTF (as “heightmap”) but I personally never used it yet, so can’t confirm. My personal preference is to use the combined textures, I think it’s more efficient.

I am not 100% certain what do you mean by “parallax texture” :slight_smile:

There are algorithms called “parallax mapping”, a variant of “bump mapping”, we implement them including “steep parallax bump mapping with self-shadowing” in Castle Game Engine ( Bump Mapping (Normal Maps) | Manual | Castle Game Engine ). They need as input normal map + height map. Is this what you mean?

If yes, provide the height map in the alpha channel of the same image as normal map (normal map information takes RGB, height information takes A). See “Provide a height map and use parallax bump mapping algorithms” section here. You typically assign the normalmap (plus the heightmap in its alpha channel) using Blender for real meshes.

Note that, from my personal experience, the extra effort (height map in the alpha channel and more expensive shader) is not really worth it. It is more impressive in specific circumstances, but usually the most normal bump mapping just looks great and is super-fast :slight_smile:

2 Likes

Ah, I knew I messed something up. I actually do heightmap with normal maps, just checked my files :man_facepalming: I pack metallic/roughness textures, and one option is to add heightmap - probably it has some use in the past.
{ I should comment my own projects better ;) }

1 Like

Maybe there is some program besides GIMP for creating RGB textures?

Do you mean to ask for “RGB textures” in general, or specifically (because that’s what we talked about above) about “normal map textures with possible height map”?

Actually in any case, the answer is “yes, there’s a lot of software you can use for that” :slight_smile:

There’s a lot of software for 2D image creation/editing, and specifically texture creation, and specifically normalmap texture creation.

  • 3D software is actually good for texture creation, including Blender and ZBrush. You can bake normalmaps and heightmaps from a high-poly model by sculpting and then baking the normalmap onto a low-poly model. We have a video documenting how to create normalmaps in Blender.

  • Blender also has procedural textures, which you can use to define a material (both base colors, and/or surface variations that result in normalmaps) and then bake it into regular 2D textures.

  • From other proprietary software, there’s Substance Painter from Adobe, Marmoset.

  • From other free and open-source software, people use Krita to create textures too (though it’s a general 2D image editing application).