Author Topic: Mask only tops of a geometry  (Read 1703 times)

0 Members and 1 Guest are viewing this topic.

Offline Paulo_Kick

  • Newbie
  • *
  • Posts: 6
Mask only tops of a geometry
« 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


Offline evilmaul

  • Sr. Member
  • ****
  • Posts: 418
Re: Mask only tops of a geometry
« Reply #1 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


Offline mattjgerard

  • Hero Member
  • *****
  • Posts: 1474
Re: Mask only tops of a geometry
« Reply #2 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.

Offline MWo

  • Hero Member
  • *****
  • Posts: 834
  • Senior Technical Consultant @ INNEO (Germany)
    • german KeyShot page from INNEO Solutions
Re: Mask only tops of a geometry
« Reply #3 on: November 14, 2017, 11:02:08 am »
Here's a quick solution:

I used a free model from 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


Hope that helps

Cheers
Marco
« Last Edit: November 14, 2017, 11:34:49 am by MWo »

Offline MWo

  • Hero Member
  • *****
  • Posts: 834
  • Senior Technical Consultant @ INNEO (Germany)
    • german KeyShot page from INNEO Solutions
Re: Mask only tops of a geometry
« Reply #4 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!

Offline Will Gibbons

  • Hero Member
  • *****
  • Posts: 2849
  • willgibbons.com
    • My Website
Re: Mask only tops of a geometry
« Reply #5 on: November 27, 2017, 09:15:55 am »
Great solutions Marco! I sure could have used this a few weeks ago :P