Hey guys, the game I am currently working on contains a lot of stone tiles. Now I want to paint moss on some parts of the floor to make it look overgrown and less repitative. For our last project we used Polybrushs Vertex Paint, but the new project is based on the new HD Render Pipeline in Unity 2018.3, so I cant use it there. Is there another plug in or technique I could use to paint textures (with normal maps) onto existing ones? Thanks for you help! This is what I want to archieve. This is what our scene looks like and where I want to add some moss.
You can still use PolyBrush vertex paint and the new HD Layered Lit shader (with vertex colors as layer mask) to achieve this.
Could you please describe how to do this in detail? I've tried to use poly brush on mesh with HDRP layered lit shader, but it does not work => error: "it doesn't look like any of the materials on this object support vertex colors!" (Unity 2018.3.0f2, PolyBrush 0.9.15)
@MS80 I guess that's because polybrush doesn't know that the HDRP layered shader can use the vertex colors. It didn't prevent me from painting on an object, and it worked with the HDRP/Layered Lit shader. Just don't forget to enable vertex colors in the material:
Hi @Remy_Unity - does vertex colour also work with Pro Builder in the HDRP? I've tried using the HDRP layered shader but applying colours doesn't seem to be having any effect. I'm not sure if I'm missing a step in the setup of the material though. Is there anything else which should be done other than setting the Vertex Color Mode to Multiply?
Vertex color is vertex color, there is no other magic trick here. If your mesh has vertex colors and you apply a layered material that should use it, it should work.
We could not use the HDRP/Layered Lit shader as posted above; it gave us issues when trying to paint colors by adding/multiplying it with the colors present on the layers of the shader. We got probuilder vertex colors palette and painter to work with HDRP pipeline. Using shadergraph 4.6.0 preview on Unity 2018.3.0f1, we replicated the original vertex color shader from probuilder that's based on the standard shader. The original probuilder shader for vertex color stuff for standard shader pipeline is here. It was our guideline for the PBR shader in shadergraph seen below. Code (CSharp): Shader "ProBuilder/Standard Vertex Color" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1)) = 0.0 } SubShader { Tags { "RenderType"="Opaque" } LOD 200 CGPROGRAM // Physically based Standard lighting model, and enable shadows on all light types #pragma surface surf Standard fullforwardshadows // Use shader model 3.0 target, to get nicer looking lighting #pragma target 3.0 sampler2D _MainTex; struct Input { float2 uv_MainTex; float4 vertexColor : COLOR; }; half _Glossiness; half _Metallic; fixed4 _Color; // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. // #pragma instancing_options assumeuniformscaling UNITY_INSTANCING_BUFFER_START(Props) // put more per-instance properties here UNITY_INSTANCING_BUFFER_END(Props) void surf (Input IN, inout SurfaceOutputStandard o) { // Albedo comes from a texture tinted by color fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color * IN.vertexColor; o.Albedo = c.rgb; // Metallic and smoothness come from slider variables o.Metallic = _Metallic; o.Smoothness = _Glossiness; o.Alpha = c.a; } ENDCG } FallBack "Standard" } Picture of the shader and probuilder in action in HDRP
@VirtualWorldArcade The layered lit shader in hdrp uses the vertex color for the layer blending, not for the global albedo like in your example.
@Remy_Unity Yes, this is true, which is unlike the original vertex color shader that probuilder uses by default. @ChaosResolution Until Probuilder updates the vertex color shader to support HDRP, the example shader graph can be used as a work around since it replicates the original shader.
Yeah, been running into this issue. I can convert each ProBuilder Material to an HDRP shader manually by copying the corresponding values over, but when I'm dealing with a large number of ProBuilder Materials it becomes super time intensive... surprised they don't have an HDRP version of ProBuilder stuff... really frustrating when you're trying to use ProBuilder with the FPS Sample project to create levels and everything is pink and won't convert automatically due to ProBuilder technically using "custom shaders."
i cant get the layered lit shader to work with layers.... i have vertex color on my model but the shader just shows the top layer. the vertex color is white with red paint.. i only used the red channel to paint.