RhinoCycles WIP ChangeQueue Week 13 - block instances and instance definitions

Hi all,

new video update on the work we’ve been doing past week. Work went into ensuring we can interactively render updates to instance definitions.

In this short video I use a tool (EditInstanceDefinition) that I started writing yesterday. It helps me to quickly modify an instance definition, without extra dialogs. I’d like to improve it to allow for a more extensive range of editing operations on a instance definition, but we’ll see how that turns out :smile:

/Nathan

And another quick one, better showing nested instance definitions:

/Nathan

1 Like

Hello Nathan-

I’m not too familiar with Cycles, but I think it will probably be able to render more instance definitions than Rhino will comfortably display. I’m not aware of any renderer for Rhino that has decoupled the instance definition with viewport visibility. This is something of a problem if you want to render 100000 trees, or something similar. It would be neat if we could generate many instances, only display a subset, but have all of them rendered. I think this would be possible by setting the .Visible attribute on the InstanceDefinition to False on most instances, but when you parse the document for the renderer, Cycles would still get the transform and render them. I did a quick test on a document that I have a block definition (bonsai.mxs), generated two instances and set one of the Visibility attribute to False:

instanceDefinition: bonsai.mxs
.Visible: True
.InstanceXform: R0=(-0.487496701371141,0.873124828505213,0,1193.84719278782), R1=(-0.873124828505213,-0.487496701371141,0,-582.94570758036), R2=(0,0,1.37878964439909,135.59426305481), R3=(0,0,0,1)
instanceDefinition: bonsai.mxs
.Visible: False
.InstanceXform: R0=(0.449694724335033,0.893182318961386,0,1071.66814536764), R1=(-0.893182318961386,0.449694724335033,0,-102.294510771534), R2=(0,0,1.24557809775955,16.070026306887), R3=(0,0,0,1)

So to me it seems that the document can hold the invisible blocks, and they never get drawn so I don’t incur the drawing overhead and my viewport never slows down, but a renderer could use the invisible instances if it knew to look for them. Maybe it would be possible to use a userString or some other method to indicate if it should be rendered so it would be a little safer than having invisible instances floating around in the document, but if that one little detail could be worked out then I think it would be of great benefit to Rhino users.

Do you already have a plan for something like this? Or maybe there is something in the WIP I’m not aware of?

I hope I explained myself well enough. Let me know if I didn’t.

Hi Natan,
I’m a V-Ray users but I’m looking to your work with lot of interest.
Don’t know if I will switch but that’s great to have a competitor.
I’ll do teaching also and some time my students ask me for an inexpensive solution for rendering because they don’t need pro images .
Rhino render never satisfied me. This looks the final solution.
I would like to just say: thanks for your work.

[quote=“nathancoatney, post:3, topic:18285, full:true”]
Hello Nathan-

I’m not too familiar with Cycles, but I think it will probably be able to render more instance definitions than Rhino will comfortably display.[/quote]

You’re probably quite right: 19 Billion Triangles Render - BlenderNation

[quote=“nathancoatney, post:3, topic:18285, full:true”]
I’m not aware of any renderer for Rhino that has decoupled the instance definition with viewport visibility. This is something of a problem if you want to render 100000 trees, or something similar. It would be neat if we could generate many instances, only display a subset, but have all of them rendered.[/quote]

I know still too little about these parts of Rhino, although for my block instance test (and instance definition editing) I’m trying to push as far as I can. Biggest scene I’ve done sofar is essentially 100k block instances. There are definitely some places to do optimisations. I don’t know yet how, but I wouldn’t be surprised if a way to do that can be created.

[quote=“nathancoatney, post:3, topic:18285, full:true”] I think this would be possible by setting the .Visible attribute on the InstanceDefinition to False on most instances, but when you parse the document for the renderer, Cycles would still get the transform and render them. I did a quick test on a document that I have a block definition (bonsai.mxs), generated two instances and set one of the Visibility attribute to False:

instanceDefinition: bonsai.mxs
.Visible: True
.InstanceXform: R0=(-0.487496701371141,0.873124828505213,0,1193.84719278782), R1=(-0.873124828505213,-0.487496701371141,0,-582.94570758036), R2=(0,0,1.37878964439909,135.59426305481), R3=(0,0,0,1)
instanceDefinition: bonsai.mxs
.Visible: False
.InstanceXform: R0=(0.449694724335033,0.893182318961386,0,1071.66814536764), R1=(-0.893182318961386,0.449694724335033,0,-102.294510771534), R2=(0,0,1.24557809775955,16.070026306887), R3=(0,0,0,1)

So to me it seems that the document can hold the invisible blocks, and they never get drawn so I don’t incur the drawing overhead and my viewport never slows down, but a renderer could use the invisible instances if it knew to look for them. Maybe it would be possible to use a userString or some other method to indicate if it should be rendered so it would be a little safer than having invisible instances floating around in the document, but if that one little detail could be worked out then I think it would be of great benefit to Rhino users.

Do you already have a plan for something like this? Or maybe there is something in the WIP I’m not aware of?[/quote]

Not a plan as such, but I’m sure we want to get the best out of this at some point.

I’m always happy to hear of potential users! Since you probably already know V-Ray in and out, I don’t think it is very useful to switch completely right away. Perhaps over time, if along the way you find RhinoCycles does all what you need… But as always, use the tools you know best :smile: (and perhaps learn here and there bits about other tools)

/Nathan

About the same here. I got 200k with just bbox in viewport but most users would consider that unusable viewport performance.

I did some experimenting and am having trouble deleting non-visible instance definitions with python. Maybe there is an underlying issue but I need to do more investigation.