crest icon indicating copy to clipboard operation
crest copied to clipboard

Question: how to achieve a stylized look

Open taylank opened this issue 5 years ago • 16 comments

Sorry if this is not the right place to pose this question, I could not find a Unity forum for Crest. I'm wondering what my options are if I want to use Crest within a cel shaded or flat shaded art style. Post-process edge detection does not work well as it does not seem able to detect wave forms; all I get are flat rectangles on the ocean surface. Since Crest has its own shaders, a shader based option would have to modify the those I assume?

Has anyone achieved any success along those lines?

taylank avatar May 23 '19 16:05 taylank

There's a branch with some minor changes to the ocean shader which allows you to customise the falloff of the fresnel (how reflective the water's surface is). It can be seen here: https://github.com/huwb/crest-oceanrender/tree/feature/stylised-fresnel

We're using it in our project with good results. While our game isn't exactly cel-shaded, it's still rather stylised, and it fits together well.

image

This is the fresnel falloff ramp we're using at the moment to achieve this look:

image

Combined with a strong foam-sim with a rapid falloff, it gives a nicely stylised look.

Midda-C avatar May 24 '19 01:05 Midda-C

Thanks @Midda-C . I tried that and it rather killed my frame rate; it's almost half of what it was using the main branch. Is that your experience as well or does it mean something's not right?

taylank avatar May 24 '19 03:05 taylank

That sounds like something's not right, I don't expect it should really have any noticeable impact on the framerate one way or the other. I actually just took the changes to the fresnel section of the ocean shader and applied it to our local file, you should be able to do the same.

I believe that branch is quite old, so it might be better to just take the latest Crest from main and merge in that modification. The changes are pretty minor, and even I was able to do it with my near-zero coding experience by just looking at the diff here: https://github.com/huwb/crest-oceanrender/commit/827f7fafdcef147c38ef8b40689c7183f791520e

Midda-C avatar May 24 '19 03:05 Midda-C

Alright that does look better, thanks! By the way, are you using the Light Weight Render Pipeline? Or do you know if the fresnel ramp works with LWRP?

taylank avatar May 24 '19 20:05 taylank

Nah, we're just using the built-in render pipeline. SRP didn't exist when we started our project, unfortunately.

I haven't looked at the LWRP version of Crest at all, but I assume it'll slot into the shader fairly easily. That's more of a question for @huwb, though.

Midda-C avatar May 25 '19 03:05 Midda-C

yeah right now its only in the github version. @taylank do you want it in the lwrp version?

huwb avatar May 25 '19 15:05 huwb

@huwb I was on the fence on buying the LWRP version, but yeah, knowing I can have this feature in lwrp would definitely make it an easier decision.

taylank avatar May 25 '19 20:05 taylank

This looks amazing, thanks!

hedgefield avatar Jun 10 '19 09:06 hedgefield

Unfortunately we won't be able to support this in LWRP / URP, at least not by default. We are going down a shadergraph style route, so that ultimately people will be able to easily modify/extend the ocean material graph. A constraint with this is that we don't automatically have control over reflection to stylize it in the way this issue suggests. There might be a route to doing it but i thought I'd post this note with my current/best knowledge about it.

huwb avatar Jan 11 '20 16:01 huwb

What would be the recommended settings to achieve close to this look in the URP version of Crest if the above modification is not possible?

transat avatar Mar 04 '20 12:03 transat

Would like to know aswell !

Jeanseb05 avatar Mar 06 '20 04:03 Jeanseb05

This feature still works @huwb Any chance it could be integrated?

transat avatar Aug 24 '20 00:08 transat

Integrated into the built in RP do you mean?

huwb avatar Sep 01 '20 07:09 huwb

I meant integrated Into the URP ocean shader. I've had to modify the URP ocean shader after Crest updates to re-enable the custom fresnel falloff ramp.

transat avatar Sep 01 '20 08:09 transat

+1 on integrating it into URP. I am building a stylized environmnet using Crest and have been contemplating switching to a different water solution. Having this added would be very nice. 2020-09-20_Added_Atmospheric_Height_Fog_for_Stylized_Night_Mist_and_Ocean_Glow

Zesix avatar Oct 26 '20 20:10 Zesix

There is light at the end of the tunnel - on the very latest version of Unity it seems like we may be able to ship the ocean shader as a shadergraph, which would enable easy customisation. I will follow up later when there is news.

huwb avatar May 01 '21 12:05 huwb