Announcement

Collapse
No announcement yet.

Automatic VRMAT generator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Automatic VRMAT generator

    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 google drive:

    https://drive.google.com/open?id=1jd...6X6kbDfD9oXhBF

    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!

    Jonas

  • #2
    It is not possible to generate previews in V-Ray for Grasshopper. Previews are only rendered within the V-Ray Asset Editor.
    There is no shortcut to skip the manual process of loading assets (.vrmats), selecting each one and waiting for their previews to refine before saving them all to disk again.
    I'll add a note for internal discussion whether something can be done that may help updating asset thumbnails in batch.

    Kind regards,
    Peter
    Peter Chaushev
    V-Ray for SketchUp | V-Ray for Rhino | Product Owner
    www.chaos.com

    Comment


    • #3
      Originally posted by Peter.Chaushev View Post
      It is not possible to generate previews in V-Ray for Grasshopper. Previews are only rendered within the V-Ray Asset Editor.
      There is no shortcut to skip the manual process of loading assets (.vrmats), selecting each one and waiting for their previews to refine before saving them all to disk again.
      I'll add a note for internal discussion whether something can be done that may help updating asset thumbnails in batch.

      Kind regards,
      Peter
      Hi Peter,
      Thanks for your reply.

      I'm not creating vrmats via Vray for GH (is it even possible?). I'm just toying with code and rewriting parts that I understand. The supplier of textures also provided preview JPGs of materials. Can I embed a link to the supplied image or write the image data between <preview></preview> tags?

      Also, my other question would be if it is possible to add my own material folders/libraries into Categories in the left part of Vray UI.

      Thank you,
      Jonas

      Comment


      • #4
        1. You can convert an image to base64 and input the result between <preview> tags (see an existing .vrmat for reference). Referencing an image file directly is not possible.

        2. This will be possible in V-Ray Next for Rhino. Furthermore, the Library will be able to store all asset types (Materials/Textures/Lights/Geometry/REs).

        Kind regards,
        Peter
        Peter Chaushev
        V-Ray for SketchUp | V-Ray for Rhino | Product Owner
        www.chaos.com

        Comment

        Working...
        X