KK-Blender-Porter-Pack icon indicating copy to clipboard operation
KK-Blender-Porter-Pack copied to clipboard

Outfit is completely white

Open m3t4f1v3 opened this issue 2 years ago • 2 comments

card (nsfw-ish)

Eevee: image Cycles: image

My blender version is 3.0.0 (it does not work on anything higher, including 3.0.1) The plugin version is 7b9ecbf48b42b20e5e12d6e548390e452da8728f (mediamoot's fork) I am running on linux so it might have something to do with that

Here are the errors that show up after importing:

Converting Colors...
/media/Games/Koikatsu/Export_PMX/20220913154835_시에스타410/
ERROR (gpu.shader): GPU_material_compile FragShader: 
      | 
 8159 |   set_rgb_one(tmp1306);
      |                        ^
      | Error: syntax error, unexpected ',', expecting ')'

ERROR (gpu.shader): GPU_material_compile FragShader: 
      | 
 7955 |   set_rgb_one(tmp1306);
      |                        ^
      | Error: syntax error, unexpected ',', expecting ')'


Converting Colors...
cleared

m3t4f1v3 avatar Sep 13 '22 10:09 m3t4f1v3

There are no issues on blender 3.3 on windows however

m3t4f1v3 avatar Sep 14 '22 06:09 m3t4f1v3

Yeah, the color conversion seems a bit iffy on linux

Might be an issue with OpenGL but idk

MediaMoots avatar Sep 15 '22 08:09 MediaMoots

bit late to the discussion, but I've had the exact same problem when running this process.

I did look into the Export_PMX folder and found that the images which hold the UV texture data are completely white. (see attached as example) cf_m_top_jacket01 8380_MT

OS: Arch Linux Game Version: BetterRepack RX 14 Extra info: Using Lutris-fshack-7.2 for wine

EDIT: Nevermind, Closer inspection leads me to the fact that the are supposed to be mostly white? I have also ran the importer with the console open which gives me the following output:

ERROR (gpu.shader): pyGPUShader FragShader:
      |
   98 |         vec3 lutcol_bot = texture2D( lut, coord_bot ).rgb;
      |                     ^
      | Error: no function with name 'texture2D'
      | Error: type mismatch
      |
   99 |         vec3 lutcol_top = texture2D( lut, coord_top ).rgb;
      |                     ^
      | Error: no function with name 'texture2D'
      | Error: type mismatch
      |
  101 |         vec3 lutColor = mix(lutcol_bot, lutcol_top, coord_frac.z);
      |                       ^
      | `lutcol_bot' used uninitialized
      |
      |         vec3 lutColor = mix(lutcol_bot, lutcol_top, coord_frac.z);
      |                                   ^
      | `lutcol_top' used uninitialized
      |
  107 |         vec4 texRGBA = texture2D(tex0, gl_FragCoord.xy / u_resolution);
      |                  ^
      | Error: no function with name 'texture2D'
      |
  109 |         vec3 texColor = to_srgb(texRGBA.rgb);
      |                           ^
      | `texRGBA' used uninitialized
      |
  115 |         out_Color = vec4(newColor.rgb, texRGBA.a);
      |                                  ^
      | `texRGBA' used uninitialized


Error:          Unknown python error occurred
Traceback (most recent call last):
  File "/home/scraft161/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V610/importing/importcolors.py", line 770, in execute
    convert_main_textures(lut_light)
  File "/home/scraft161/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V610/importing/importcolors.py", line 501, in convert_main_textures
    image_to_KK(image, lut_light)
  File "/home/scraft161/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V610/importing/importcolors.py", line 105, in image_to_KK
    shader = gpu.types.GPUShader(vertex_default, current_code)
Exception: Shader Compile Error, see console for more details

Error: Traceback (most recent call last):
  File "/home/scraft161/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V610/importing/importcolors.py", line 770, in execute
    convert_main_textures(lut_light)
  File "/home/scraft161/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V610/importing/importcolors.py", line 501, in convert_main_textures
    image_to_KK(image, lut_light)
  File "/home/scraft161/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V610/importing/importcolors.py", line 105, in image_to_KK
    shader = gpu.types.GPUShader(vertex_default, current_code)
Exception: Shader Compile Error, see console for more details

Traceback (most recent call last):
  File "/home/scraft161/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V610/importing/importbuttons.py", line 93, in execute
    bpy.ops.kkb.importcolors('EXEC_DEFAULT'),
  File "/usr/share/blender/3.3/scripts/modules/bpy/ops.py", line 111, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Traceback (most recent call last):
  File "/home/scraft161/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V610/importing/importcolors.py", line 770, in execute
    convert_main_textures(lut_light)
  File "/home/scraft161/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V610/importing/importcolors.py", line 501, in convert_main_textures
    image_to_KK(image, lut_light)
  File "/home/scraft161/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-V610/importing/importcolors.py", line 105, in image_to_KK
    shader = gpu.types.GPUShader(vertex_default, current_code)
Exception: Shader Compile Error, see console for more details

I'm using blender 3.3 from the standard repositories

Scraft161 avatar Oct 10 '22 00:10 Scraft161

so, after coming back to this and checking up on whether it got fixed I did a more thorough search and found #208 is pretty much the same thing. they managed to narrow the problem down to BGL acting differently on Linux (bug?).

I'd love to see this addressed as right now, the only solution is to use a minimal windows VM for the import process, which is complicated and adds a lot of overhead on the import process.

Scraft161 avatar Nov 14 '22 01:11 Scraft161

@m3t4f1v3 the plugin has been updated (v6.2.0), this version should fix the whole linux outfit problem.

Scraft161 avatar Nov 20 '22 00:11 Scraft161