0
\$\begingroup\$

I made a model in Blender, with a normal map. There it renders good.

Now I imported that model to Godot 3.4 stable, and in the far distance, it looks ugly. If camera is close enough "steps" disappears. Looks like, there is no antialiasing or something like this.

Also, the problem is 100% in normal map texture, because if I switch it off, only rendering Albedo texture, all displays fine.

What should I do?

Blender: enter image description here enter image description here

(height texture is just black and white version of original texture)

Godot: enter image description here enter image description here

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Did you check filtering, anisotropy level, mipmaps generation, and image format for your textures in their import settings? \$\endgroup\$
    – liggiorgio
    Commented Dec 9, 2021 at 12:32
  • \$\begingroup\$ @liggiorgio, no I just exported it via Blender's addon and started to work from Godot. Where can I find that settings? \$\endgroup\$ Commented Dec 9, 2021 at 13:09

1 Answer 1

1
\$\begingroup\$

Your issue may be due to your texture's import settings.

When you select a texture from the FileSystem tab, its import settings can be accessed via the Import tab, next to the Scene tab:

Import settings

According to the Godot Docs, you can mark any texture as 3D use if the engine didn't detect it itself (2D texture is the default). You can enable mipmaps for both the albedo and normal map textures so that they look smoothed when moving the camera around. Anisotropic filtering can also help prevent visual artefacts.

About normal maps, Godot requires the texture to use the X+, Y-, Z+ coordinates; inverted normal direction along the Y-axis occurs otherwise. If this is your problem, you can fix it in Blender itself when exporting. You can invert the value of one channel using Nodes, as described in this answer from Blender SE (same goes for previous Blender versions, as seen in this answer).


EDIT

If you're using grayscale heightmaps for bump/displacement mapping, with values between 0 (min elevation) and 1 (max elevation), then you shouldn't use the Normal map slot of the Spatial Material properties in the Inspector.

Instead, you can assign your bump texture to the Depth slot in the Inspector. This data is one-dimensional, and a single-channel image, such as a grayscale one, will do (normal maps use two colour channels OTOH).

Alternatively, you can work in Blender and bake & export an actual normal map instead of a bump map, so that you can use it in Godot as expected.


EDIT 2

Since your issues derive from plain exporting from Blender to Godot, I can suggest another solution to your texture problem.

When exporting a 3D model, you can choose to export either the full model (mesh + normals + UVs + materials + ...) or only a subset of such features. While geometry data is resolved via 3D file format, material data differs in that the same material might be rendered differently by different engines, due to custom modifiers that are available on one platform but aren't on another.

When importing 3D models from Blender, Godot uses the source geometry but first attempts to apply its own materials because they'd work best. If no corresponding materials exist (which you shall create), Blender's exported will be used instead. Blender materials are simply mapped to Godot equivalents as long as they both have shared properties; if Blender uses custom modifiers unavailable to Godot, such features may be lost and only an approximated material is rendered.

This is why Godot suggests how to export Blender materials in order to get the best match possible. To do so, you can use the "Better" Collada exporter, or install this native add-on for Blender.

Of course, this applies if you don't want to spend time creating Godot materials from scratch. If this solution doesn't work either, you can still import your model in Godot and override its materials.

\$\endgroup\$
9
  • \$\begingroup\$ Well, perhaps I use some wrong terminology, but my "normal map" is just non-color version of texture You see on screenshot where I set darkest for the "deepest" and lightest for the "toppest". I pinned my nodes from Blender \$\endgroup\$ Commented Dec 9, 2021 at 19:38
  • \$\begingroup\$ Also, by changing setting You mentioned nothing happens \$\endgroup\$ Commented Dec 9, 2021 at 19:44
  • \$\begingroup\$ Grayscale images are used for bump mapping or displacement mapping. You should edit your question since it's a major difference. I updated my answer as well. \$\endgroup\$
    – liggiorgio
    Commented Dec 9, 2021 at 21:51
  • \$\begingroup\$ You mentioned some properties of material in Godot, but I actually didn't touch them at all. I just exported it and started to use, and it is sad that the main benefit of Godot - best exporting from Blender works actually bad for such simple material. Although, probably another engines are worst in this aspect \$\endgroup\$ Commented Dec 10, 2021 at 10:14
  • 1
    \$\begingroup\$ After making displacement and normal map textures here cpetry.github.io/NormalMap-Online and putting to Godot it finally good \$\endgroup\$ Commented Dec 10, 2021 at 10:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .