BlenderProc icon indicating copy to clipboard operation
BlenderProc copied to clipboard

[BUG]: Haven texture rocks_ground_02 fails to load

Open Victorlouisdg opened this issue 3 years ago • 5 comments

Other Haven textures load fine, however running:

bproc.api.loader.load_haven_mat(haven_textures_folder, ["rocks_ground_02"])

does not create a new material and does not load the texture, even though it exists.

The reason seems to be that the base color image does not have "_diff_" in its filename but "_col_" instead: image

Changing line 44 in HavenMaterialLoader.py to this seems to resolve the issue for me:

if "_diff_" in path or "_col_" in path:

I'm using the BlenderProc master branch and am running Ubuntu 20.04.

Victorlouisdg avatar Feb 04 '22 10:02 Victorlouisdg

Same issue for t_brick_floor_002 which has "_diffuse_" in the base color image name instead of "_diff_".

Victorlouisdg avatar Feb 04 '22 10:02 Victorlouisdg

Additionally to line 44, line 68 would also have to be changed, because "diff" is substituted there.

Victorlouisdg avatar Feb 04 '22 11:02 Victorlouisdg

Another example: brown_leather uses "_albedo_".

Victorlouisdg avatar Feb 04 '22 11:02 Victorlouisdg

I'll attempt to write a fix to this issue and open a PR.

Victorlouisdg avatar Feb 04 '22 12:02 Victorlouisdg

Hey,

sounds like they added new files and haven't named them all the same. Thanks for catching it.

Best regards, Max

themasterlink avatar Feb 04 '22 12:02 themasterlink