Highlights on visible part of alpha

Hi all

I’ve been working with Blender for less than a week and have soooo many questions but one at a time! My issue is that I am wrapping an png (with ‘invisible’ alpha areas) around a sphere and only want the highlights on the visible parts of the png. Here is a picture so you can see what I mean:

image|541x500

As you can see I am getting highlights on the green lines (which is what I want) but also getting highlights where there are no green lines, as if the lines are wrapped around a slightly misty glass that is only picked up when the light hits it strongly. Additionally, I was hoping the inside of the sphere would show green lines too, but there appear to be in blackest shadow. I imagine these two issues are related.

Blender is the most complex thing I’ve ever used, so if you can help - make it easy for me!!!

Many thanks :slight_smile:

Here is another image showing the reflections on the invisible part of the alpha, and a shadow being cast by the whole sphere instead of just the lines. Help!

I’m not sure whether you’re using EEVEE as a render engine or not. It doesn’t really matter, then same principals apply. You might be better giving your sphere a solid coloured shader of your choice. For the transparent areas create a transparent shader. Plug that and the solid colour shader into a Mix shader and plug a black and white image into the Fac slot for that. That will then control which parts of your sphere are displayed as solid and which parts are 100% transparent.

If using EEVEE then at the bottom of the material properties you’ll have to choose one of the Alpha variations for both Blend Mode and Shadow Mode.

Hi John
I’ve had a crack at that for a few hours. My problem is that I’m completely unfamiliar with Blender, the node editor and the terminology you use. I’ll do a few more tutorials to try to mentally adjust to the Blender environment and then come back to your instructions. It’s sooo complicated! Thanks for the screenshots btw - that is definitely the concept I’m after!
Lee:)

If you take a look on Youtube there are loads of videos covering the basics of things like the Shader Editor (although until 2.80 it was known as the Node Editor).

I probably made things sound more complicated than they had to be.

If the output of the Principled shader (labeled BSDF) was plugged straight into the input of the Material Output node (labeled Surface), the whole sphere would be green.

If the output of the Transparent shader (labeled BSDF) was plugged straight into the input of the Material Output node (labeled Surface), the whole sphere would be invisible.

Instead, each of these goes into another shader node first, the Mix shader. By default this would have nothing plugged into the node called Fac. There would be a number there: 0.5 and the sphere would be a mix of the two shaders - kinda green and partially transparent. If you changed this number to 0.0 it would again become fully transparent. If you changed it to 1.0 it would become fully green again. If you changed it to 0.9 it would become ever so slightly transparent.

The good part is that you can plug stuff into this Fac input which is image based. Anything black in the image you plug in is counted as 0.0, white is 1.0 and greys are ranged inbetween.

You already had an image you’d been using in your first example. All you would have to do is take that image into an image editor, change the transparent areas to be fully white and the rest to be fully black and save it out as a new image to plug into the Mix shader’s Fac input.

Got it now. Thanks! This is what used:


and Alpha Hashed in Blend Mode & Shadow mode in the Materials settings.

1 Like

Also, its worth noting that the principled bsdf is an uber shader. It has settings that can be used to recreate most of the other shaders for ease of use. You could plug the alpha from the texture into alpha input of the principled shader and get the same effect.