Page 1 of 1

Facet/Low poly effect.

PostPosted: Sun Aug 06, 2017 4:39 pm
by SinglePixel.Soft
Hi, i'm making a game that i want it to have a low poly effect where the triangles are clearly visible, like Superhot. (the look, not the gameplay :P).
I know that i can remove the smoothing groups in Maya, or that i can make the mesh as "hard", but that would make the engine render each triangle by itself as far as i know, eating up resources.
Is there a way to make a custom shader that would tell the lighting in Unity to render each face flat? Without driving the calls up?
I'd hate to have to make a normal map for every single model that is faceted as it would really eat up most of my time, instead of spending it making a good game.

Re: Facet/Low poly effect.

PostPosted: Mon Aug 07, 2017 1:23 pm
by Ricardo Teixeira
SinglePixel.Soft wrote:Hi, i'm making a game that i want it to have a low poly effect where the triangles are clearly visible, like Superhot. (the look, not the gameplay :P).
I know that i can remove the smoothing groups in Maya, or that i can make the mesh as "hard", but that would make the engine render each triangle by itself as far as i know, eating up resources.
Is there a way to make a custom shader that would tell the lighting in Unity to render each face flat? Without driving the calls up?
I'd hate to have to make a normal map for every single model that is faceted as it would really eat up most of my time, instead of spending it making a good game.


Hello,

Thank you for your interest, we really appreciate it. It really depends on the actual shader that you intend to construct but we do offer a low poly water sample to get you started.

Be sure to let us know if you have any follow up questions, we would be happy to elaborate.

Thanks!

PS:Check your PM Inbox for an example.

Re: Facet/Low poly effect.

PostPosted: Mon Aug 07, 2017 1:55 pm
by SinglePixel.Soft
The low poly part of the water shader does what i was looking for, thanks.

Re: Facet/Low poly effect.

PostPosted: Mon Aug 07, 2017 2:21 pm
by Ricardo Teixeira
SinglePixel.Soft wrote:The low poly part of the water shader does what i was looking for, thanks.


Awesome ;)

Re: Facet/Low poly effect.

PostPosted: Sun Apr 08, 2018 7:24 am
by pacoCasares
facededNormalEffect.jpg
To anyone who wonders about this...
facededNormalEffect.jpg (40 KiB) Viewed 36818 times

Re: Facet/Low poly effect.

PostPosted: Mon Apr 09, 2018 10:44 am
by Amplify_Borba
Thanks for sharing!

The value for the Add node's B input might need to be tweaked according to your specific needs, the LowPolyWater sample serves as a great example for how you can use this node setup effectively.

Re: Facet/Low poly effect.

PostPosted: Sat Dec 08, 2018 3:11 am
by deadlycrow1
pacoCasares wrote:
facededNormalEffect.jpg


This solution doesn't work anymore i think, this is what i get:
Image

and this is how the material looks:

Image

any help? please?

Re: Facet/Low poly effect.

PostPosted: Tue Dec 11, 2018 3:34 pm
by Amplify_Borba
Hello, the solution is working as expected, you can confirm by looking into the LowPolyWater sample from which it was taken from.

This node tree is a simple method to make the edges display hard shading and, although it can be plugged into any shader's normal channel, it will likely require some further tweaking in order to make it work with other sorts of effects.

Re: Facet/Low poly effect.

PostPosted: Wed Feb 06, 2019 4:43 am
by RogDolos
I believe deadlycrow1 is correct and the example included is incorrect. I'm not a shader expert by any stretch but when that also didn't work for me, a bit of searching and it seems the DDY and DDX are reversed for left/right. Also before plugging into the normal map the world position should be translated to tangent.

This works much better:
Rog_FlatShading.jpg
Rog_FlatShading.jpg (35.73 KiB) Viewed 36229 times

Re: Facet/Low poly effect.

PostPosted: Sun Mar 17, 2019 4:00 am
by VinceHarada
RogDolos wrote:I believe deadlycrow1 is correct and the example included is incorrect. I'm not a shader expert by any stretch but when that also didn't work for me, a bit of searching and it seems the DDY and DDX are reversed for left/right. Also before plugging into the normal map the world position should be translated to tangent.

This works much better:
Rog_FlatShading.jpg


Thanks for the solution. :shock: