armory3d / armory3d/armory

Normal mapping results in artifacts when both mesh batching and precompute tangents options are enabled

Open
#2,845 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
3.3k
Forks
353
Avg merge
3d 16h
Merged PRs (30d)
1

Description

**Description**
When both `Batch Meshes` and `Precompute Tangents` options are enabled, strange artefacts appear on the rendered mesh.

For example, consider a 2 X 2 arrangement of 4 identical grid mesh objects:
![image](https://user-images.githubusercontent.com/55564981/230657552-625f6ed5-2b5d-44dd-8720-749372d7355f.png)

The meshes share the following material setup:
![image](https://user-images.githubusercontent.com/55564981/230657762-0e407000-40c1-45d9-86b6-32f662814097.png)

| Either/ both options disabled | Both options enabled|
|--------|--------|
| Correct: ![image](https://user-images.githubusercontent.com/55564981/230658611-10771298-a71e-4520-9997-6ef37be0ae5f.png)| Incorrect: ![image](https://user-images.githubusercontent.com/55564981/230658669-81ca263b-a7c6-4d84-9112-00fc021c7f7b.png)|

Also, this issue does not happen if all the objects share the same mesh data (like linked duplicates).

**To Reproduce**
Run the provided blend file.

**System**
Blender: 3.3 LTS
Armory: SDK 2023.4
OS: Windows 10
Graphics card: Nvdia 2030

**Test File**
[Mesh Batch Normal Mapping Tangents.zip](https://github.com/armory3d/armory/files/11180767/Mesh.Batch.Normal.Mapping.Tangents.zip)

Contributor guide

No contributing guide indexed for this repository

Research direction

Open the provided “Mesh Batch Normal Mapping Tangents.zip” blend file in Blender and reproduce the artifacts with both Batch Meshes and Precompute Tangents enabled. Compare the result with either option disabled or with shared mesh data; done means the four separate grid meshes render without normal-mapping artifacts when both options are enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
blender, cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.