color not same albedo vs debug

Node-based Shader Editor

color not same albedo vs debug

Postby RMarch » Mon Jul 02, 2018 2:24 am

I just purchased Amplify and have created some amazing effect. I am having what I think is an incredibly simple task that is not working as expected.

When I attach a color to albedo the color output on the object in the game in Unity is not exactly the same. However, if I plug the output into debug the color in game is as expected (identical to the color selector. You can see this in the screenshot below where I am trying to lerp between two colors. The color input into B (with the alpha set to 1) is not the same color in the lerp preview. This, when plugged into albedo, is the same color shown in the game. When I take the exact same setup and plug the output into debug the lerp preview is still an odd color, but the color in game is exactly the original color.

Amplify.jpeg
Amplify.jpeg (220.88 KiB) Viewed 1778 times


I could use debug I suppose, but I want to understand what is going on here as I assume this is a simple misunderstanding and I would like to get it working correctly without using debug. I am not even sure what debug is doing although the documentation seems to imply it overrides all other settings.

Thanks
RMarch
 
Posts: 3
Joined: Mon Jul 02, 2018 2:05 am

Re: color not same albedo vs debug

Postby Amplify_Borba » Mon Jul 02, 2018 10:48 am

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

You did raise an interesting question, we've just updated the Debug port information in our Wiki manual to clarify a point that we've actually missed out, which is the fact that the debug does not take lighting into account, which is why the color is exactly the same as in the Color node.

Also, since our node previews are in fact textures, they will be affected by the Color Space you've set up for the project, which can result in the preview having a somewhat different result than expected.

Please let me know if this helps, and if you have any further questions, thanks!
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: color not same albedo vs debug

Postby RMarch » Tue Jul 03, 2018 2:17 am

Your feedback sent me in the right direction. First off, I did not notice the shader was unlit (as you said it would be) when connected to debug. This would not work for me as my scene is lit and the surface needs to change based on the time of day lighting in the game.

But I then looked into the colourspace of my project. It was set to Gamma and when I switched it to linear, it all started working as expected, including displaying the correct color in the preview panes. Interesting how that is impacted from the project settings. See the same screenshot with no other changes other than setting the project colourspace to linear...

Amplify 2.jpeg
Amplify 2.jpeg (216.68 KiB) Viewed 1763 times


If you look at the green color in preview in Lerp, it is now identical to the green color selector. In my original post, you can see that the color is a completely different shade of green. This color shift was reflected in the game even when the lighting was only a single basic directional light set to white. For me, it was no problem to run linear as I am targeting iOS devices v8 / 64 bit (i.e. iPhone 5s and above) and I have not seen any performance issue with linear color space.
RMarch
 
Posts: 3
Joined: Mon Jul 02, 2018 2:05 am

Re: color not same albedo vs debug

Postby RMarch » Tue Jul 03, 2018 2:20 am

Just a quick clarification for future people reading this post. My second screen shot has a slightly different shade of dark green and a different A input color (Red v Black), but the point is still the same. With colorsapce set to linear, the colors match exactly, while when set to gamma they change significantly (regardless of lighting setup in the project).
RMarch
 
Posts: 3
Joined: Mon Jul 02, 2018 2:05 am

Re: color not same albedo vs debug

Postby Amplify_Borba » Tue Jul 03, 2018 8:19 am

Thank you for getting back to us and for sharing your clarification with the community, we're glad we were able to help!

Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, the Unity Asset Store thrives on user interaction and direct feedback.
Every bit helps, your feedback is extremely valuable to us!

Feel free to get back in touch if you have further issues or questions, thanks!
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 45 guests