Has anyone found a way to place a V-Ray Proxy mesh (.vrmesh) in Rhino using Grasshopper or Script? I have a ton of geometries I want to replace with Proxy Meshes. I can use Grasshopper to create the proxy mesh files no problem, but I can’t seem to find a way to actually place them.
Even the Rhino command “vrayProxyImport” just opens the V-Ray UI for placing proxies. In an additional twist you can’t even select multiple .vrmesh files and place one after the other. You have to do one at a time. Doing that for several hundred geometries is not sensible.
I am willing to use Python, RhinoScript, C#… whatever works.
Basically I want to provide a file path and some transformation or plane where to place the proxy.
I can attach some vray proxies for you to try, but this isn’t about a specific case where I need help, but a general question of how and more importantly IF it is possible, since I have not seen any documentation that means it is possible.
But then V-Ray proxies in Rhino have been around for at least 10 years and I refuse to believe there is no way to add a V-Ray Proxy mesh except for using the command and placing them one by one manually.
Thanks. But does it actually add the proxies to Rhino? Like do they appear in the V-Ray Asset Editor if you have not placed them manually? I believe the GH component only loads the geometry in GH, but doesn’t bake it to Rhino.
I need it where it actually places the proxy in Rhino.
You can see here that it loads it in GH, but it does not appear in the Asset Editor:
But the Proxies need to be individually selectable in Rhino. If I export as a .vrscene and then import that file in Rhino, they will all be stuck together in one file.
I also don’t see a way of importing a .vrscene file by script.
I am building a custom plugin with functionality we need here and the functions in the plugin only make sense if they don’t contain manual intermediate steps.
Because they will then each get put into a block instance. That way I can instance the V-Ray Proxies in Rhino and they will be actual instances in V-Ray.
V-Ray Proxy can be instanced by using the _Array command or Alt+drag the object in the Rhino viewport. This helps save memory as the .vrmesh file will be loaded only once regardless of the number of instances.
Copying and pasting a Proxy Mesh, however, creates copies that end up loading the same file multiple times. This should be avoided. A Proxy Mesh within a block definition will be loaded only once regardless of the number of block instances in the project. Therefore, copying and pasting block instances is a safe alternative method to copy/pasting the Proxy Mesh objects directly.
I get a file which will have a large number of blocks instanced, like a big pattern, made up of say 3 different blocks.
Now I want to use BlockReplace and replace the “normal” blocks with blocks that contain V-Ray Proxies and it will replace all instances. That way I can still control the material in V-Ray and render them efficiently.
I didn’t read the whole thread, but the solution is pretty trivial, just use the vrayProxyImport command non-interactively like: -vrayProxyImport "<some path here>\vray proxies\SL1_RG_05.vrmesh" 5,10,20 _Enter
this works from GH, python, command line,… from just about everywhere