Fresnel transparency with Strumpy Shader Editor

Hi,

Trying to get into and understand shaders, but struggling as it’s a whole new area for me.
I’m using the Strumpy Shader Editor and want to create a fresnel-based transparent shader for a sphere.
But I can’t seem to get alpha to work at all, no matter what I plug into it or what settings I use.
I would have thought that if you plugged in a color to the alpha section, that sliding the color between black and white would make the entire shader transparent/opaque, but even that doesn’t seem to work. I’m very confused.
Here is the kind of thing I’m looking for:

The black in the centre is transparent. Here is the graph I am trying to use:

Anyone any idea how to do this?
Some basic information about how to get the alpha working in SSE would be great! The documentation is kinda sparse on details for those who are new to shaders.

Thank you!

Play around with the Settings > Queue Settings in SSE. I just trial-and-errored through that section. Render Type and Render Queue “Transparent” seems to do the trick :stuck_out_tongue:

Transparency has never worked in SSE for me either.

No matter what I plug in, makes no difference. Even the alpha channel from a texture plugged directly into the Alpha property, with the Render Type and Queue set to Transparent or Cutout.

No difference.

Well…
I discovered that by setting Render Type and Render Queue to transparency, and Blend Type to Custom with SrcBlendMode set to SrcAlpha, whatever is fed into the Alpha section does start coming through (at last), but it doesn’t actually make the black areas transparent, it just makes them black:

If the alpha was working like I want it, the black area of the sphere would be completely invisible.
Not sure what to tweak to make this work…

Has anyone got alpha working properly in SSE?!

Does it work with Blend Type DecalBlend?
Attached is a simple transparent shader .graph with multiplied color. Use a Texture with alpha channel on the main texture slot and it should work.

724481–26313–$TestTransparent.zip (1.77 KB)

you can get the same (or very similar) effect as in your first screenshot with simple rim shader w/ 1 - rim value as the alpha. the non-transparent rim shader code is here: Unity - Manual: Surface Shader examples

though this requires copy pasting code instead of dragging around graph nodes…

Hi woodn. I brought the TestTransparent shader into SSE, and it didn’t work. In the SSE preview window, the areas that I expected to turn stay opaque went white, and the transparent areas remained the same as the color (or texture) that was attached to the diffuse node.

Has anyone else run into this? Am I doing something wrong?

EDIT: OK, found it. It’s in the Settings > Blending Settings. Custom SrcAlpha OneMinusSrcAlpha

New question about Fresnel. I have a material much like what is being originally described here by kinkersnick. When I apply it to a sphere, it looks great. However, when I apply it to an imported mesh, it looks like it has strange seams all over it that follow the edges of certain faces. Any idea why this might be happening? Do you have to model an object in a specific way for Fresnel to work?

Can you post a screenshot?

Yeah, here you go. There are two copies, and one is selected so that you can see how it follows the underlying geometry:

Now, if I didn’t know better, I’d think it was an issue with normals, with some pointing inward and some going out, but I checked that, and all face normals are as they should be.

It does seem to follow the pattern of the triangulation, though. Have you tried generating normals instead of importing them?

When I let Unity calculate the normals, there is virtually no change, except for a few faces near the top that change a bit (the “seams” change).

Is the bulb UV mapped in any meaningful way? Looks like this could be a tangents issue.

Actually, it’s not UV mapped at all. I assumed that because no texture was being applied, that UV mapping would be unnecessary. I’ll see what happens if I map it.

EDIT: Yep, that was it! It needed UVs. Thanks!

How would tangents affect normals without a normal map?

@daniel - it did the trick didn’t it? :wink:

Apparently. Do you know why?