Matcap display trick

Hi all,

I was playing around with previewing textured meshes in Grasshopper and stumbled onto a neat little trick for matcap rendering that seemed worth sharing.

gh-matcap-display.zip (5.0 MB)

15 Likes

How could we could generate matcap textures without going into github code?

Really all you need is tightly cropped image of a nicely lit sphere so you could render one yourself or even take it from a photo. For example:

  1. Source image

  2. Cropped
    marble-0

  3. Matcap preview

8 Likes

This is how Auxpecker works. https://www.food4rhino.com/app/auxpecker

Is this any different ?

Umm … The main difference is that it works for GH while auxpecker not ?

1 Like

Here’s python version, if anyone prefers it.

matcap-display_python.gh (1.5 MB)

1 Like

Here’s an updated version, :stuck_out_tongue_winking_eye:

Making use of one component from Human plugin

image

matcap-display_python_v2.gh (1.5 MB)

update: (small fix)
matcap-display_python_v2.1.gh (1.5 MB)

1 Like

I really love it. Unfortunately, it doesn’t work on Rhino WIP. Is there anything that needs to be changed in the C# script?

Easiest to do matcap material IMO is to just add a Custom Material to the Rhino document and set a matcap texture to the Environment channel at 100%. Then in GH select that material for the Material input of the Custom Preview component.

1 Like

Couldn’t get it to work properly with Rhino WIP myself. Probably best to go with @nathanletwory’s suggestion in any case.