VRay Proxy Scattering with Grasshopper


Andy Warhol would hate this post.

We’ve enjoyed taking a look at the new version of VRay for Rhino and are especially excited about the addition of VRay proxies. In short, a proxy is a crude representation of a complex mesh geometry within modeling space. It’s linked to this mesh geometry, which is imported only at render time. This results in a significantly improved user experience as well as increased speed and complexity of renderings.

The component we’ve put together is similar to Forest Pack, a powerful 3ds Max plugin by iToo software. Like Forest Pack, our Python script offers proxy translation, scaling (1D/2D/3D), rotation, and jitter. The scattering process (executed with Rhinoscript) is slower than Forest Pack; but by keeping the tool within the grasshopper interface, we are able to control proxy parameters while applying them to complex surfaces.

The first test with the tool was a scatter of the classic Campbell’s soup can. We put together a Canstruction generator (for a possible future installation) and tested the proxy scatter at varying densities:

Our second test focused on testing the strength of the tool, so we applied it to a scene with unusually high polygon counts. Although not quite as fast as 3ds Max, the proxies worked pretty well when scattering a forest with millions of polygons:

While proxy scattering is a powerful tool for creating forests and soup can sculptures, it can also be implemented for visualization of architectural components. A modular system, ranging anywhere from a spider joint to the Cleveland Med Mart panels, can be navigated and edited much more quickly by using proxies as placeholders. This enables more robust digital models without the lag.

We realize this ability in VRay for Rhino is brand new, but would like to see more features in future versions. For example, if we could find a way of connecting modeled proxies between VRay for Rhino and VRay for 3ds Max, we would have a lot more control and flexibility in our vis work. Also, the proxy broke when more complex mesh transformations were applied to it (those outside of scale, rotate, and move). If proxies were compatible with something like the ApplyMeshUVN command, we could easily use them to panelize a morphed surface within Grasshopper. It would also be really helpful to vary material properties for each proxy instance.

These may be tall orders, so we’ll put them on the wish list for now. We can now create scenes with millions of polygons and still have parametric control within Grasshopper, so we’re pretty excited about that.

Update: Just found some spare time to get this out. Here is a working copy of the Vray Proxy Scatter for GH. It’s a pretty basic script using Python and Rhinoscript, so it can be edited and improved.

Obligatory disclaimer: the author does not guarantee that these parametric models are bug-free or that they will solve all of your problems. If you find bugs or have suggestions for improvements, please let us know.
Download lmnts_ProxyScatter, 123.56 kB
Download lmnts_ProxyScatter_legacy, 293.76 kB
 

22 Comments

  1. ivor says:

    “Also, the proxy broke when more complex mesh transformations were applied to it (those outside of scale, rotate, and move). If proxies were compatible with something like the ApplyMeshUVN command, we could easily use them to panelize a morphed surface within Grasshopper. It would also be really helpful to vary material properties for each proxy instance.”

    What you described here is what vraypattern does. Please see rendering.ru

  2. Matus says:

    Oh dear god! This is the most awesome thing I have ever seen. Hats off, guys!

  3. ekatzenstein says:

    Thanks Matus!

    Ivor, vray pattern is only for 3ds Max, correct? The intention here is compatibility with Rhino.

  4. clevie says:

    Awesomeness. Simply marvelous.

  5. Scott says:

    Great work. Any chance you’d be interested in posting the definition? =)

  6. ekatzenstein says:

    Thanks for your interest Scott. We’ve added the file in the page above. Enjoy!

  7. Great thing! Congratulation. Any plans for updating the script for Grasshopper 9? I can’t download older version and the script doesn’t work with version 9.

  8. My Grasshopper sais that the Python script is missing :(

  9. ekatzenstein says:

    Jakub,

    I’m running the definition with GH .9 and it seems to be working over here. Have you installed Python for Grasshopper?

    http://www.food4rhino.com/project/ghpython

    Also, remember Python for GH only works with Rhino 5.

  10. Dhruv says:

    This has to be the most awesome application of python!
    Brilliant Work.

  11. tomek gancarczyk says:

    hey,
    does it mean that when you render one animation frame, the proxies are loaded again and again (during every render)? So it slows down the complete render time does it? Because loading many copies of one proxy also takes some time? Please correct me if I’m wrong

  12. ekatzenstein says:

    Tomek,
    As far as I can tell, the VRay plugin loads proxies for each frame, whether you’re controlling them within Grasshopper or within Rhino. This doesn’t seem to be a significant part of the rendering time.

  13. chan says:

    Hello!
    Could you please explain to me how to control the density of the scatter within the given surface?
    It is the .9 version of GHopper

    Thanks!

  14. ekatzenstein says:

    Chan, we’ve updated the file with a density slider and a vertical plane option so the new download should answer your question.
    Erick

  15. SNDVL says:

    Hello I just downloaded your file and rhino has given me a message that says it was created by a newer version of rhino. I am running Rhino 4 with SR9. Was this created in version 5, and if it was is there a file that can be opened in rhino 4?

    Thank you! This would be a life saver.

  16. ekatzenstein says:

    SNDVL, just added a Rhino 4 version above. The Rhino file is really basic for the demo, but should give an idea for how the proxy scatter is setup.

  17. Swift says:

    Hi Ekatzenstein,

    Thanks so much for your this wonderful demo. I got it working just fine. However, I have been trying to find a way to simply place vRay proxy objects (without randomization, rotation, or scaling) at generated points in grasshopper, but when I do, all renders of the the bake just render the preview and not the original. Only the initial proxy object renders as expected.

    How did you manage to get your script to render the true geometry that the proxy object represents?

    Thanks!

  18. Swift says:

    Hi Ekatzenstein et all,

    Thanks for your great work. This post has been both helpful and interesting.
    However I am having some trouble trying to replicate a simpler version where a vray proxy is simply placed at a series of generated points. I can get grasshopper to place the proxy model at each point, but when I render Vray renders the proxy geometry and without material, instead of rendering the original that the proxy represents.

    No Scatter or randomness required, just placement by grasshopper while retaining rendering properties.

    Any help would be greatly appreciated!

  19. Swift says:

    My apologies for the multiple posts.

  20. ekatzenstein says:

    Swift,

    The Grasshopper component is copying the proxy from within Rhino. Baking geometry from Grasshopper won’t work because the proxy information doesn’t carry over. In order to avoid random rotation/scaling/etc., just plug a value of 1 into the corresponding inputs on the component.

    Hope this helps.

  21. Thank you very very much, this has been so useful for me.
    I had the same need of Swift, and I solved like you said in the previous comment Ekatzenstein.
    Fantastic.
    Thank you.

  22. Dharman says:

    Thanks for sharing this definition with us. It’s a fantastic use of the long awaited proxy!

    I have been having difficulty with the basePoints. The tree proxys I’m using have roots so that they can intersect with uneven terrain, this is problematic however, because in the cluster that feeds into the ProxyScatter python component, the basePoints are created from a bounding box, which results on the trees being completely above ground. Is there any way to extract a reference point from the proxy instead – like with blocks?

    I tried to do replace the points with a python component, however I soon realised that every python component within the lmnts_ProxyScatter.gh document runs like a script within rhino and actually bakes all geometry every time it runs. Has anyone else had this problem?

    I’m using 9.0014

Leave a Comment