True alpha transparency in textures / materials please

Started by sethcshort, May 27, 2016, 12:47:47 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

sethcshort

Hi,

Please make it so the transparency of a texture carries through to the overall alpha of the render. EG if I have something that uses the transparency channel in the material, the transparent areas of the material should carry through to the alpha channel of the image, rather than being filled with the background color/image.

Without this feature, it's impossible to do real compositing. The work-arounds we're forced to use require a lot of extra time, and result in a less-than-satisfactory image that has to be tweaked and edited by hand.

Thanks!

bdesign

Hey sethcshort-

I developed a workaround for this a while back, achievable directly within KeyShot, which is quite simple and painless...here is a link to the forum thread (it's near the bottom of the page). I hope this might help you.

Eric

https://www.keyshot.com/forum/index.php?topic=9952.0

sethcshort

Hi Eric,

Thanks for the tip. If I was using a bitmap texture map, I could see your workaround being quite useful. However, in the example I'm showing, opacity is a procedural map that's a gradient driven by view direction. This lets me get the center of the bones to be transparent while leaving the edges opaque, at any angle. I don't think your workaround will help in this instance, since I'm using a procedural effect instead of a texture map. (See attachment)

As it is, I'm stuck having to create another material and render a black and white pass to use as a mask in Photoshop, which still isn't ideal because edges and blending require all sorts of touch up work by hand, to the point where it might just be easier to render everything opaque and hand-draw the transparent areas. Not ideal if there are a lot of different angles to be rendered.

I realize that not every user is needing something like this... but it was a real surprise when I realized what was happening. This feels like basic functionality that's missing from this beautiful renderer.

Seth

bdesign

Hey Seth-

This technique works equally well with procedurals and bitmaps. The circular mesh texture in the Opacity channel of my original example is actually a KeyShot procedural texture (Mesh (Circular)). Here is a quick render using the Color Gradient procedural.

Eric

sethcshort

So if I use labels instead of straight textures, it will work as expected? That's great to know, thanks! I'll try this for now.

Still, I think the original issue should be addressed at some point. :)

Finema

Hi
Have you try to add your diffuse texture in opacity channel ?

sethcshort

#6
Using the Diffuse in the Opacity channel won't work in my example, as my diffuse is a bone texture and I want the opacity to change based on camera angle (procedural).

I tried using the Label trick, but it's not working for me. Perhaps because I'm not using an Emissive texture, but Plastic. What appears to happen is that the label's transparency reveals the base gray color of the plastic material, instead of making the material transparent.

I tried using and Emissive material, but it flattens the bones and removes their shading and highlights, so won't work for my needs. Also it's not transparent.

Attached are the results.

bdesign

Seth-

The Emissive material is the key to making this technique work. Just apply your Plastic bone material as a label to an Emissive material with all of the options unchecked. Just as in the Material Graph network example in my previous post above. And when rendering, make sure to to check the "Include Alpha (Transparency)" option.

Eric

sethcshort

@Finema, I think if you pull your render into photoshop, you'll realize that it's not truly transparent. It retains the background color in the silhouette of the "transparent" object, even when you're rendering with transparency turned on.

I tested this using a texture map with an alpha channel, the results are attached. Identical to what I've been experiencing with the procedural texture.

It's quite disappointing.

Seth

bdesign

Seth-

Have you tried exactly what I described to do? Please read my previous post. If you set it up correctly, it will work!

Eric

bdesign

You need to UNCHECK all of the Emissive material options (Visible To Camera, Visible In Reflections...etc.)!

Eric

sethcshort

#11
Huzzah!

Okay, now I see what I was missing. Thanks for persisting on that.

It's working now.

Essentially what we're doing is bypassing the main texture renderer (that's broken), making it invisible, and using the Label texture renderer, that works properly.

Thanks Eric! High five!

(I still think they need to fix it so the main materials act properly, though.)

sethcshort

Looking back through the post you linked, Eric, I realized that I completely misread what you were suggesting. I skimmed it too quickly and missed the important parts. Sorry about that! Thanks for your patience.

Seth

bdesign

You're welcome, Seth. Glad to help. Persistence is key! :) Good luck with your project.

Eric

sethcshort

One last note. You might have noticed in my last render a slight purple cast to the texture. It seems that, even with all the boxes unchecked, a tiny bit of the main texture is still being rendered. So I folded the texture map back into the diffuse channel on the main texture, and all is well now.

Thanks again!