KeyShot Forum

Share => Materials and Textures => Topic started by: DetroitVinylRob on February 10, 2017, 08:44:27 AM

Title: How to achieve: different finishes on either side of a transparent CAD solid
Post by: DetroitVinylRob on February 10, 2017, 08:44:27 AM
I am trying to produce a transparent lens in KeyShot 6 that is clear and smooth on one side, and texture finished on the opposite side. In automotive lighting we have many cases where an inner lens with optics is injection molded and a texture is required for one side of that lens.

I have tried breaking the CAD faces into two files, one for clear, and one for textured transparent materials. KeyShot seems to have problems with understanding the two (together) as a solid property, because of course, it is not. The result apparently presents face normals issues and is inconsistent. Additionally I am having issues with the evaluation of normals and correcting of them.

If the optical properties did not have to perform critically accurate, I would just import a solid lens and assign it a clear material, then also import an offset group of faces perhaps 0.1mm off the face of the solid and assign it a textured surface. But because I am required to be reflective and refractive accurate, this will not do.

So to my question: Is there a way to assign two different finishes to a single solid CAD part, perhaps by vector or some other method??? Or, do I need to employ some other method of preparing the CAD to support KeyShots handling of the materials?

Thanks again, Rob
Title: Re: How to achieve: different finishes on either side of a transparent CAD solid
Post by: guest84672 on February 13, 2017, 03:50:49 PM
If I understand that correctly, you want to different finishes on a single surface?
Title: Re: How to achieve: different finishes on either side of a transparent CAD solid
Post by: bdesign on February 13, 2017, 05:40:15 PM
Hey Rob-

Here's a way to achieve this effect. Instead of splitting the lens geometry, apply UV mapping with seams at the desired split points. You can then take a UV snapshot, open it in Photoshop, and create a mask- black for the smooth areas and white for the textured areas. In KeyShot, plug the mask texture (Mapping Type: UV Coordinates) into the Input of a Color To Number node > Bump Height of your bump map > Bump channel of your material (Dielectric in my example). Set the "Output From" value of the Color To Number node to 0 (black areas of the mask) and the "Output To" value to your desired bump height (white areas of the mask). I've attached example renders, screenshots of the matGraph and UV snapshot/mask, and a link to the KSP file. Let me know if this works for you.

Link to KSP file: http://bit.ly/2l9yXov

Cheers,
Eric

Title: Re: How to achieve: different finishes on either side of a transparent CAD solid
Post by: DetroitVinylRob on February 14, 2017, 08:06:58 AM
Thank you bdesign, yes, this is exactly what I am looking for. I appreciate the excellent presentation you have offered. It will be needed for me to figure this procedure out, and be helpful for future views by other. Just attended the Material Graph Webinar, which was a solid introduction, but need some serious playtime.  These techniques will take me some effort to get my mind around, as material graph and anything created in PhotoShop will present a learning curve.

Hello thomasteger, actually, I was looking for a texture surface on just one side of a lens only, while leaving the opposite side without (or just smooth and clear). bdesign explanation totally nailed it. Thanks.
Title: Re: How to achieve: different finishes on either side of a transparent CAD solid
Post by: Will Gibbons on February 15, 2017, 07:05:21 AM
Nice work Eric, this is a solid little study.
Title: Re: How to achieve: different finishes on either side of a transparent CAD solid
Post by: Finema on February 15, 2017, 08:00:48 AM
Quote from: bdesign on February 13, 2017, 05:40:15 PM
You can then take a UV snapshot...

Hi Eric
How you take the snapshot ??
Thanks
Title: Re: How to achieve: different finishes on either side of a transparent CAD solid
Post by: bdesign on February 15, 2017, 02:42:26 PM
Quote from: Will Gibbons on February 15, 2017, 07:05:21 AM
Nice work Eric, this is a solid little study.
Thanks very much, Will. Much appreciated :)

Cheers,
Eric
Title: Re: How to achieve: different finishes on either side of a transparent CAD solid
Post by: bdesign on February 15, 2017, 02:51:21 PM
Quote from: Finema on February 15, 2017, 08:00:48 AM
Quote from: bdesign on February 13, 2017, 05:40:15 PM
You can then take a UV snapshot...

Hi Eric
How you take the snapshot ??
Thanks
Hey Philippe-

It varies with different applications. Some have a dedicated "save UV snapshot" or similarly named feature. I created my example model in Rhino, which has the ability to UV map geometry, but does not have a UV snapshot function. So, I took a screen capture from top ortho view, opened it in Photoshop, and cropped precisely to the edges of the UV layout square. It's very important to crop it precisely, so zoom in to the max level when using the crop tool. If I remember correctly, I think you use C4D as part of your toolbox- here is a link that explains how to do it in C4D: http://lesterbanks.com/2013/05/creating-a-uv-mesh-layer-in-cinema-4d-for-export-to-photoshop/

Cheers,
Eric
Title: Re: How to achieve: different finishes on either side of a transparent CAD solid
Post by: bdesign on February 15, 2017, 04:15:02 PM
I've figured out a way to achieve this effect procedurally, directly within KeyShot. The caveat is that it will take approximately 2x longer to render. But it's a very simple setup. Plug a Surface Backside Mask > Positive Curvature and Zero Curvature of a Curvature node (Adaptive Radius unchecked, Cutoff and Radius values set to .001). Plug the Surface Backside Mask > Source of a Color Invert node > Negative Curvature of the Curvature node. Plug the Curvature node > Input of a Color To Number node. Set the Output From value to 0 (smooth) and the Output To value to your desired bump height. Plug the Color To Number node > Bump Height of your bump Texture Map > Bump of your material. Example render and matGraph shot attached.

Cheers,
Eric