Page 1 of 1

Instancing methods for fast renders

Posted: Mon Oct 12, 2009 4:17 pm
by RichG
I'm rendering a scene with thousands of glassy snow flakes which is taking a hell of a long time to clear up (I know it's a tough example for any render engine, let alone Maxwell). I'm exporting out of Cinema using a snowflake that I've made into a Maxwell instance and put into a Mograph Cloner. It all works fine, it's just taking ages to clear so I wondered if anyone had any tips for speed. I've already gone to AGS for the material with very little impact. I'm trying now to make them all editable and join them into a single mesh rather than thousands of separate ones. May be that I need to try the Ranch but are there any other tips out there?

Re: Instancing methods for fast renders

Posted: Mon Oct 12, 2009 4:20 pm
by mashium123
are those instances intersecting?

Re: Instancing methods for fast renders

Posted: Mon Oct 12, 2009 4:26 pm
by RichG
No there's quite a bit of air between.

Re: Instancing methods for fast renders

Posted: Mon Oct 12, 2009 4:46 pm
by mashium123
does it show the same effect, when you use an opaque material isntead of transparent ones? a plain color with roughness90, for example. just for the test of it.

Re: Instancing methods for fast renders

Posted: Mon Oct 12, 2009 4:49 pm
by RichG
Yeah, I tried a very snowy white (but below 240!) material which definitely cleared faster but was still taking days! I think it is the sheer number of items which is why I'm trying out a single object too.

Re: Instancing methods for fast renders

Posted: Mon Oct 12, 2009 4:53 pm
by MS
From my testing I made early I realised that one merged object was rendering much faster that a lot of separate clones/instances.

Re: Instancing methods for fast renders

Posted: Mon Oct 12, 2009 4:58 pm
by RichG
Great. It's worth the headache of connecting them all then.

Re: Instancing methods for fast renders

Posted: Mon Oct 12, 2009 9:09 pm
by MS
RichG wrote:Great. It's worth the headache of connecting them all then.
How many snow flakes you have in the scene?

Re: Instancing methods for fast renders

Posted: Mon Oct 12, 2009 10:09 pm
by RichG
3600 and they're about 10,000 polys each. Normally I'd make it editable, select them all by clicking on the null and going to select children then Connect. Takes Cinema a lot of thinking time so I thought about just exporting the Mograph as OBJ and reimporting as one piece but it loses the randomiser function. I've got it now anyway. I'll report whether there's much improvement.

Re: Instancing methods for fast renders

Posted: Thu Oct 29, 2009 2:47 am
by RichG
Sorry I forgot to report back on this. There was a massive speed increase by making one very large poly count object over lots of small ones. Of course, today's Maxwell update has apparently speeded up instances but I'm sure this is still faster.

Re: Instancing methods for fast renders

Posted: Thu Oct 29, 2009 10:01 am
by macray
could you give it a try and render both versions for the same amount of time and put them side by side to compare the images? I'd like to see the differences between 1 and many objects (and maybe you'll remember the render time so you could compare?)

Re: Instancing methods for fast renders

Posted: Thu Oct 29, 2009 11:05 am
by RichG
I will if I get a chance, plus I can't show anything until the job's live. I can tell you though that the instanced version was left for 3 days and barely made 10 samples but the single object version was clean enough at about 14 overnight. A dramatic difference.

Re: Instancing methods for fast renders

Posted: Thu Oct 29, 2009 2:42 pm
by JDHill
Tests I saw show that there is a *massive* speed increase in 2.0.1 with respect to intersecting instances. That said, there will always be a tradeoff between trying to have ten million instances of a blade of grass and having ten instances of a million-blade polygon-object patch. Same with hair. The reason is, as I have also said elsewhere, that the data-size of an instance can be many times larger than each blade of grass in the multi-blade patch. Each blade in the patch, if it is, say, a simple skinny rectangle, consists of just two triangles - conversely, an instance has a full set of transform data, material data, object properties data, name, etc., and this is all mostly redundant when each instance is identical to the next apart from position. So, consider each specific scenario and think of it in those terms in order to find what would be a reasonable proportion for source geometry to instances.

Re: Instancing methods for fast renders

Posted: Thu Oct 29, 2009 2:54 pm
by tom
RichG wrote:I can tell you though that the instanced version was left for 3 days and barely made 10 samples but the single object version was clean enough at about 14 overnight. A dramatic difference.
So, prepare yourself for a more dramatic improvement in speed this time ;) No joke!