Search Unity

Polybrush - Object black when trying Texture paint

Discussion in 'Formats & External Tools' started by nicmarxp, Apr 5, 2018.

  1. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    Hi,
    I'm trying to use Polybrush 0.9.14b0 with Unit 2017.4.0f1, and want to paint a texture on a mesh.
    I added textures and use the Shader Polybrush > Texture blend (mobile), but it's all black and I can't paint. Why? Here's what it looks like:

     
  2. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    Okay: Looking at it, I would say there's a possibility, that the objects
    normals, need to be flipped or corrected.

    Then again, it could be that some graphics option, or alpha option
    has probably been disabled.

    Or, if the object was imported, from another 3d software, it's possible that
    some import/export option, was disabled or enabled.

    There's a slight possibility, that it could be a combination, of the
    two or three problems, I stated above. Or probably, something I forgot about.

    Okay: Here's what to do.
    Try and flip the normals and see what happens from there.

    Or, put the model in another 3d application like blender, put the object in edit mode, select all of the vertices, and choose the option to flip the normals. Hopefully, it works.
     
    Last edited: May 24, 2020
  3. grit

    grit

    Joined:
    Nov 12, 2013
    Posts:
    14
    Hello there,
    I have the same problem, also with the Polybrush/Standard Texture Blend Shader and the Polybrush/Diffuse Vertex Color Shader. I tried it on planes created inside Unity and on different ProBuilder Meshes. They just turn black. I am on Unitiy 2017.4.1f1 (Personal) and Polybrush 0.9.13b0 on an iMac Mac OS 10.13.4 (AMD Radeon GFX card).

    I also see error messages in the console:

    Mesh.colors is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
    UnityEngine.Mesh:set_colors32(Color32[])
    Polybrush.z_Mesh:ApplyAttributesToUnityMesh(Mesh, z_MeshChannel) (at Assets/ProCore/Polybrush/Code/Scripts/Type/z_Mesh.cs:163)
    Polybrush.z_EditableObject:ApplyMeshAttributes(z_MeshChannel) (at Assets/ProCore/Polybrush/Code/Editor/Classes/z_EditableObject.cs:441)
    Polybrush.z_BrushModePaint:OnBrushMove(z_BrushTarget, z_BrushSettings) (at Assets/ProCore/Polybrush/Code/Editor/Brush Modes/z_BrushModePaint.cs:298)
    Polybrush.z_Editor:OnBrushMove() (at Assets/ProCore/Polybrush/Code/Editor/Interface/z_Editor.cs:930)
    Polybrush.z_Editor:UpdateBrush(Vector2, Boolean) (at Assets/ProCore/Polybrush/Code/Editor/Interface/z_Editor.cs:781)
    Polybrush.z_Editor:OnSceneGUI(SceneView) (at Assets/ProCore/Polybrush/Code/Editor/Interface/z_Editor.cs:589)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)



    Does anyone have an idea how to solve this?


    PS: The silly smiley there = : P
     
    peanutgallery likes this.
  4. code749

    code749

    Joined:
    Jan 17, 2009
    Posts:
    100
    did you manage to resolve this?
    I am getting the same issues with the models create within unity
     
  5. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    Were you able to solve it?
     
    Rabee_Kiblawi likes this.
  6. inchgames

    inchgames

    Joined:
    Jul 8, 2018
    Posts:
    8
    Guys this helped me
    https://forum.unity.com/threads/why-are-polybrush-shaders-all-black.684574/
    Might be that you're using 'Metal Editor Support'. In my case i solved it by adding the keyword 'metal' to the '#pragma only_renderers' on lines 42, 223 and 363 of the Polybrush Standard texture blend with bump shader. like this:

    #pragma only_renderers d3d9 d3d11 glcore gles n3ds wiiu metal
     
    mike6502 likes this.