Combining Batch Rendering and Clipping Planes

Hi all,

I would like to batch render multiple views using clipping planes. Is that possible?

I basically have an architectural model and would like to render floor plans at different levels and several sections using batch rendering. However, as it’s ‘batch rendering’, I cannot each time set the clipping planes to be turned on or off.

Is there a way to make this work?

Hi Tsukasa -
There is no batch rendering in plain Rhino. If you are batch rendering now, that means that you are using some tool to do that, and, perhaps, you could request the developer of that tool to provide for that. Other than that, batch rendering with clipping planes is probably scriptable…

Hi @wim, thanks for making me realise that I forgot to mention I’m using V-Ray!
I subsequently changed the topic tags to ‘V-Ray’.

Not entirely true :slight_smile: There’s _BatchRenderNamedViews, however that won’t help here (:

1 Like

Disclaimer: I know absolutely nothing about rendering…

Is that because it doesn’t work with V-Ray?

It should work with V-Ray as well if it is set as the current render engine since the command uses _Render to initiate rendering.

The main part is

              _ = RhinoApp.RunScript($"-_NamedView _Restore \"{nv.Name}\" _Enter", false);
              _ = RhinoApp.RunScript($"_Render", false);
              _ = RhinoApp.RunScript($"-_SaveRenderWindowAs \"{filename}\" _Enter", false);
              _ = RhinoApp.RunScript($"_CloseRenderWindow ", false);

The reason it won’t work with clipping planes is that there is now way to hook into this command with other code to control clipping planes.

But one could set up named views and clipping planes, then loop over them in a script and use run script from that script to call these commands essentially.

Thanks so much @nathanletwory for investigating the issue!
I theoretically understood the issue/solution but will keep it to manually rendering it for now then aha

Really appreciate your help though!

… but named views include the clipping plane settings. So that should just work, then?

Ah, didn’t know that. One way to find out: try!

Don’t forget the “Snapshots” panel. :wink:
It comes in very handy for this purpose.

Oh I had never heard of this feature! Thanks for the piece of advice :relaxed:

1 Like

You go with snapshots. Setup your clipping planes for every snapshot, and then use the V-Ray Batch Render to render the snapshots.
_BatchRenderNamedViews may not work in principle with V-Ray, since the renderer always renders asynchronously. That command depends on _Render to return once the renderer finishes. However V-Ray will return once the renderer has started rendering.


Thank you so much Nikolay and sorry for my late reply.
When saving a snapshot, what should I tick when saving? Should I tick all or are there things that I definitely not need to save? And how may I select the correct clipping plane to be on for each snapshot?

Also, when batch rendering, at the moment, when I select a file after clicking on the Batch Render Panel, the list of saved views is displayed. Does it mean that snapshots will be displayed there together with the saved views if the selected file includes saved snapshots?


I can’t give you an exact recipe, since it depends on what you have in the model.
But for the simplest example you shall have the Clipping plane checkbox checked.
Here is what I have in my case

file attached:
cps.3dm (171.4 KB)

Thanks a lot it makes perfect sense! Last question (I think!), is it possible to batch render multiple snapshots but have different render output (eg. image width/height, or for example environmental fog on/off) for each snapshot?

Yes, you just need to record the V-Ray settings when making the snapshots. There is a separate checkbox for that

Looks like a simple named views batch rendering with clipping planes is possible:

There is no comfortable UI to connect named views and clipping planes, but it should work.

I’mtrying to use Snapshot with Vray but isn’t working.
Both are fully updated to the last version but when I add my scene with snapshots saved in the Batch tool doesn’t show the snapshot names.

Any hints?

(I may share the file on a private msg)


Your project is not saved:

Let’s make a thing clear. The V-Ray Batch Renderer is file-based batch renderer. Adding the current model via the shortcut menu, only adds the current file, and reads from that file, as it was saved last time.

When you click the play button it may close your file if the first file in the queue is not the currently opened file. That’s why you will get the “save your changes” message.

No no @Nikolay the file is saved.

To show you what’s happening I opened the file I need to batch render after saving it with the snapshots.

You can see that the file has 3 snapshots (saved) but not in the batch window.
Tomorrow I’ll send you the file.