KeyShot Forum

Technical discussions => Materials => Topic started by: patrick9994 on April 27, 2017, 12:43:41 PM

Title: Thin film to mimic a camera lens
Post by: patrick9994 on April 27, 2017, 12:43:41 PM
I've been working on an action camera for the past few months and I still haven't been able to figure out the best way to represent a camera lens using keyshot. Through some research I was pointed towards using the 'Thin Film' material which works well for the first layer, but I find there is missing some realness to the lens. Any recommendations to make this look better?

Thank in advance.
Title: Re: Thin film to mimic a camera lens
Post by: Esben Oxholm on April 28, 2017, 05:47:22 AM
Hi Patrick.

How did you model the lens?
While the thin film can help give that 'lens look' you need to have your model being as close to a real lens as possible. That means you need to make sure that the lens part is curved and have several lenses stacked next to each other which is often the case in real lenses.

Hope it helps.
Best,
Title: Re: Thin film to mimic a camera lens
Post by: patrick9994 on May 01, 2017, 08:23:46 AM
Hey Esben,

I modeled the lens in Solidwork. I made multiple layers with concave surfaces with different thicknesses (Don't really have any accurate references). I played with the distance between each lens and material thickness/refraction index but I'm still getting only the reflection of the first lens.

The question might be: How can I get the light to go through all the lenses to give the proper effect? Any recommendation for materials (other than thin film) or setting that might solve this problem?

Title: Re: Thin film to mimic a camera lens
Post by: Will Gibbons on May 01, 2017, 12:08:08 PM
Quote from: patrick9994 on May 01, 2017, 08:23:46 AM
Hey Esben,

I modeled the lens in Solidwork. I made multiple layers with concave surfaces with different thicknesses (Don't really have any accurate references). I played with the distance between each lens and material thickness/refraction index but I'm still getting only the reflection of the first lens.

The question might be: How can I get the light to go through all the lenses to give the proper effect? Any recommendation for materials (other than thin film) or setting that might solve this problem?

There are a number of ways to 'fake this'. Really, to get the effect you're after relies on a few things.

1. Make sure you have at least 2 Raybounces per surface the light needs to travel through +1. Ex. 2 lenses, you'll want 5 Raybounces minimum. I tend to give it a couple extra just to be sure.
2. The light needs to move not just through the glass, but across it for maximal effect.
3. The lens needs to be a solid. If you apply KS basic glass, you need to check the '2-sided' checkbox to enable refractive properties.

Other ways to help you get the effect you want is to place a dim point light actually in the lens behind or between the lens elements.
Another approach is to have a false lens surface (offset from the outer-most lens element a tiny bit) apply an emissive material and a custom PNG with transparency. This way you can create a color gradient in photoshop to mimic any colored lens effect you wish. You can then just rotate that surface as needed in KS. It's nice because as an emissive surface, it'll spill colored light into your lens too. Make sure Global Illumination is on too.

Good luck!
Title: Re: Thin film to mimic a camera lens
Post by: cschultz on May 01, 2017, 12:20:22 PM
In SW, do an offset surface of .01mm (or something small).  In KS apply the thin film to the surface, and a clear glass to the lens.  Also you can scale the lens and surface by .99 in order to avoid overlapping.