Using the Toon shader for a terrain object

Node-based Shader Editor

Using the Toon shader for a terrain object

Postby jojue » Fri Mar 08, 2019 3:45 pm

Hi everyone,

I'm trying to use a toon shader, which is basically the CustomOutlineToon from the examples folder, on a terrain.

To prepare the shader I was following the tutorial posted here:
http://wiki.amplify.pt/index.php?title= ... in_Shaders

Sadly this was not working, as I could not paint any textures using the brush tool on the terrain. Even when plugging the "Four Splats First Pass Terrain" directly in the Albedo Output it was not working.

However when changing the Light model of the output node to 'standard' instead of 'custom lighting' you could paint textures right away, but loose the toon effect, which is not desired.

I hope somebody on this forum can point me in the right direction :)
jojue
 
Posts: 5
Joined: Fri Mar 08, 2019 3:30 pm

Re: Using the Toon shader for a terrain object

Postby Amplify_Borba » Fri Mar 08, 2019 5:38 pm

Hello, thank you for getting in touch and for your support!

Could you share a sample of what you've build so far, along with an example or reference of the final effect that you're looking for?
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Using the Toon shader for a terrain object

Postby jojue » Fri Mar 08, 2019 8:00 pm

Hi, thanks for the fast response. So I basically took the CustomOutlineToon and tweaked some minor inputs.
I want to use that shader for the unity terrain object so that i can paint splatmaps on the toon shader.

If I add the shader to the custom material slot of the terrain I can see the shader working, but the texture painting is not working. Here are two examples of how i want it to look like, with the possibility of using the texture brush on the terrain

terrain2.jpg
terrain2.jpg (179.06 KiB) Viewed 3115 times



like I said if I switch the Light model of the output node to 'standard' instead of 'custom lighting' it seems to be working, but it looses the toon look. In the attached files you find my modified shader
Last edited by jojue on Tue Apr 09, 2019 2:26 pm, edited 1 time in total.
jojue
 
Posts: 5
Joined: Fri Mar 08, 2019 3:30 pm

Re: Using the Toon shader for a terrain object

Postby jojue » Sat Mar 09, 2019 9:39 pm

Hi,

after hooking up the 'four splats first pass terrain' node to the custom lighting slot of the output node the shader now is working like intended. Seems pretty obvious now in retrospect :roll:

I also inserted the normals through the 'four splats first pass terrain' node, but now I have the problem that I can't control the intensity scale of the normal map through the terrain layer options.

Is there a way to control the normal scale through the terrain layers menu? I tried lookin it up in the SimpeTerrain Example, but it didn't seem to work there either.

terrainNormal.jpg
terrainNormal.jpg (235.04 KiB) Viewed 3106 times
jojue
 
Posts: 5
Joined: Fri Mar 08, 2019 3:30 pm

Re: Using the Toon shader for a terrain object

Postby Amplify_Borba » Tue Mar 12, 2019 11:25 am

I don't think that this is possible, you'll likely have to do so through the material as in the SimpleWater shader of the SimpleTerrain sample.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests

cron