Closed ghost closed 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?
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
@ghost573
Do you have python3 installed? Newer versions of blender only work with python3.
Do you have python3 installed? Newer versions of blender only work with python3.
Yep, v3.10.5-1.
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.
@ghost573
Just checking, is this fixed?
@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".
@ghost573
Yeah... maybe there's an issue with blender on Linux, or not, idk...
@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.
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?
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.
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
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)
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.
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.
@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.
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.
@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.
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...
'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
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.
in regard to my previous comment, can you push the commit with the file path changes?
completely missed the lines when glossing over, probably should get my eyes checked ;P
@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
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!
just did a test and I can confirm that this fixed the issue here as well. I guess this issue is ready to close.
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
649eb4e