Announcement

Collapse
No announcement yet.

Batch exporting proxy meshes in Grasshopper

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

  • Batch exporting proxy meshes in Grasshopper

    After experimenting with our grasshopper batch process to create multiple geometries I found the Vray timeline is actually quite handy instead of using a looping plugin like Anemone. Now rather than render the scene in Rhino, because - lets be honest - Rhino is pretty terrible for actually setting up scenes, we would just like to save the Vray proxies.

    No problem I thought, thats what the V-Ray Exporter node does. Well, its doesn't. It can do everything EXCEPT export multiple vray proxy meshes. Why? How is it any different to my right-clicking and exporting the Vray Proxy, except it does it for every frame of the animation?

    And speaking again of the right-clicking - don't do that. Its terrible usability and prohibits actually using the power of Grasshopper, which is to build complex systems where things can be created parametrically. And what you do when you hide functionality in right-click menu is break that parametric workflow. If you just had a boolean input for "Export" and one for "Export Type" (Single, Animation or Sequence) you wouldn't need any of the right-click options.

    Here in the description of the V-Ray Exporter you can see the 2 places where you even explain the limitations:
    Click image for larger version  Name:	vray_export.jpg Views:	1 Size:	299.6 KB ID:	1071200




    Instead if you had inputs:

    You attach a Grasshopper button and you can do normal Export. You can place that button anywhere you want. Normally in GH you have a little control area with all your inputs and buttons and so on. You can also add a button to the RCP Panel of Rhino, which is great.

    You attach a toggle and now when you run the animation it does it for every frame - either as single file, animation or sequence depending on the second input.

    That's 2 inputs and all of a sudden you are not breaking the power of Grasshopper, but you leave everything intact. Its still super easy and you can build it into your logic. Notice Elefronts "Bake" component. That has a button on the component and a boolean input. Easy. Imagine they also opted for the ridicolous right-click thing. Now for every frame I would already need to locate and right-click several components.

    What I think happened here is that you underestimate the kind of setups people build in Grasshopper. Us and many others have built huge intricate patches with thousands of components. There are loops, instancing and tons of other automations. Its usually not just the 20 nodes you show in the examples. And even there, there would be no harm in just sticking to the Grasshopper concepts. And I am sorry to say that right-clicking and triggering things is not one of them!! Its like building a function in code, but you can only use it in one specific place and not reference it from anywhere else. It would drive you mad and you would seriously question the developers sanity. But that's what you do if you hide functionality in right-click menus. Some very niche settings are okay, because you usually don't need to change those parametrically, but even those should be actually parametric.

    Here is what a normal sort of GH patch can look like. Now imagine I have to hunt down that exporter or renderer node just to right-click it and trigger something.
    Click image for larger version  Name:	normal_gh_patch.jpg Views:	2 Size:	988.6 KB ID:	1071204


    So please, please, please, fix this break in the UX of Grasshopper. You can still have the right-click options, but please add the proper parametric inputs to not have to rely on those! That way its still perfectly backwards compatible. Don't worry about adding a few extra inputs, its normal in Grasshopper and space is unlimited and there are tons of components with lots of different inputs. But that's kind of the point of Grasshopper.

    Thank you for considering or giving us a really compelling reason why it has to be like it is now!? And of course why we can't export a sequence of .vrmesh files!?
    Last edited by seltzdesign; 18-05-2020, 03:49 AM.

  • #2
    Hi seltzdesign

    Regarding the multiple vrmesh export, I believe this could be done with a C# or Python script access to V-Ray and a for loop of the ExportProxy method.
    Not sure if this is a suitable workflow in your case, however, the ExportSequence will also produce multiple vrscene files, which can be used as proxies.

    For more detailed information regarding V-Ray script access in Grasshopper, please visit https://docs.chaos.com/display/VRHIN...in+Grasshopper

    In respect to the right-click options, the main reason behind this design is the nature of Grasshopper and asynchronous communication in definitions. Nevertheless, the current design will be re-visited and new implementations will be introduced where possible.
    Last edited by tsvetomira.girginova; 31-08-2022, 03:42 AM.

    Comment


    • #3
      Hi georgi.georgiev

      Thanks for this Update. Yes, I tried it with the Script components and it seems to work fine. Since it is only one extra option and the emphasis seems to be to keep Vray for Grasshopper as simple as possible I would just add that option rather than going for the Script component. It seems a bit there is only super simple or scripting, but I think it would be nice to hit a middle-ground where even some more advanced options are available in the nodes. Like I said, having quite a lot of inputs for a component is very normal in Grasshopper once you get past the super simple nodes. From my experience over the years though most people that get into Grasshopper do pretty advanced stuff fairly quickly and using the Script nodes is not usually part of that - one of the main reasons people love Grasshopper is exactly because you DONT have to deal with Scripting and everything that comes with that (debugging, formatting, no trial and error).

      But I am glad to see that at least using Scripts we can access most things and that's what I ended up doing.

      In the scripting nodes, do you have a way to do a callback. So for example if I render an image is there a callback function that can send some sort of status or trigger once the rendering is done? There surely must be, since that's what you must use internally for the render animation loop.

      I know Grasshopper is not designed with asynchronous operations in mind. But if you can just set a script node to be "busy" till whatever it triggers is done (like rendering an image or exporting a mesh) and then outputs a status, so it can pass it downstream in Grasshopper than I don't see why it wouldn't work the same way a synchronous node would. There is some examples of that. Things like Elefront that interact with Rhino do that. But than I am not sure if things that are triggered in Rhino are considered asynchronous or not.

      Comment


      • #4
        Hi seltzdesign

        Originally posted by seltzdesign View Post
        It seems a bit there is only super simple or scripting, but I think it would be nice to hit a middle-ground where even some more advanced options are available in the nodes.
        In respect to the the advanced options of nodes, kindly note that V-Ray's plugins have a vast number of underlying options and in most cases it does not makes sense for them to be exposed.
        Regardless, could you please elaborate which options are missing and how they could be introduced into the workflow?

        Originally posted by seltzdesign View Post
        In the scripting nodes, do you have a way to do a callback. So for example if I render an image is there a callback function that can send some sort of status or trigger once the rendering is done? There surely must be, since that's what you must use internally for the render animation loop.
        Please be informed that callback functions are not exposed due to security concerns.

        Once again, thank you very much for the feedback! It is greatly appreciated!

        Comment

        Working...
        X