Search Unity

[Polybrush] Texture painting does not work on any channels except vertex color.

Discussion in 'World Building' started by PuckLovesGames, Aug 21, 2020.

  1. PuckLovesGames

    PuckLovesGames

    Joined:
    Mar 4, 2015
    Posts:
    15
    I cannot get Polybrush Texture painting to work with any other channels except for Vertex Color, which I'd like to reserve for colour tinting. I've tried it with all the UV channels and vertex tangents, but attempting to configure and save the Material settings causes a KeyNotFoundException on line 101 of SplatSet.cs

                var channelWeights = weights[channelMap[channel]];


    It does seem to correctly write to the shader meta userData, but the configuration dialogue does not finish.

    And then attempting to paint on the mesh causes the console filling up with NullReferenceException errors as the brush hovers over the geometry, on line 671 of BrushModeTexture.cs

                splat_current.LerpWeights(splat_cache, invert ? splat_erase : splat_target, mask, weights);


    This is with Polybrush 1.0.2 on Unity 2019.4.6f1.

    It breaks when I attempt it with custom meshes and also with standard Unity primitives (likes spheres and planes). I'm using a custom shader, because the sample shaders for the standard pipeline only include a Texture splat shader that uses Vertex Colours. There are no included examples that use the other channels.

    It works fine if I stick to only using Vertex Color. But I need to use the other available channels.
     
  2. suppertbw

    suppertbw

    Joined:
    Mar 16, 2016
    Posts:
    7
    I met this issue as well, any help?
     
  3. suppertbw

    suppertbw

    Joined:
    Mar 16, 2016
    Posts:
    7
    Actually I update to version 1.1.2 and c# errors are gone, however, I still can't use other channels to blend more textures.
     
  4. suppertbw

    suppertbw

    Joined:
    Mar 16, 2016
    Posts:
    7
    All right, multiple textures blending is working, only for custom shader and surface shader isn't
     
unityunity