Accessing rhino materials within grasshopper

hello all.
i am wondering how is oit possible to access and assign a material from rhino material library ( C:\Users*USER*\AppData\Roaming\McNeel\Rhinoceros\6.0\Localization\en-US\Render Content )

the idea would be than to be able to upload the material and use it without the whole process i described in the image. this could be sweet.

would love the help, or where to find some C# direction to start getting into it.
cheers y’all

1 Like

Seems like it works out as you did it.

2 Likes

no do it without a ref rhino geo. thats the whole point. i want to have clean rhino. this library should be accessible without creating a shape, assigning a rhino mat > uploading it to grasshopper… exploding the attributes to finally attach to a preview component.
too long to do it each time

Got it… But in that case, even if you don’t want to create geometries in Rhino scene, at least the materials you need in your Rhino Document should be loaded first.

2 Likes

the question is how to access the rhino material content table … human is not the key
i wish to not load material manually to rhino. i want a Gh access directly to the folder. couldn’t find any way to upload the files so far

Hello
you didn’t try too much. Just think that David Rutten has already solved this :innocent:
So just put the name of the material file, it works for me.


If you want the list of material, it mus be doable but it will give you a long list

5 Likes

i didnt know that, Thanx Laurent!!!

No problem, as David said there are lot of Easter Egg in Grasshopper. So there are many functionality that are not known, documented …
I use something like that to copy the full file name of a file
https://www.extrabit.com/copyfilenames/
Mine is Clickie
http://www.defoort.com/fr/clickie
image

2 Likes

In windows if you shift+right click a file it gives an option to ‘copy as path’.

3 Likes

Hello,

I’ve tried the same but I’m receiving an error messag which, unfortunatelly, I don’t know what means! Could you give me an advice?
Thank you in advance!!
Error|460x273

Hi - Which Rhino version are you trying this in? Please run the Rhino SystemInfo command and copy-paste the result here.
-wim

Both R6 and R7 WIP
Rhino 6 SR26 2020-5-26 (Rhino 6, 6.26.20147.06511, Git hash:master @ 7788f6214ee9335d5793cc6177985a1c745e663b)
License type: Commercial, build 2020-05-26
License details: Cloud Zoo. In use by: Daniel Petcu ()

Windows 10.0 SR0.0 or greater (Physical RAM: 7.1Gb)
Machine name: DESKTOP-A0D4U5H

Hybrid graphics system.
Primary display: AMD Radeon R7 Graphics (AMD) Memory: 1GB, Driver date: 12-27-2017 (M-D-Y).
Primary OpenGL: AMD Radeon R8 M535DX (AMD) Memory: 4GB, Driver date: 12-27-2017 (M-D-Y). OpenGL Ver: 4.5.13476 Compatibility Profile Context 22.19.180.1536

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: Height

Vendor Name: ATI Technologies Inc.
Render version: 4.5
Shading Language: 4.50
Driver Date: 12-27-2017
Driver Version: 22.19.180.1536
Maximum Texture size: 16384 x 16384
Z-Buffer depth: 24 bits
Maximum Viewport size: 16384 x 16384
Total Video Memory: 4 GB

Rhino plugins
C:\Program Files\Rhino 6\Plug-ins\Commands.rhp “Commands” 6.26.20147.6511
C:\Program Files\Rhino 6\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 6\Plug-ins\RPC.rhp “RPC”
C:\Program Files\Rhino 6\Plug-ins\AnimationTools.rhp “AnimationTools”
C:\DAN\Pedorthic Art\Pedorthic Information Modeling\RhinoGrasshopper\Grasshopper\Software\Elefront422\elefront421\ElefrontProperties.rhp “ElefrontProperties” 1.0.0.0
C:\Program Files\Rhino 6\Plug-ins\RhinoRender.rhp “Rhino Render”
C:\Program Files\Rhino 6\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 6.26.20147.6511
C:\Program Files\Rhino 6\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino 6\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 6\Plug-ins\IronPython\RhinoDLR_Python.rhp “IronPython” 6.26.20147.6511
C:\Program Files\Rhino 6\Plug-ins\RhinoCycles.rhp “RhinoCycles” 6.26.20147.6511
C:\Program Files\Rhino 6\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 6.26.20147.6511
C:\Program Files\Rhino 6\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 6.26.20147.6511
C:\Program Files\Rhino 6\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 6\Plug-ins\Displacement.rhp “Displacement”


Rhino 7 SR0 2020-6-16 (Public Build, 7.0.20168.13075, Git hash:master @ 80dfec2e2dea70cc3db7d8429be19d655399baed)
License type: Commercial, build 2020-06-16
License details: Cloud Zoo
Expires on: 2020-07-31

Windows 10.0 SR0.0 or greater (Physical RAM: 7.1Gb)

Hybrid graphics system.
Primary display: AMD Radeon R7 Graphics (AMD) Memory: 1GB, Driver date: 12-27-2017 (M-D-Y).
Primary OpenGL: AMD Radeon R8 M535DX (AMD) Memory: 4GB, Driver date: 12-27-2017 (M-D-Y). OpenGL Ver: 4.5.13476 Compatibility Profile Context 22.19.180.1536

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: Height

Vendor Name: ATI Technologies Inc.
Render version: 4.5
Shading Language: 4.50
Driver Date: 12-27-2017
Driver Version: 22.19.180.1536
Maximum Texture size: 16384 x 16384
Z-Buffer depth: 24 bits
Maximum Viewport size: 16384 x 16384
Total Video Memory: 4 GB

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 7 WIP\Plug-ins\Commands.rhp “Commands” 7.0.20168.13075
C:\Program Files\Rhino 7 WIP\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 7 WIP\Plug-ins\RPC.rhp “RPC”
C:\Program Files\Rhino 7 WIP\Plug-ins\AnimationTools.rhp “AnimationTools”
C:\Program Files\Rhino 7 WIP\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 7.0.20168.13075
C:\Program Files\Rhino 7 WIP\Plug-ins\RhinoRender.rhp “Legacy Rhino Render”
C:\Program Files\Rhino 7 WIP\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 7.0.20168.13075
C:\Program Files\Rhino 7 WIP\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino 7 WIP\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 7 WIP\Plug-ins\RhinoCycles.rhp “RhinoCycles” 7.0.20168.13075
C:\Program Files\Rhino 7 WIP\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 7.0.20168.13075
C:\Program Files\Rhino 7 WIP\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 7.0.20168.13075
C:\Program Files\Rhino 7 WIP\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 7 WIP\Plug-ins\Displacement.rhp “Displacement”

Does the error occur because of material input or geometry input ?
Test the custom preview with simples inputs to track the cause of the error.

Custom preview works with simple inputs as colors.
The error message is appearing when I’m trying to use a material from library, exactly like in your example
Thanks

Hi,
There is any conclusion?
Thank you!

I’m lost in this discussion. Did anyone say how one can get the list of available materials in the current Rhino file in Grasshopper? I tried what was in the above screen shots but they yield blank results when my file has close to 50 materials built-in. Also, there does not appear to be any inputs available for the material table that reads a library from a file path. Any clarification as to whether this is possible would be great. Thanks!