Closed yboettcher closed 4 years ago
It seems like the compile issues with the bump node have gone away. However it also seems like some textures (like magic) are still being ignored. If I connect the fac output of a magic texture, this appears in the resulting shader:
float MagicTexture_Fac_res = tex_magic_f(bposition * 13.399999618530273 * 4.0);
vec3 Bump_001_Normal_res = n;
basecol = Bump_001_Normal_res;
Yes, it creates the magic texture... but it does not use it.
Also it seems like none of the color outputs work. For example, if I use the fac output of a noise texture I can see the result in armory so it seems to be working. If I use the color output, I can't see any of it. Once again the noise texture is created but remains unused in the shader.
vec3 NoiseTexture_Color_res = vec3(tex_noise(bposition * 5.045670032501221), tex_noise(bposition * 5.045670032501221 + 0.33), tex_noise(bposition * 5.045670032501221 + 0.66));
vec3 Bump_001_Normal_res = n;
basecol = Bump_001_Normal_res;
While trying around with some material Library, I noticed that some of them would fail to even compile with Armory. Looking for the cause of this issue I found that using the Bump node's height input with procedural textures was one of the problematic situations. (it seems like there was an issue about this node about a year ago, but it seems like it was about image textures: https://github.com/armory3d/armory/issues/322) Trying out most of the procedural textures, I found out that you can plug the color output of any of the textures into the height input and the game will compile and run. But it does not use the texture at all... If you try to use the Fac output, it will still compile for most of the nodes (you still don't see any texture in Armory), but fail at compiling for the Noise Texture and the Checker Texture.
This is my example setup I used for testing:
If I use the Color Output of any Texture (Brick in this case) I can see it in Cycles, but it does not appear in Armory The same happens when using the Fac output. Shader: Material_mesh.frag.glsl Looking at line 34/35, one can see that it does create the BrickTexture... but then uses the
n
variable and never touches the texture again. This seems to be caused by thesample_bump_res
variable in the cycles.py file being empty (It also seems like the distance input is not used...)If I use use the Fac output of either the Noise or Checker Texture, the compilation fails with this output:
I guess the most interesting line is the first one starting with
ERROR
, which points at line 37, so here is the generated shader file Material_mesh.frag.glsl Line 37:Yeah, this does not look right. Adding a vec3 and a vec2... It seems to be generated inside the
write_bump
method of the cycles.py file.For the Checker texture the error is the same but pointing to line 35:
once again trying to add vec3 and vec2.