Place V-Ray proxies using GH or Script?

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.

Thanks for any hints!

Got a file we can see? It’s hard to help without it.

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.

vray (20.4 KB)

Not sure if this is what you want to do, I will check your file.

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:

Export it, then load the vrscene in rhino.

Thanks, I didn’t realize that was possible.

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.

That’s as much as I can help you with :slight_smile: Good luck with the rest my friend.

1 Like

Thanks for taking the time, I really appreciate it. If I do end up finding a way, I will post it here. I am also on the Chaos Forum and asked a similar question there (Placing .vrmesh proxies using Grasshopper? - Chaos Forums)

What do you need to do to each proxy once in rhino?

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.

See: Proxy Mesh - V-Ray for Rhino - Global Site

  • 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.

1 Like