Poly-Haven / polyhavenassets

A Blender add-on to integrate our assets natively in the asset browser
GNU General Public License v3.0
309 stars 20 forks source link

Models and Textures can't change resolution. #60

Closed ThinkWithPbody closed 1 year ago

ThinkWithPbody commented 1 year ago

Describe the bug Models and Textures can't change resolution. This happens even when I disable all other addons both user and Blender (this includes the cycles render engine!), it does not happen with Load Factory Settings, and does not happen when I simply not load my start up file (for example by going to File > New > 2D Animation). This issue only happens when I use my startup file. Start up files.zip

Console log No relative log, and probably not related to blender itself. I looked through each line and there's nothing related to the issue. I'll leave the log below if you insist to look at it.

To Reproduce As explained above, this only happens with my startup file.

  1. Import a 1k model by dragging and dropping (append reuse data). Object properties and click 4k to download and use. 4k textures now appear in the asset folder but are not used in blender.
  2. Object - Poly Haven Edit Asset. All materials appear to have 4k selected in the addon tab but both the Shader Editor and Image Editor suggest that only one set of textures - without the 1k or 4k suffix - is used. Setting quality on individual materials has no effect either.
  3. Select the diff texture node and select the 4k texture manually - the node refuses to change. Nothing will get this model to change resolution.
  4. Apply the same steps to Texture imports, same result.

    I've taken these steps to troubleshoot:

  5. Go to Outliner > Blend File and delete anything and everything I can delete. Nuke the scene with the atomics addon. No residue collections, objects, materials, images, or links are present in the scene. This cleaned-up file is included in the zip download, along with my original start-up file and the blender default start-up file. The imported model will be the only object in the scene. Problem persists. image

I would really appreciate it if you can take a look at my file and let me know what is preventing PolyHavenAssets to work because theoretically, this could not only happen to my start-up file but also to any file with the same problematic characteristics. whatever that may be.

Another issue is that when I use HDRI or Model or Texture assets with import set to link, the poly haven tab for the appropriate properties panel will not appear. This is problematic for keeping file sizes low as all assets need to be appended to the file to have their resolutions changed. But that's another topic, I can open another issue if you'd like.

Read prefs: C:\Users\twp\AppData\Roaming\Blender Foundation\Blender\3.4\config\userpref.blend
cmolcore imported with success! v1.12
Start generating Libraries...
Generated Icons in 0.185 seconds.
Library Size: 369
aquatiq install dir autodetected as C:\Users\twp\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\aquatiq_full (big zip embedded)
traffiq install dir autodetected as C:\Users\twp\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\traffiq_free (big zip embedded)
--- power trip detected
SIMPLEBAKE: There is a newer version of SimpleBake available
Reloading external rigs...
Reloading external metarigs...
materialiq5 install dir autodetected as C:\Users\twp\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\materialiq5_full (big zip embedded)
Adding reload skin handler to scene
Failed to register scene update handler
botaniq install dir autodetected as C:\Users\twp\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\botaniq_full (big zip embedded)
CAD Transform 0.95.0 : ready
CAD_Sketcher-main:{INFO}: Logging into: C:\Users\twp\AppData\Local\Temp\CAD_Sketcher-main.log
2023-03-15 20:42:50,926     INFO logging.py 24 Logging into: C:\Users\twp\AppData\Local\Temp\CAD_Sketcher-main.log
Failed to load BIMTester. Try disabling other add-ons, in particular Blender-OSM. See bug #1318.
--------------------------------------------------
Failed to unregister <class 'dream_textures.ui.panels.dream_texture.create_panel.<locals>.SubPanel'>
Traceback (most recent call last):
  File "C:\Users\twp\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\simple-tabs\addon\utils\sidebar.py", line 125, in update
    bpy.utils.unregister_class(panel)
RuntimeError: unregister_class(...):, missing bl_rna attribute from 'RNAMeta' instance (may not be registered)
--------------------------------------------------
--------------------------------------------------
Failed to unregister <class 'dream_textures.ui.panels.dream_texture.create_panel.<locals>.SubPanel'>
Traceback (most recent call last):
  File "C:\Users\twp\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\simple-tabs\addon\utils\sidebar.py", line 125, in update
    bpy.utils.unregister_class(panel)
RuntimeError: unregister_class(...):, missing bl_rna attribute from 'RNAMeta' instance (may not be registered)
--------------------------------------------------
--------------------------------------------------
Failed to unregister <class 'dream_textures.ui.panels.dream_texture.create_panel.<locals>.SubPanel'>
Traceback (most recent call last):
  File "C:\Users\twp\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\simple-tabs\addon\utils\sidebar.py", line 125, in update
    bpy.utils.unregister_class(panel)
RuntimeError: unregister_class(...):, missing bl_rna attribute from 'RNAMeta' instance (may not be registered)
--------------------------------------------------
--------------------------------------------------
Failed to unregister <class 'dream_textures.ui.panels.dream_texture.create_panel.<locals>.SubPanel'>
Traceback (most recent call last):
  File "C:\Users\twp\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\simple-tabs\addon\utils\sidebar.py", line 125, in update
    bpy.utils.unregister_class(panel)
RuntimeError: unregister_class(...):, missing bl_rna attribute from 'RNAMeta' instance (may not be registered)
--------------------------------------------------
Info: Updated sidebar tabs
gregzaal commented 1 year ago

Hi, sorry for your troubles.

By the looks of the console log, all errors you're experiencing are related to the simple-tabs add-on.

Once source of confusion I've seen is that the add-on doesn't update the image datablock name, only the file path. So the datablock name may be ..._4k but actually pointing to a 1K file. This is normal. When you change resolutions, the datablock name will stay the same, but the file path it points to will change.

Can you confirm (by zooming in to the model in Rendered or Material Preview mode) that the texture resolution is not changing when you swap between them?

ThinkWithPbody commented 1 year ago

Hi gregzaal,

I went back to take a video of the problem after a system restart, but I cannot reproduce the problem again. I tried to be thorough with my troubleshooting but completely overlooked the importance of a system restart, my apologies for taking up your time.

As for the bug, I can assure you that this was not related to any addons as I had disabled all addons in my testing. The true cause of this weird behavior will remain unknown but for now, even if it happens again I'll know that a restart will fix it. Thanks for explaining how the addon changes only the file path. For my other question, do you know if it will be possible to allow changing of texture resolution when assets were linked to the file as opposed to appended?

gregzaal commented 1 year ago

Glad it seems to be solved :)

do you know if it will be possible to allow changing of texture resolution when assets were linked to the file as opposed to appended?

Unfortunately this is not possible right now.