KeyShot Forum

Technical discussions => Materials => Topic started by: Paulo_Kick on November 13, 2017, 06:23:20 pm

Title: Mask only tops of a geometry
Post by: Paulo_Kick on November 13, 2017, 06:23:20 pm
Is there any way to mask only the tops of a geometry? As for example, add a deposited dust effect, just like this set of nodes from Redshift to Cinema 4D in this video:
t=145s


The closest I found was to use a color gradient node as mask, but is still not the result I want to achieve

Title: Re: Mask only tops of a geometry
Post by: evilmaul on November 13, 2017, 07:44:57 pm
you could use the occlusion node as a mask to darken things up or as a label plugged in a different material (to emulate dust) if thats what you want.
you have to set the bias in Y to -1  and the normal to   >1 (you can play with values way over 1 and see how you like it best)

cheers,
Marco

Title: Re: Mask only tops of a geometry
Post by: mattjgerard on November 14, 2017, 06:22:03 am
I did this exact effect to get some worn edges on thumbscrews on a model I was working on. The settings are really finicky and took me a while to dial it in, but it worked perfectly in the end. In the matgraph, select the occlusion node and hit 'c' on the keyboard to directly view what the node is doing.
Title: Re: Mask only tops of a geometry
Post by: MWo on November 14, 2017, 11:02:08 am
Here's a quick solution:

I used a free model from http://threedscans.com/ (http://threedscans.com/).


First I  rendered the default material (orthographic camera |front view) with the normal pass. Then I attached the normal (exr) as a texure and used the color key mask to filter the green (top normals) and used this as alpha in the composite note. And that's all.

For details download the packed KSP from my OneDrive: https://onedrive.live.com/embed?cid=E6906FD5F0397B5F&resid=E6906FD5F0397B5F%2116040&authkey=AIXH1CZkPXHAm1c (https://onedrive.live.com/embed?cid=E6906FD5F0397B5F&resid=E6906FD5F0397B5F%2116040&authkey=AIXH1CZkPXHAm1c)


Hope that helps

Cheers
Marco
Title: Re: Mask only tops of a geometry
Post by: MWo on November 14, 2017, 11:38:33 am
I also tried a solution with a strong light spot above the model pointing to the bottom. That can be easily done with the HDRI editor.
And I used this render as a texture to define the alpha of dust (noise).
(same technique as the previous post.


Sorry Albert Einstein!
Title: Re: Mask only tops of a geometry
Post by: Will Gibbons on November 27, 2017, 09:15:55 am
Great solutions Marco! I sure could have used this a few weeks ago :P