VRMAT generator in Grasshopper

Hello everyone,
Today I’ve bought a rather shitty texture pack and finally decided to automatize creation of vrmat materials. Because I can’t code, it all runs on Grasshopper (Rhino 6).

Basically if your files are tidily organized, you just set the:

  • main material folder
  • template location (a vrmat exported from vray edited in a Notepad)
  • check paths to texture files and variables to replace.

When you activate the Grasshopper file, it creates vrmats with textures preloaded in corresponding slots.

I’m adding my current vrmat template and GH file via attachment and google drive:

CGAXIS MATS.gh (19.1 KB)
https://drive.google.com/open?id=1jdDXMD3QIW0HjT27aP6X6kbDfD9oXhBF

The reason I’m sharing it is that I have a question - I would like the thumbnail to work, however I don’t know what to put between <preview></preview>. Would it work with a link to the thumbnail image? Can I somehow simply copy data from a jpg image?

Thanks!

Have fun working! And I deeply value your feedback if you have any suggestions or requests. :slight_smile:

Cheers,
Jonas

1 Like

Hi, Jonish,

The preview is Base64 encoded PNG. There are number of python sample code out there, you can plug into GH script node and encode the image.

1 Like