Author Topic: I can't see the transparency  (Read 6827 times)

0 Members and 1 Guest are viewing this topic.

Offline pizzalover2

I can't see the transparency
« on: August 16, 2017, 02:53:18 am »
I've applied a 'Gem Stones' material and the object is glossy black. I've tweaked the render settings and no transarency is shown (or the material).

I've tried Ray Bounces: 64 and Global Illumination Bounces: 64 (both Product Mode & Interior Mode) and I still can't see the rendered material (the Gem Stone material).

I've tried all the Lighting Presets and the material ball is still glossy black.  :o

See attached image

This happens on all Gem Stones, Glass Wavy Grey, Glass Wavy Red, Glass (Solid) Black and more transparent materials.

Thanks!

Online DriesV

  • Administrator
  • Hero Member
  • *****
  • Posts: 2490
  • Total likes: 19
  • Product Specialist at Luxion
Re: I can't see the transparency
« Reply #1 on: August 16, 2017, 03:02:49 am »
You may want to check the Transparency Distance of your materials, relative to your model's size.

Dries

Offline pizzalover2

Re: I can't see the transparency
« Reply #2 on: August 17, 2017, 12:12:02 am »
Is there a formula for realisitic (real life results) input in the Transparency Distance? I guess the default Transparency Distance (e.g. 0.5 cm) is based on real life results and formulas.

The material ball is 30.4, 39, 39 cenimters. (after being converted in the scene units from inches)

Gem Stone Fire Opal appears as a black glossy on the material ball and it has the Transparency Distance: 0.5 cm (default)
If I type 5 or 10 cm, it appears more and more transparent (closer to the desired effect), the problem is how do I know when to stop (5, 10, 15, 20 cm)? I should type 30 or 38 as Transparency Distance to get realistic results?


Offline mattjgerard

Re: I can't see the transparency
« Reply #3 on: August 17, 2017, 07:18:38 am »
Its working exactly as it should, since the transparency distance measurements will apply directly to the measurement of your object. So, if your model is 39 cm deep, and you want to see through it, you need to set the transparency distance to 39cm. That is telling the material how far to let the light into the object. This is a great improvement as in KS6 the units didn't necessarily correlate, there was a lot of guesswork.

Now, in a more realistic scene, your gemstone would be maybe 2mm in diameter, and your transparency distance would be input on that scale, 2mm for a clear stone, or 1.8 for a not so clear stone. You have to pay attention to the units and measurements of your object then it makes it easier to input the correct numbers.

Offline DetroitVinylRob

Re: I can't see the transparency
« Reply #4 on: November 13, 2017, 11:37:08 am »
Thank you, this answers my concern migrating transparent dielectric v6 materials to v7 and having them show a default thickness on "transparency distance" and appearing black. When I adjust the "transparency distance" to the physical thickness of the CAD data model, their appearance corrects! :)

Offline INNEO_MWo

  • Hero Member
  • *****
  • Posts: 959
  • Total likes: 5
  • Senior Technical Consultant @ INNEO (Germany)
    • german KeyShot page from INNEO Solutions
Re: I can't see the transparency
« Reply #5 on: November 14, 2017, 12:47:44 am »
In the attached example (.bip) you'll see how transparency distance works. The red sphere has a diameter of 2 mm and a transparency distance of 1 mm. You're not able to see trough that sphere. (and that's not a lighting setup thing!). The green sphere has a diameter of 2 mm and exactly the same transparency distance. You can look through that material.


Hope that helps.


Cheers
Marco

Offline DetroitVinylRob

Re: I can't see the transparency
« Reply #6 on: November 15, 2017, 06:34:28 am »
Most consumer product injection molded transparent plastics (and of course, much glass) are anything but a single, uniform thickness, especially in automotive and transportation lighting applications, with optics.

I am currently looking into an acceptable (realistic) solution for a workflow with materials that insist on a single dimension for "transparency distance". I would be curious to see what the community here has discovered in this regard.

*Also, has anyone else noticed an issue with these materials in the material balls not matching the look of the material in the realtime window?

Thank you to all who have contributed constructive input!
« Last Edit: November 15, 2017, 06:45:12 am by DetroitVinylRob »

Offline Søren

Re: I can't see the transparency
« Reply #7 on: November 15, 2017, 11:23:23 am »
I think you may have misunderstood the transparency distance. It is not based on an assumption that your material/object has one uniform thickness (which is not really well-defined anyway since the light can traverse many different distances depending on angle, e.g. inside a cube). To be precise:

The transmission color is achieved when the light has traversed the Transparency Distance.

This does not imply that the light achieves the same color at other distances! The behaviour of light in absorbing media normally follows the Beer-Lambert law, which essentially says that the light is absorbed (or colored) more, the thicker the object. KeyShot uses this law of physics when computing the lighting for dielectrics. The transparency distance and the transmission color are "simply" artist-friendly ways of specifying exponential decay coefficients.

In the attached image, the rabbit is 30 cm across. The material is a single dielectric with the transparency distance about 10 cm and a green color. Notice how the ears are more transparent/less colored than the body, because it is thinner (which is the correct physical behaviour).

For best results, never use fully saturated/value colors for the transmission color, as no real-world materials have that and can give rise to peculiar results. In practice, use a color with a value of e.g. 50% and use the transparency distance to tune the color intensity. As Dries mentions, the transparency distance has to match the size of your object - i.e. a kilometer of water is not transparent, but a glass of water is. In the water example, the transparency distance and color is the same regardless of the water object size.

Finally, if you have any KeyShot 6 scene which does not look the same in KeyShot 7 it is a bug, so if you can share it we would appreciate it. Materials stored in the library is a different matter. The materials saved in KeyShot 6 did not correctly account for different units in different scenes, whereas KeyShot 7 does this. In KeyShot 7 a 1m cube would look the same modelled as either inches or centimeters when you drop a material from the library - this was not the case in KeyShot 6.

Hope this clarifies a few things without adding too much confusion :),
Søren

Offline mattjgerard

Re: I can't see the transparency
« Reply #8 on: November 15, 2017, 11:58:41 am »
specifying exponential decay coefficients.


I'm using this at the next party I go to and see what looks I get.

Offline INNEO_MWo

  • Hero Member
  • *****
  • Posts: 959
  • Total likes: 5
  • Senior Technical Consultant @ INNEO (Germany)
    • german KeyShot page from INNEO Solutions
Re: I can't see the transparency
« Reply #9 on: November 17, 2017, 03:03:54 am »
Hello Søren.

The specific information is very helpful.

But if I play with the dielectric material and change the transmission out color I got an issue. The representation changes if I change the color and cancel the select color dialog. See the attached screen cast for details.

Thanks!

Marco

Offline DetroitVinylRob

Re: I can't see the transparency
« Reply #10 on: November 28, 2017, 06:49:14 am »
Thank you Søren for your in depth explanation, though the practical application of the "transparency distance" slider yet eludes me. 

I have read Richard Funnell's comments and reviewed the sample on "How to Adjust Color Density on Transparent Materials in KeyShot" at ( https://blog.keyshot.com/2016/how-to-adjust-color-density-on-transparent-materials-in-keyshot ).

Richard says: "In KeyShot, the Glass (Solid), Dielectric, and Liquid materials use Color Density or Transparency to control the intensity of the material color. While the color is defined using a simple RGB or HSV value, the Color Density/Transparency slider defines how far light must travel through the material for the full color to be realized. This slider is based on your scene/model units, so accurate geometry is extremely important.

In the sample below, a color chip has been modeled in millimeters and the Glass (Solid) material was applied. When the Color Density slider is set to 1, we see 100% of the color when the wall thickness is 1mm. Walls thicker than 1mm are darker, and if the wall was thinner than 1mm we would see less color. This slider can be confusing because a greater value (more distance) will lead to a less saturated color. A larger value will quickly become very dark since the effect is dependent on your geometry's volume."

Dries says: "You may want to check the Transparency Distance of your materials, relative to your model's size." I don't understand this relationship, model size to transparency distance.

v7 menu pop-up says: "Transparency Distance: Defines the distance at which the material is achieved. Darkening is exponential based on geometry thickness."

Many of my KeyShot v6 custom transparent materials are presenting as opaque black in v7, due perhaps to the default value of the new "transparency distance" value that is now evoked automatically (and I presume, needs adjusting). By increasing this number value I achieve transparency, but have no understanding how this value correlates to the given scene/model units. To me, it appears random and forces me to custom tweak each material to each piece of CAD model. Doesn't seem like an efficient workflow... I must still be missing something in the explanations.



« Last Edit: November 29, 2017, 06:26:34 am by DetroitVinylRob »

Offline Will Gibbons

Re: I can't see the transparency
« Reply #11 on: November 30, 2017, 08:13:43 am »
Hi Rob,

Sounds like you're quoting facts. It may not be intuitive because as you pointed out:

Large transparency distance = brighter/more transparent material
Small transparency distance = darker/more opaque material

If your scene is modeled in mm, then transparency distance of 1 = the color of your material is achieved as light moves 1mm into the part.
If your background is white and your geometry is a 1mm thick slab, the color you pick for the material will be what is shown on your geometry.

As your geometry becomes more complex and has variation in thickness and as your lighting or background color changes, your glass/plastic material will appear different.

If you're getting opaque black appearances, make sure you're in product lighting preset mode to ensure enough Ray Bounces in your scene. I hope this helps.

Offline DetroitVinylRob

Re: I can't see the transparency
« Reply #12 on: December 01, 2017, 07:29:55 am »
Hi Will,

First, thank you for your response.

A little background, I am employed in automotive lighting in design and CG rendering. Beyond studio level creation sketching and concept rendering, we often are requested to do natural light, real life, photo accurate renderings of very complicated models, often with multiple, optically prescribed transparent lenses. Our materials are all custom developed to be accurate to real industry materials (with no creative fudging allowed). We employ 128 core network rendering and I shoot images at 64 samples, 33 ray bounces, commonly to achieve sufficient results. Our work absolutely must be consistent, precise, and repeatable. 

Previously, I was quoting what I could find as an explanation of "transparency distance" to acknowledge the knowledgeable sources but also display that I am not getting what I find a consistent or useful answer of how to understand and vary the "transparency distance" setting. Perhaps I am daft on this point but with due respect each of these explanations seem different and are talking around the point. Please understand, I appreciate any and all support to the question, I thank all of you in our community for that. Yet, in my experimentation and in rereading again and again these contributions, I am no further ahead with this understanding.

Let me be most plain and concise with my query: Is there a direct relationship between the "transparency distance" setting and the CAD data thickness supplied? Or the scale?

You say: "If your scene is modeled in mm, then transparency distance of 1 = the color of your material is achieved as light moves 1mm into the part.
If your background is white and your geometry is a 1mm thick slab, the color you pick for the material will be what is shown on your geometry."

The light source in the scene of your explanation would also have to be a full spectrum white light, if I understand the scenario correctly, right?

So, as we know an "environment", and of course environment lighting (in KeyShot as in the real world) play a significant roll in the human eyes perception of colour because light is absorbed, reflected, and tonally shifted by our surroundings.

What I am struggling with is that you seem to be correlating the "transparency distance" setting with model scale, and then with actual model thickness? These are two very different perimeters. And then what adds to my confusion is you suggest in your example that, the light moves 1mm into a part? I need to employ a "transparency distance" setting to each of my unique and often non uniform thickness models, a setting that lets light move through the entire material with realistic, life like consequences of hue density, refraction, reflection, and light absorption, etc. All my models are in mm and 1:1 scale.

Pardon me but, I don't get it...
« Last Edit: March 06, 2018, 10:19:40 am by DetroitVinylRob »

Online DriesV

  • Administrator
  • Hero Member
  • *****
  • Posts: 2490
  • Total likes: 19
  • Product Specialist at Luxion
Re: I can't see the transparency
« Reply #13 on: December 01, 2017, 08:26:13 am »
The Transparency Distance only sets the distance at which the Color (or Transmission color, depending on the material type) is achieved.
When you apply the material to any geometry, it will behave consistently, regardless of scene units or model size. Parts that are less thick than the Transparency Distance will look lighter and less saturated than the Color in the material properties, while parts that are thicker than the Transparency Distance will look darker and more saturated.

See attached example.
The plastic chip is exactly 4 mm thick. The Transparency Distance is set to 4 mm.
Notice that the Color of the material is achieved where the part is 4 mm thick.
Notice that the chips have steps with decreasing thickness at the side. Notice that the color gets lighter and less saturated, the thinner the part gets.
Notice that where the two chips overlap, the color is darker and more saturated. This happens because the thickness for both parts is "added up".

Of course, as you mentioned already, the color you get in the real-time view is dependent on the HDRI Lighting, background, other materials etc.
If you have access to physical samples of the materials you are trying to recreate, then I suggest you study those in a setup you can match in KeyShot. Put the sample on a white background and use neutral (non colored) lighting. Then try to match the setup in KeyShot using a 3D model of the physical sample (or something very similar).

I hope this all makes sense. :)

Dries
« Last Edit: December 02, 2017, 02:57:24 am by DriesV »

Offline mattjgerard

Re: I can't see the transparency
« Reply #14 on: December 01, 2017, 08:45:08 am »
This is a great study on how the transparency distance works. Thanks for this.