Equivalent to ShaderForge "Diffuse Ambient Light"

Node-based Shader Editor

Equivalent to ShaderForge "Diffuse Ambient Light"

Postby Monobanda » Mon Oct 01, 2018 12:23 pm

Hello ASE masters,

I am struggling to create a shader in ASE where I can add a layer of ambient, overall color/light on top of the shader.
In ShaderForge, this was simply called "Diffuse Ambient Light", but it seems there is no straight-away equivalent in ASE.

Is there any way I can achieve this?

Image
(PS for some reason I cannot add images properly, so right-click and open in new tab)
Monobanda
 
Posts: 7
Joined: Mon Jul 02, 2018 2:55 pm

Re: Equivalent to ShaderForge "Diffuse Ambient Light"

Postby Ricardo Teixeira » Mon Oct 01, 2018 12:47 pm

Monobanda wrote:Hello ASE masters,
I am struggling to create a shader in ASE where I can add a layer of ambient, overall color/light on top of the shader.
In ShaderForge, this was simply called "Diffuse Ambient Light", but it seems there is no straight-away equivalent in ASE.
Is there any way I can achieve this?
Image
(PS for some reason I cannot add images properly, so right-click and open in new tab)


Greetings,

In ASE you'll have to create your own Custom Lighting layout, the "Diffuse Ambient Light" is a specific Shader Forge implementation.

* Use the Custom Light Shader Model to access Lighting specific nodes.
* Examine the included samples.
* You'll need to use the Indirect Diffuse Light Node to access Unity's ambient value; how you manipulate it is entirely up to you - a simple multiplication should do it.

Let me know if you have any additional questions.
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Equivalent to ShaderForge "Diffuse Ambient Light"

Postby Monobanda » Mon Oct 01, 2018 1:34 pm

Hi,

Thank you for your reply.
It seems that I am missing something very obvious here, because it's not working yet.

1. I changed the light model to "Custom Lighting".
2. I added the "Indirect Diffuse Light" node and plugged it into "Custom Lighting".
3. In the "Normal" input of the node, I plugged in a colour.
4. I made the colour light grey.

As far as I'm concerned, it should work without any external lighting, correct? The point is that the colour shows up without any lights in the scene.

What am I missing here?
Monobanda
 
Posts: 7
Joined: Mon Jul 02, 2018 2:55 pm

Re: Equivalent to ShaderForge "Diffuse Ambient Light"

Postby Ricardo Teixeira » Mon Oct 01, 2018 4:55 pm

Monobanda wrote:Hi,

Thank you for your reply.
It seems that I am missing something very obvious here, because it's not working yet.

1. I changed the light model to "Custom Lighting".
2. I added the "Indirect Diffuse Light" node and plugged it into "Custom Lighting".
3. In the "Normal" input of the node, I plugged in a colour.
4. I made the colour light grey.

As far as I'm concerned, it should work without any external lighting, correct? The point is that the colour shows up without any lights in the scene.

What am I missing here?


Hey there,

Don't plug a color node into the normal input, that's only if you want to add your normal texture to the calculation(or related effects). As I mentioned, I'm afraid our Custom Lighting mode works a bit differently in the sense that you can create other types of lighting, you're not limited to a specific set as presented by shader forge.

You have two options:
1- Use the Standard Surface Light node for added ease of use. (tint it by multiplying your output by a color node)
2. Create your own Lighting setup, the sample "CustomLightingToon" is a great place to start. Notice the Attenuation and Ambient Box, you can manipulate the ambient contribution directly.

In this example, I added a Multiply node along with a Color node for tint and a Float to control its intensity.

Image

A warning, note that simply plugging colors into the custom lighting input will also not give you similar results, you have to handle light information using the provided nodes under the Light category.
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 22 guests