FlailingFog / KK-Blender-Porter-Pack

Plugin pack for exporting Koikatsu characters to Blender.
310 stars 29 forks source link

Colors don't covert for clothing on linux #208

Closed ghost closed 1 year ago

ghost commented 1 year ago

When I tried importing one of the default characters after updating to the latest version of blender, v3.2.1, I recieve some errors. I'm not sure if this is the new update or trying run the importer in linux, I know blender uses python so it should in theory be platform agnostic.

422d8b9

Python: Traceback (most recent call last):
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/importbuttons.py", line 110, in execute
    bpy.ops.kkb.importcolors('EXEC_DEFAULT'),
  File "/home/metabox/Documents/blender/3.2/scripts/modules/bpy/ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Traceback (most recent call last):
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/importcolors.py", line 754, in execute
    convert_main_textures(lut_light)
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/importcolors.py", line 500, in convert_main_textures
    image_to_KK(image, lut_light)
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/importcolors.py", line 104, in image_to_KK
    shader = gpu.types.GPUShader(vertex_default, current_code)
Exception: Shader Compile Error, see console for more details

649eb4e

Python: Traceback (most recent call last):
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/importbuttons.py", line 117, in execute
    bpy.ops.kkb.separatebody('INVOKE_DEFAULT'),
  File "/home/metabox/Documents/blender/3.2/scripts/modules/bpy/ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Traceback (most recent call last):
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/separatebody.py", line 667, in execute
    separate_everything(context)
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/separatebody.py", line 167, in separate_everything
    separate_material(outfit, hair_mat_list)
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/separatebody.py", line 128, in separate_material
    bpy.ops.mesh.separate(type='SELECTED')
  File "/home/metabox/Documents/blender/3.2/scripts/modules/bpy/ops.py", line 115, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Nothing selected
FlailingFog commented 1 year ago

I think this is a linux thing. I tried 3.2.1 with the flatpak, then 3.2.1 and 3.2.0 exes through wine but they all gave the shader compile error message. 3.2.0 on windows has been working for me. Do you know what versions you were using when it did work, or where you just using windows previously?

ghost commented 1 year ago

Do you know what versions you were using when it did work, or where you just using windows previously?

I used windows previously with v3.2.0.

Cycles + GPU + Supported

Traceback (most recent call last):
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/importbuttons.py", line 117, in execute
    bpy.ops.kkb.separatebody('INVOKE_DEFAULT'),
  File "/home/metabox/Documents/blender/3.2/scripts/modules/bpy/ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Traceback (most recent call last):
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/separatebody.py", line 667, in execute
    separate_everything(context)
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/separatebody.py", line 167, in separate_everything
    separate_material(outfit, hair_mat_list)
  File "/home/metabox/.config/blender/3.2/scripts/addons/KK-Blender-Shader-Pack-pluginupdate/importing/separatebody.py", line 128, in separate_material
    bpy.ops.mesh.separate(type='SELECTED')
  File "/home/metabox/Documents/blender/3.2/scripts/modules/bpy/ops.py", line 115, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Nothing selected
poisenbery commented 1 year ago

@ghost573

Do you have python3 installed? Newer versions of blender only work with python3.

ghost commented 1 year ago

Do you have python3 installed? Newer versions of blender only work with python3.

Yep, v3.10.5-1.

ghost commented 1 year ago

Okay, something funny happened. I tried version 3.0.1 and importing suddenly works properly. Something broke from 3.1 onwards that was working on 3.0.1.

successful import in to blender ``` Read prefs: /home/metabox/.config/blender/3.0/config/userpref.blend ### Loading CATS... mmd_tools_local registed 131 classes ### Loaded CATS successfully! ../mesa-22.1.4/src/intel/isl/isl.c:2216: FINISHME: ../mesa-22.1.4/src/intel/isl/isl.c:isl_surf_supports_ccs: CCS for 3D textures is disabled, but a workaround is available. ValueError: the return value must be None File "/home/metabox/.config/blender/3.0/scripts/addons/cats-blender-plugin-0-19-0/tools/settings.py", line 249, in update_settings ==== KKBP Log ==== Info: Imported MMD model from "/home/metabox/Games/Koikatsu/Export_PMX/20220808181314_base/model.pmx" Finalizing PMX file... Modifying armature... Finished in 1.24s Translating and combining shapekeys... Warning: 1 x Draw window and swap: 15.2030 ms, average: 15.20299911 ms Warning: 1 x Draw window and swap: 11.9750 ms, average: 11.97504997 ms Warning: 1 x Draw window and swap: 16.9508 ms, average: 16.95084572 ms Warning: 1 x Draw window and swap: 19.7709 ms, average: 19.77086067 ms Warning: 1 x Draw window and swap: 19.8729 ms, average: 19.87290382 ms Warning: 1 x Draw window and swap: 19.9840 ms, average: 19.98400688 ms Warning: 1 x Draw window and swap: 18.1251 ms, average: 18.12505722 ms Warning: 1 x Draw window and swap: 18.3821 ms, average: 18.38207245 ms Warning: 1 x Draw window and swap: 18.1751 ms, average: 18.17512512 ms Warning: 1 x Draw window and swap: 18.4181 ms, average: 18.41807365 ms Warning: 1 x Draw window and swap: 15.5430 ms, average: 15.54298401 ms Warning: 1 x Draw window and swap: 15.4688 ms, average: 15.46883583 ms Warning: 1 x Draw window and swap: 15.5590 ms, average: 15.55895805 ms Warning: 1 x Draw window and swap: 16.4521 ms, average: 16.45207405 ms Warning: 1 x Draw window and swap: 14.6940 ms, average: 14.69397545 ms Warning: 1 x Draw window and swap: 15.6019 ms, average: 15.60187340 ms Warning: 1 x Draw window and swap: 15.5149 ms, average: 15.51485062 ms Warning: 1 x Draw window and swap: 15.6629 ms, average: 15.66290855 ms Warning: 1 x Draw window and swap: 15.6190 ms, average: 15.61903954 ms Warning: 1 x Draw window and swap: 15.6209 ms, average: 15.62094688 ms Warning: 1 x Draw window and swap: 15.6870 ms, average: 15.68698883 ms Warning: 1 x Draw window and swap: 15.7940 ms, average: 15.79403877 ms Warning: 1 x Draw window and swap: 15.7149 ms, average: 15.71488380 ms Warning: 1 x Draw window and swap: 15.6720 ms, average: 15.67196846 ms Warning: 1 x Draw window and swap: 15.6970 ms, average: 15.69700241 ms Warning: 1 x Draw window and swap: 12.4259 ms, average: 12.42589951 ms Warning: 1 x Draw window and swap: 12.1081 ms, average: 12.10808754 ms Warning: 1 x Draw window and swap: 12.4390 ms, average: 12.43901253 ms Warning: 1 x Draw window and swap: 12.3720 ms, average: 12.37201691 ms Warning: 1 x Draw window and swap: 16.8881 ms, average: 16.88814163 ms Warning: 1 x Draw window and swap: 19.8419 ms, average: 19.84190941 ms Warning: 1 x Draw window and swap: 19.9490 ms, average: 19.94895935 ms Warning: 1 x Draw window and swap: 20.1359 ms, average: 20.13587952 ms Warning: 1 x Draw window and swap: 18.1708 ms, average: 18.17083359 ms Warning: 1 x Draw window and swap: 18.3771 ms, average: 18.37706566 ms Warning: 1 x Draw window and swap: 18.3671 ms, average: 18.36705208 ms Warning: 1 x Draw window and swap: 18.1968 ms, average: 18.19682121 ms Warning: 1 x Draw window and swap: 15.7020 ms, average: 15.70200920 ms Warning: 1 x Draw window and swap: 15.3232 ms, average: 15.32316208 ms Warning: 1 x Draw window and swap: 16.3560 ms, average: 16.35599136 ms Warning: 1 x Draw window and swap: 14.8530 ms, average: 14.85300064 ms Warning: 1 x Draw window and swap: 15.5091 ms, average: 15.50912857 ms Warning: 1 x Draw window and swap: 15.3530 ms, average: 15.35296440 ms Warning: 1 x Draw window and swap: 15.4741 ms, average: 15.47408104 ms Warning: 1 x Draw window and swap: 15.6660 ms, average: 15.66600800 ms Warning: 1 x Draw window and swap: 15.3971 ms, average: 15.39707184 ms Warning: 1 x Draw window and swap: 15.6791 ms, average: 15.67912102 ms Warning: 1 x Draw window and swap: 15.3301 ms, average: 15.33007622 ms Finished in 1.31s Separating body, clothes, hair, hitboxes and shadowcast, then removing duplicate materials... Warning: Material wasn't found when separating body materials: cf_m_tang.001 Moving duplicate material Bonelyfans in slot 17 to the original slot 1 Moving duplicate material cf_m_sirome_00 in slot 12 to the original slot 11 Moving duplicate material cf_m_hitomi_00 in slot 14 to the original slot 13 Info: Removed 3 slots Warning: Material wasn't found when separating body materials: cf_m_hitomi_00.001 Warning: Material wasn't found when separating body materials: cf_m_sirome_00.001 Warning: Material wasn't found when separating body materials: cf_m_tooth.001 Warning: Material wasn't found when separating body materials: cf_m_face_00.001 Warning: Material wasn't found when separating body materials: cm_m_body Warning: Material wasn't found when separating body materials: c_m_shadowcast Warning: Material wasn't found when separating body materials: Standard Error: Nothing selected Warning: Material wasn't found when separating body materials: Bonelyfans.001 Info: Bonelyfans moved to Shadowcast Collection Info: Objects moved to Hitbox Collection Info: Removed 1467 vertice(s) Info: Removed 15 slots Info: Removed 36 slots Finished in 2.41s Categorizing bones into armature layers... Finished in 0.03s Adding bone drivers... Reparenting bones and setting up IKs... Warning: 1 x Draw window and swap: 14.4379 ms, average: 14.43791389 ms Warning: 1 x Draw window and swap: 11.1952 ms, average: 11.19518280 ms Setting up joint bones... Warning: 1 x Draw window and swap: 11.9829 ms, average: 11.98291779 ms Creating eye controller and renaming bones... Warning: 1 x Draw window and swap: 9.9971 ms, average: 9.99712944 ms Finished in 3.97s Applying material templates and textures... Warning: material or template wasn't found: cf_m_sirome_00.001 / Template Eyewhites (sirome) Warning: material or template wasn't found: cf_m_hitomi_00.001 / Template Eye (hitomi) Warning: material or template wasn't found: cm_m_body / Template Body Warning: material or template wasn't found: cf_m_tooth.001 / Template Fangs (tooth.001) Warning: 1 x Draw window and swap: 235.0740 ms, average: 235.07404327 ms Getting textures from: /home/metabox/Games/Koikatsu/Export_PMX/20220808181314_base/ File not found, skipping: cm_m_body_DM.png File not found, skipping: cm_m_body_LM.png File not found, skipping: cf_m_body_ot2.png File not found, skipping: cm_m_body_ot1.png File not found, skipping: cm_m_body_ot1.png File not found, skipping: cf_m_body_T4.png File not found, skipping: cf_m_face_00_LM.png File not found, skipping: cf_m_face_00_T5.png File not found, skipping: cf_m_face_00_T6.png File not found, skipping: cf_m_face_00_T7.png File not found, skipping: cf_m_noseline_00_MT_CT.png File not found, skipping: cf_m_eyeline_kage_MT.png File not found, skipping: cf_m_tang_NMPD_CNV.png File not found, skipping: cf_m_hair_b_00 -356948_MT_CT.png File not found, skipping: cf_m_hair_b_00 -356948_DM.png File not found, skipping: cf_m_hair_b_00 -356948_AM.png Warning: 1 x Draw window and swap: 53.9119 ms, average: 53.91192436 ms cf_m_hair_b_00 -356948 had no alphamask or maintex Adding bone widgets... Warning: 1 x Draw window and swap: 63.4470 ms, average: 63.44699860 ms Finished in 1.11s Info: Removed 1 slots Converting Colors... /home/metabox/Games/Koikatsu/Export_PMX/20220808181314_base/model.pmx ```
MediaMoots commented 1 year ago

@ghost573

Just checking, is this fixed?

ghost commented 1 year ago

@MediaMoots kind of. I was able to get some colors converted but it's for the body only not any clothes. Checking the terminal, it seems to get stuck on "converting colors".

Screenshot_20220919_153220

MediaMoots commented 1 year ago

@ghost573

Yeah... maybe there's an issue with blender on Linux, or not, idk...

ghost commented 1 year ago

@MediaMoots I thought blender relies on python, it should be platform agnostic. I'm happy to help provide logs to fix this but I'm at a loss what the issue is.

MediaMoots commented 1 year ago

Yeah, but the color conversion process is HLSL code run in OpenGL through BGL. So, if BGL is bugged on Linux then there's not much I can do...

Very weird... does Blender 3.3 work?

ghost commented 1 year ago

I'm using v3.3 with results above. These issues started with v3.1, I don't know if something changed within blender but it doesn't seem to be fixed. Let me try the 3.4 alpha to see if anything changed.

ghost commented 1 year ago

Interesting error when using the plug-in on AMD, might fix the shader compilation issue on linux.

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/ayaneo/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-master/importing/importcolors.py", line 770, in execute
    convert_main_textures(lut_light)
  File "/home/ayaneo/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-master/importing/importcolors.py", line 501, in convert_main_textures
    image_to_KK(image, lut_light)
  File "/home/ayaneo/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-master/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/ayaneo/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-master/importing/importcolors.py", line 770, in execute
    convert_main_textures(lut_light)
  File "/home/ayaneo/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-master/importing/importcolors.py", line 501, in convert_main_textures
    image_to_KK(image, lut_light)
  File "/home/ayaneo/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-master/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/ayaneo/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-master/importing/importbuttons.py", line 114, in execute
    bpy.ops.kkb.importcolors('EXEC_DEFAULT'),
  File "/home/ayaneo/Documents/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/ayaneo/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-master/importing/importcolors.py", line 770, in execute
    convert_main_textures(lut_light)
  File "/home/ayaneo/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-master/importing/importcolors.py", line 501, in convert_main_textures
    image_to_KK(image, lut_light)
  File "/home/ayaneo/.config/blender/3.3/scripts/addons/KK-Blender-Porter-Pack-master/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
Scraft161 commented 1 year ago

any further progress on this? I'd love to see any sort of fix for this issue (whether it is in this project, or a hack on the system)

poisenbery commented 1 year ago

any further progress on this? I'd love to see any sort of fix for this issue (whether it is in this project, or a hack on the system)

What I'm about to say is the reason I don't use Linux anymore:

Linux users are expected to be able to troubleshoot and solve these issues on their own. There's a reason why Windows and Mac dominate the market: their users don't have to deal with stuff like this.

If you are a linux user, and you have to ask other people to solve issues like this, then you should not be using linux.

Scraft161 commented 1 year ago

I asked because I wanted to know the state of these things before potentially wasting hours digging for something that already has a somewhat known solution or hack. As far as progress on this problem I'm far from the only one (just check the issues for duplicates of this) and the first step in solving issues like these is looking for others who have encountered the same problem.

Linux users are expected to be able to troubleshoot and solve these issues on their own. There's a reason why Windows and Mac dominate the market: their users don't have to deal with stuff like this.

This isn't true anymore, especially if you look at the corporate world where Ubuntu and Red Hat Enterprise Linux dominate the server space because they can get support from canonical/red had if they need. On the desktop side there is also a large portion of the community that have spent their time solving issues like these (just look at how Linux gaming has progresses over the last 5 years). This statement was true at one point, I won't deny that, but you can't state this as if Linux didn't evolve since 2012.

If you are a linux user, and you have to ask other people to solve issues like this, then you should not be using linux. I don't recall asking others to solve the issue for me (especially regarding this issue which I mentioned in a duplicate and asked if there was anything noteworthy since the last comment). The most I did in trying to "ask other people to solve issues like this" was try and provide more info so we could get to what actually causes the issue and find a workaround (and maybe create a patch) for those less technically able.


But hey, at least I'm not the person that felt like I had to vent about something that is anything but helpful and frankly not related to the issue with the only contribution here being stating the fucking obvious.

Do you have python3 installed? Newer versions of blender only work with python3.

Which is entirely redundant as python3 is a required dependency of blender and is automatically installed with it on pretty much any distribution.

GitHub is a place to develop, not a place to call out projects because you think they're shit, there's other places for that which are far better at doing just that.

poisenbery commented 1 year ago

@Scraft161 Yo hey I didn't mean any offense. I tried investigating this on my System76 to no avail. I'm sorry I could not be of any help.

When I comment on stuff here, it's because I'm trying to investigate the problem. I'm not here to be rude to strangers, I'm here to solve problems that are within my capacity to solve.

Obviously, this is far beyond my capacity to solve, which is why I stopped posting here.

I made the observation that no developments had been made, which is why I said what I said. I hope that clears things up.

poisenbery commented 1 year ago

GitHub is a place to develop, not a place to call out projects because you think they're shit, there's other places for that which are far better at doing just that.

Your rhetoric is off topic and uncalled for. I help a lot with bugs here and I helped develop the shader groups that combine the normal maps. Please don't make things up about me. I help here. This is literally the only repo on github that I have ever made contributions to, and it's the sole reason I now know python and the shader panel in blender.

Scraft161 commented 1 year ago

@poisenberry I may have gone a bit overboard in my previous comment, I now realize this. when I glanced at your profile I only saw contributions to this repository, which lead me to believe (wrongly) that this account was some form of alternate for non-sfw or non-work related projects.

This didn't help the situation as the only response I got was along the lines of "nobody cares about linux so why should I" which isn't really an appropriate response to someone asking if there have been any developments at all since the last comment here.

I also am not too familiar with python (I can use it if I have to, but it rarely is the go-to tool for me), nor do I have any experience using blender from a programming perspective (I do linux system administration with the occasional side of recreational programming) so it's hard for me to gain proper insight in this plugin from a developer perspective, but from what I can gather it is an upstream issue with blender's OpenGL wrapper behaving differently than documented on linux (if so, this should be filed as an issue upstream and wait for them to finish this instead of not dealing with the problem altogether)

This is literally the only repo on github that I have ever made contributions to, and it's the sole reason I now know python and the shader panel in blender.

great job, and I hope you keep expanding your skillset if you want to do so (I definitely won't discourage you). I definitely went a bit overboard, but it was hard for me to interpret your response in another way due to the way it was phrased.

as for the actual issue at hand, to me it seems like an upstream problem with blender, and should be filed on their bug tracker (I don't know where that is nor do I have the technical know-how on how to provide relevant information on this myself, so I'm not going to try myself) so someone more involved with this project should definitely do so, and link to the issue here for easy reference.

and finally I do want to end this comment (and hopefully this saga) with an apology for that last part in my previous comment, it was uncalled for and I should honestly have left it out to begin with.

FlailingFog commented 1 year ago

Hooray, happy ending!

I tried this again today and the color conversion code is working on the flatpak of blender 3.3.1. I don't think it matters, but I went to importcolors.py file and changed...

You can check if the color conversion code is working by opening the “cf_m_hitomi00...” eye texture in the blender image editor and reloading the file (it should look desaturated after being reloaded).

The real issue is that the rest of the files for the clothes and hair are simply not being loaded in during import, making them appear white. I'm going to guess this will be an easy fix, so I'll look into it It turns out it was a / vs \ filepath issue. Everything looks like it loads correctly now

Scraft161 commented 1 year ago

ah yes, classic file path separator. it amazes me that this is still a thing we have to account for in 2022.

as for OpenGL, this is likely driver-dependant as OpenGL is implemented in the driver itself (WebGPU is coming to address this, but aside from rust and web assembly this is still quite far off for the time being) I'll try and see if I can run some things on the non-flatpak version for ensurance, but targeting flatpak for now is definitely the best option.

thanks for picking this up and solving it.

Scraft161 commented 1 year ago

in regard to my previous comment, can you push the commit with the file path changes?

FlailingFog commented 1 year ago

Yes, it should be in https://github.com/FlailingFog/KK-Blender-Porter-Pack/commit/02727b941db50efe4666f88dc4eb1d0084e1a613

Scraft161 commented 1 year ago

completely missed the lines when glossing over, probably should get my eyes checked ;P

poisenbery commented 1 year ago

@Scraft161 ayye it's cool. Really didn't mean any offense. I love anime girls and I was just trying to help ya get YOUR anime girls sooner rather than later

MediaMoots commented 1 year ago

Hooray, happy ending!

I tried this again today and the color conversion code is working on the flatpak of blender 3.3.1. I don't think it matters, but I went to importcolors.py file and changed...

  • instances of "texture2D" to "texture"
  • instances of "TRI_FAN" to "TRI_STRIP"
  • The a_position line under the two "TRI_FAN"s from this 'a_position': ((-1, -1), (1, -1), (1, 1), (-1, 1)) to this 'a_position': ((-1, -1), (1, -1), (1, 1), (-1, 1), (-1, -1))

You can check if the color conversion code is working by opening the “cf_m_hitomi00...” eye texture in the blender image editor and reloading the file (it should look desaturated after being reloaded).

The real issue is that the rest of the files for the clothes and hair are simply not being loaded in during import, making them appear white. ~I'm going to guess this will be an easy fix, so I'll look into it~ It turns out it was a / vs \ filepath issue. Everything looks like it loads correctly now

Very cool, thank you for the fix!

Scraft161 commented 1 year ago

just did a test and I can confirm that this fixed the issue here as well. I guess this issue is ready to close.