KeyShot Forum

Technical discussions => Rendering => Topic started by: number12 on March 26, 2013, 04:51:46 PM

Title: Glass alpha channels
Post by: number12 on March 26, 2013, 04:51:46 PM
Hi Guys,

just wondering, is it possible to get some accurate alpha for my glass material so that, if I need, I can cut my model out and place it on a different background whilst retaining the realistic glass in, say, Photoshop?
I am only currently working in the demo software so want to know if this is possible please.
Title: Re: Glass alpha channels
Post by: PhilippeV8 on March 27, 2013, 12:28:13 AM
http://blog.chipp.com/the-perfect-green-screen-key-effect-in-photoshop-2/

:)
Title: Re: Glass alpha channels
Post by: number12 on March 27, 2013, 07:11:23 AM
My company has written tutorials on Photoshop for quite a few well known mags so I'm aware of how to do this in PS but it would be much less hassle if I could generate a decent alpha straight from Keyshot.

Does this mean Keyshot can't do this then?...... Seriously?.....
Title: Re: Glass alpha channels
Post by: guest84672 on March 27, 2013, 03:12:09 PM
You can create an alpha channel, but whatever is behind glass is based on what color background you had set inside KeyShot.
Title: Re: Glass alpha channels
Post by: number12 on March 27, 2013, 05:38:26 PM
So in reality all you can do is, say, set a black BG then import your model into your image editing software and use the actually model to manually create an alpha using the values of the image?

If this is the case I think I'll have to look for an alternative software... unfortunately, as I really liked the other aspects of Keyshot...   :(
Title: Re: Glass alpha channels
Post by: evilmaul on March 28, 2013, 11:55:41 AM
what you are saying doesnt make any sense man!
Glass will reflect and refract whats the enviroment around it. If you change the background  in Photoshop you do DON'T retain the realistic glass anymore and it will look fake end of the story
Title: Re: Glass alpha channels
Post by: DriesV on March 28, 2013, 12:45:05 PM
Quote from: evilmaul on March 28, 2013, 11:55:41 AM
what you are saying doesnt make any sense man!
Glass will reflect and refract whats the enviroment around it. If you change the background  in Photoshop you do DON'T retain the realistic glass anymore and it will look fake end of the story
I second that.
Besides, what keeps you from using a backplate in KeyShot to put behind your lamp?

Dries
Title: Re: Glass alpha channels
Post by: number12 on April 02, 2013, 04:37:41 PM
No you're wrong, you may want to isolate your model for post processing and as such this is actually quite poor to not be able to accurately cut out glass. If you think you shouldn't be able to separate your model from BG then that is dumb, of course there are situations where this is necessary.

Quite a massive oversight in my opinion but I'm guessing anyone who has an "interest" in this software will defend it.  ;)
Title: Re: Glass alpha channels
Post by: DriesV on April 02, 2013, 04:52:26 PM
If you really want this feature, then I suggest you drop it in the Wish List on this forum and post a clear exemple image of what you think is lacking and how it should be.
Maybe one of the devs picks it up! :)

Still, I think the current alpha channel approach in KeyShot is OK. Also for glass objects.
What you may be looking for is some sort of 'opacity pass' which specifies in B/W values what parts of your scene objects are transparent or not.
This could maybe be a future addition to the render pass arsenal...

Dries
Title: Re: Glass alpha channels
Post by: PhilippeV8 on April 03, 2013, 12:14:29 AM
It would be awesome if we could get a glass alpha channel ... I too could very much so use it.  However, I do understand the difference between separating the shadow from the background, compared to separating glass from the background.
Shadow does just darken what is directly behind it, while glass does 2 things.  1) it shows pixels from a different location, depending on the camera angle 2) it changes the color, depending on reflection and glass color.
You would need a very smart file format in order to take these data into a post process.

number12 >> What software do you know that can do this ??
Title: Re: Glass alpha channels
Post by: DriesV on April 03, 2013, 12:39:50 AM
Quote from: PhilippeV8 on April 03, 2013, 12:14:29 AM
...
Shadow does just darken what is directly behind it, while glass does 2 things.  1) it shows pixels from a different location, depending on the camera angle 2) it changes the color, depending on reflection and glass color.
You would need a very smart file format in order to take these data into a post process.
...

I know of not a single render product that can do this. :)
Having said that, Maxwell Render can do this:
(http://support.nextlimit.com/download/attachments/1475733/alphasopaque.jpg?version=1&modificationDate=1315601618000)
You can specify whether the alpha channel is completely opaque for your scene objects OR...
The alpha channel can also account for transparency (but just that...) that enables you to semi-view the background behind transparent objects. I think this is what the topic starter is after. However, you don't get light dispersion, refractions or any of that fancy stuff. :)

Dries
Title: Re: Glass alpha channels
Post by: PhilippeV8 on April 03, 2013, 01:06:43 AM
It would be a good place to start ... me thinks ...
Title: Re: Glass alpha channels
Post by: DriesV on April 03, 2013, 01:22:12 AM
I just tried it out in Photoshop using the RGB and alpha section of that image.
It actually looks rather OK, I think...

Dries
Title: Re: Glass alpha channels
Post by: PhilippeV8 on April 03, 2013, 02:18:36 AM
We kinda have this already ... no ?  Did a quick test but something went wrong.  It's supposed to be windsheilds and I colored the back faces in Inventor so I can put different material to it.  The top center one should've been "Refractive glass + clear rough plastic".
Title: Re: Glass alpha channels
Post by: DriesV on April 03, 2013, 02:27:03 AM
Nice experiment, Philippe! ;)

Indeed, it does work for the 'simple glass' (basic and refractive), but not for any other of the transparent material types (e.g. solid glass, advanced, plastics...). The simple glass really is an odd duck in many ways. :D For architectural glass and/or thin sheets of glass that might even be good enough.

Dries
Title: Re: Glass alpha channels
Post by: PhilippeV8 on April 03, 2013, 02:42:59 AM
You're right.  It does only work with simple glass and all it retains is the reflection and the coloring.  Any kind of refraction is lost if you change the background.  Which is expected behaviour.

Would be nice tho if we could render to such a smart format that keeps refraction active in post.
Title: Re: Glass alpha channels
Post by: DriesV on April 03, 2013, 04:24:31 AM
Okay, I just figured something out...

If you have objects in your scene with solid glass and you REALLY want the background to come through in Photoshop, then do this:

*Render with solid glass assigned to object
*Render with 'simple glass' assigned to object with alpha channel enabled (this will take into account the transparency of the glass)
*In Photoshop open both images and release layer mask from transparency (layer > layer mask)
*Copy both simple and solid glass layers with layer masks into one canvas
*Finally, copy the layer mask from the 'simple glass' layer to the layer mask of the 'solid glass' layer

That should sort of do it...

Dries
Title: Re: Glass alpha channels
Post by: PhilippeV8 on April 03, 2013, 05:11:13 AM
Sort off indeed ... because you still lose refraction ...
It'll always look different than if you re-render with the final background.
Title: Re: Glass alpha channels
Post by: number12 on April 09, 2013, 09:14:51 AM
Firstly a BIG THANK YOU to PhillippeV8 for taking the time to post up about this. Keyshot is pretty new to us (just trying the demo currently) so still discovering what it can and can't do. So far, VERY impressed.

In response to EvilMaul our clients include Dreamworks and many other MASSIVE clients and we DO isolate 3D models, integrate it into something else and it DOES still look real so in essence you are 100% incorrect. (I can only assume we are slightly at crossed wires with this) It is sometimes necessary to separate your 3D model from the background/HDRI maps as for us, they are a means to an end, to give a realistic finish NOT to be left as rendered.

Anyway, I suppose we all use this stuff for different things.

Quote from: PhilippeV8 on April 03, 2013, 02:42:59 AM
You're right.  It does only work with simple glass and all it retains is the reflection and the coloring.  Any kind of refraction is lost if you change the background.  Which is expected behaviour.

Would be nice tho if we could render to such a smart format that keeps refraction active in post.
Yup, totally agree. It would turn this software from being great into being an absolute KILLER software.

Thanks for all your input guys, appreciate your time on it even though we may disagree on certain aspects!  8)
Title: Re: Glass alpha channels
Post by: PhilippeV8 on April 09, 2013, 02:01:07 PM
Then there is the scientific question as to what it should show refracted ... is it the backplate, or does it show stuff from the HDRI ... cuz if it is the HDRI, even a smart file format would have to be VERY smart indeed ...
Title: Re: Glass alpha channels
Post by: KeyShot on April 09, 2013, 04:51:51 PM
It would be possible to add an alpha channel for the solid glass, but it would just show what is right behind the glass not what you might see at an angle (due to refraction). As Marco (aka Evilmaul) said this would be wrong, but if there is a significant request for this then we can certainly add it.
Title: Re: Glass alpha channels
Post by: vrank on December 03, 2014, 01:20:48 AM
I know I'm digging up a relatively old thread. I'd like to see such a feature. Or is there a different workaround than the green-screen technique (or the one posted here) that produces the same idea straight from Keyshot?

We have to a lot of renders, with varying context. Meaning the post-production will take a lot of manual labor.

Title: Re: Glass alpha channels
Post by: Wonderboy75 on October 21, 2016, 01:46:52 AM
Hi,

I am a 3dsmax and vray user but I also use Keyshot occasionally at work.

I would just like to mention that V-ray has a solution where you can choose in the material if you want refraction and reflections to affect alpha channel and even other renderpass channels.  Here you can see a tutorial where this is explained. http://www.workshop.mintviz.com/tutorials/vray-alpha-channel-for-transparent-objects/

I hope there will be a similar implementation in Keyshot (if this is allready possible, please let me know) . It can be very useful when compositing your images.
Title: Re: Glass alpha channels
Post by: DMerz III on October 21, 2016, 02:06:08 PM
I know somewhere out there, BDesign is working on a workaround for this. ;)

Super BDesign to the rescue any minute now.

Title: Re: Glass alpha channels
Post by: bdesign on November 03, 2016, 03:03:14 PM
 8) Thanks, David. I'll see what I can do...but, that's a tough one :)

Eric