SakeTami
IanHubert
IanHubert

patreon


Transparent Shaders and Experiments

With special guest Nathan Vegdahl!

Here's a link to the shimmering harbor assets I was using.

Also related: Refractions and Heat Shimmers

And the OSL series from CG Matter! It was absolutely fantastic (even if it turns out OSL isn't exactly what I thought it was)

ALSO ALSO- I was wrong in the video, it's not a special build of blender (I thought I had to use one at first)- it's just Blender 4.0 alpha version, which includes the viewport compositing! 

Transparent Shaders and Experiments

Comments

Great tut! I was working on a scene lately were I wanted the main lightsources to be these office-type lamps, with a rough plastic cover infront. I did quite some testing with the material and light interaction - this is so far the most performance (and visual accuracy) I could get out: Using a princibled BSDF. Setting transmission to 1 and roughness to your liking. Set a bit of emission with a gradient that simulates the light falloff on each sides. (this is purely visual choice, but helps to sell the effect alot!) Than stick an area light inside the panel (this being the lamp). You can use nodes on lights. Do that by ticking the "use nodes" box in the shader editor, with the lightsource selected. It will create an emission shader for you which you can tweak. Take the same gradient from the princibles BSDF. I tried it with disabling the shadow-checkbox in visibility settings. It didnt change the performance. I tried plugging the princibled into a mix shader with a transparent shader, as the factor use the "shadow ray" from light-path node, it didnt change the performance. So it seems princibled is the way to go, for this type of situation. There is probably some weird magic going on in the background. Tested both in a greyish and a dark world light situation. Looks great, performs great! EDIT: Some extra notes Introducing any kind of normal map or roughness will increase render time. If you need to do that make sure to also dissable "diffuse" and "transmission" in the visibility settings. Increase the emission strength of the princibled to make it look as it was before. I am running that setup myself now.

R K

see, the process was good. Thanks Ian for extending the video. it is actually quite helpful to see people work through problems. and the way you caught it with commentary and your discussion with Nathan helps to bring everyone along and feel like they're in the learning process, which is far more enjoyable when it has a social/human element. it makes me want to go mess around and tell peers about the weird tests and results we make.

Stephan

Only just watching this now. You can use vectors into color inputs to set negative-valued colors on shader nodes. A vector Add with (-1,-1,-1) + (0,0,0) going into a Transparent, which is then being Add Shadered with a white Emission will invert the color of what is behind it. Edit: this does not solve the screen problem in the shader since you can't multiply shader outputs, but it is possible to make linear combinations of shaded information!

Cole Smith

By the way, Ian. When you showed the darkening bit to blend your video projection into the environment, it got me thinking about the ambient occlusion node. Could you multiply that over the video texture to automatically get some darkening against other 3D geometry?

Robin Ruud

Super handy trick! I never thought to use transparent shaders like this, but it really works! I love the ways you bring traditionally comp-level stuff to the 3D workspace.

Robin Ruud

Yeah that was perfectly entertaining and informative! See, no reason to go short on the run time I'd watch for much longer, through it all in :)

Tyler Adams

For thin glass change the IOR to 1.0 for more realistic diffraction. It also reduces your render time.

In Unity's Shader Graph it has a OneMinus node for this very use. :D I've been battling with this same issue in Unity for the past three years. My creative director wanted me to basically recreate Photoshop blend modes in Unity but with live webcams and multiple layers of video. I achieved it (finally!) this year. I created a single (massive) shader that would take the output from a camera and apply a blend mode to it then pass that image onto the next layer.

Mark Phillips


More Creators