KeyShot Forum

Technical discussions => General discussion => Topic started by: duka1985 on January 31, 2018, 07:54:09 AM

Title: glass and wood problems
Post by: duka1985 on January 31, 2018, 07:54:09 AM
Hello,
I have problem with two materials; imagine a piece of wood (plank) embedded in glass. The model is modeled using cut-out process in modeling software. Problem I have in KS is that two materials seems to conflict with each other and result is "empty box" in place where inner solid part (wood) should be. Any idea how to fix that? Thanks!
Title: Re: glass and wood problems
Post by: mattjgerard on January 31, 2018, 07:57:47 AM
Looks like the inner surfaces are fighting for dominance, if the wood interior piece is modeled separately and has separate faces than the glass, then shrink the wood piece by a teensy little bit so they aren't fighting to occupy the same 3d space.

IF they are modeled as one object and share a single surface as the interface between the two, then you might have to take a different solution, one that I'm not familiar with. Search on the forum for liquid/glass or container interactions. Same issues there.
Title: Re: glass and wood problems
Post by: Will Gibbons on January 31, 2018, 10:24:04 AM
Try selecting the wood piece and scaling it down to .99 (you can adjust this under the position sub-tab) under the scene tree.
Title: Re: glass and wood problems
Post by: duka1985 on January 31, 2018, 01:17:37 PM
Actually it worked, thanks. Shrinking solved the problem of "empty box" but added another one - thin layer of "air" ( or vacuum) between wood and glass that has different optical characteristics and it was visible on render - no matter how thin that gap was. However scaling wood piece positively (say 1,0001) works perfect! It seem that slightly overlapping two materials is not an issue. Thank again!
Title: Re: glass and wood problems
Post by: jhiker on February 01, 2018, 12:51:13 AM
Can you post a new pic?
Title: Re: glass and wood problems
Post by: Will Gibbons on February 01, 2018, 09:58:51 AM
Quote from: duka1985 on January 31, 2018, 01:17:37 PM
Actually it worked, thanks. Shrinking solved the problem of "empty box" but added another one - thin layer of "air" ( or vacuum) between wood and glass that has different optical characteristics and it was visible on render - no matter how thin that gap was. However scaling wood piece positively (say 1,0001) works perfect! It seem that slightly overlapping two materials is not an issue. Thank again!

This is to be expected as KeyShot is physically accurate. The only way to get this to behave the way you wanted it to is to treat it like we do liquids in glass/plastic. If you look up our blog post on how to render liquids in glass, you'll see how to use surfaces to define the IoR on each side of the surface which will give you what you're looking for.
Title: Re: glass and wood problems
Post by: duka1985 on February 01, 2018, 10:25:50 AM
Quote from: jhiker on February 01, 2018, 12:51:13 AM
Can you post a new pic?

Yep, ofc! The model above was just to illustrate the problem so I didn't play with it afterward. So, here are some later pics with actual model.
Title: Re: glass and wood problems
Post by: Will Gibbons on February 01, 2018, 05:49:53 PM
Looks quite nice!
Title: Re: glass and wood problems
Post by: duka1985 on February 02, 2018, 11:08:50 AM
Thank you.