Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
134 stars 2 forks source link

Lit rim/fresnel materials. #2481

Open ModernBalloonie opened 2 months ago

ModernBalloonie commented 2 months ago

Is your feature request related to a problem? Please describe.

Currently, PBS Rim has some pretty cool effects you can do with it, but what I want to do with it is a sort of "fresnel transparency" effect. There's really no way to do this because fresnel/rim is always emissive, no matter what you do.

Here is an example of the type of effect I want, using Poiyomi toon shader as an example.

image

Describe the solution you'd like

A way to get a rim material to have a fresnel transparency mode.

Describe alternatives you've considered

Maybe a jank solution using toon shader matcaps? or using a camera to have another version of the model that's flattened out like a uv with non-recalculated blendshape normals, and having that sort of feed into the albedo to give it fresnel transparency (oh my god this idea is so weird. I don't even know if this would work lol.)

though really there are no viable alternatives for something like this.

Additional Context

Maybe this could be a thing related to when #1576 is done.

Requesters

modernballoonie

gameboycjp commented 2 months ago

If PBS Fresnel supports transparency, perhaps that could be used?

ModernBalloonie commented 2 months ago

If PBS Fresnel supports transparency, perhaps that could be used?

The problem is that the rim on PBS rim is always emissive, and you can't put an albedo texture on it.

There's no way to have the rim part act like an alpha on the material.

lxw404 commented 2 months ago

While I'd like to see this, I'd think with https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/654 we would get the ability to just use the output of a shader like basic Fresnel as a mask to blend two other materials so you can get this effect and many other complex ones.

gameboycjp commented 2 months ago

I must be remembering incorrectly. I swear I remember there being some kind of PBS Fresnel in the same vain as the unlit Fresnel. My apologies.