-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Haven texture leather_red_02 fails to load #456
Comments
Maybe we should make two different materials in such cases, that we have one copy with |
Initially I had the same idea as you, but now I think I'd prefer a solution where this is handled by the When the loader encounters a folder with several color variations, it would then create Blender materials for all of them, e.g:
Another benefit of handling this with the loader is that it saves disk space, because we don't need to duplicate the other textures maps. |
I just realised that maybe you already meant that we should handle this during loading. I'll try to implement a solution that:
Also, the names I suggested above are bad, because on the thrid line here, the material would not be found: texture_name = "leather_red_02"
load_haven_mat(haven_folder, texture_name)
material = bpy.data.materials[texture_name] Now I'm thinking we should load all the variations with the name |
Also look for col and diff_png keys in Haven API response for textures, instead of only the Diffuse key. This change allows more textures (e.g. leather_red_02 and fabric_pattern_05) to be downloadedwith all their base color image variations. closes DLR-RM#456
The following line does not create a new material and does not load the texture:
The reason is that the no color base texture was downloaded:
![image](https://cdn.statically.io/img/user-images.githubusercontent.com/23340946/152511598-2494f965-e541-4814-b78b-32ab43f1d4af.png)
When manually downloading the texture from Haven, the issue becomes apparent:
![image](https://cdn.statically.io/img/user-images.githubusercontent.com/23340946/152511898-aa1161b7-6fd0-4229-ab19-004fdf1d92b2.png)
This texture has two color variations, with names
Coll1
andColl2
, which are not downloaded by the download_texture()Possible solution:
Coll1
andColl2
to keys to be downloaded_coll1_
in load_haven_mat() as wellThe text was updated successfully, but these errors were encountered: