Film - the bottleneck

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: Dade, jromang, tomb, zcott, coordinators

Re: Film - the bottleneck

Postby J the Ninja » Wed Dec 28, 2011 12:21 pm

I just tested the new code on this scene, to see how it would handle on a scene where film definitely wasn't the bottleneck:

gallery2.php?g2_itemId=16297

Old build with outlier rejection off and the tiled branch build both got 29ks/s on my 4 core xeon (with HT). So looks like speed loss from the tiling isn't an issue. :)
-Jason Stuff
User avatar
J the Ninja
Developer
 
Posts: 2509
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: Film - the bottleneck

Postby Lord Crc » Sun Jan 15, 2012 8:00 pm

Think I nailed the outlier rejection stuff.

I keep extra rows of outlier data for each tile for the area above and below a tile. If the contribution center falls outside the current tile, I look up using these "overlap rows", or add outliers to it. Since contributions which straddle tile boundaries are added to both tiles, this way the data is duplicated for the overlapping areas between tiles. Thus a thread can safely access all the data for one thread.

I'll need to test it some more but initial results look good. Using k=10 with a metal cube scene, I went from 30% cpu and 110kS/s to >98% cpu and 270kS/s. Results were almost identical for hybrid for this simple scene, as the high k made the outlier rejection the rendering bottleneck.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: Film - the bottleneck

Postby jeanphi » Mon Jan 16, 2012 5:22 am

Hi,

Great stuff! Thanks.

Jeanphi
jeanphi
Developer
 
Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

Re: Film - the bottleneck

Postby Lord Crc » Mon Jan 16, 2012 7:36 am

Thanks. I still have some difficulty with handling the tile extents correctly in all cases when outlier rejection is enabled, so I need to make this more robust. This is because the tile extents have to match up with the pixel filter normalized coordinates which is used for accessing the outlier rejection data. It's a bit tricky when the filter height is non-integral.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: Film - the bottleneck

Postby SATtva » Mon Jan 16, 2012 9:48 am

Fantastic work Lord!
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 7164
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: Film - the bottleneck

Postby B.Y.O.B. » Mon Jan 16, 2012 11:11 am

btw., is the tile size/the number of tiles static or automatically chosen or can it be set by the user? Could there be different performance on different systems with more/less tiles in some cases?
User avatar
B.Y.O.B.
Developer
 
Posts: 5177
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: Film - the bottleneck

Postby Lord Crc » Mon Jan 16, 2012 11:46 am

Since there is some overhead per tile border, there will be some optimum number of tiles for a given resolution on a given computer. However it doesn't seem to be THAT sensitive to this number. I will expose the number of tiles as a parameter.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: Film - the bottleneck

Postby Lord Crc » Sun Jan 22, 2012 6:01 am

I think I got it sorted now. I'll push what I have, but I'm not sure what the best approach for merging with main branch is. Should I start by pulling main into the test branch and merging there?
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: Film - the bottleneck

Postby jeanphi » Sun Jan 22, 2012 3:56 pm

Hi,

You can do it that way but eventually you'll need to merge the test branch into the default one. So it will be more straightforward to merge the test branch into the default directly.

Jeanphi
jeanphi
Developer
 
Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

Re: Film - the bottleneck

Postby Lord Crc » Fri Feb 03, 2012 11:00 am

I've merged the two and it seems to be running fine here so far. May be some tricksy issues left still but no immediate show stoppers as far as I can determine.

I may change the interfaces somewhat, not sure I'm entirely happy with them yet though. Want me to keep it in the test branch or? We could always back out without too much trouble, it only affects 6 files (3 h/cpp pairs).
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

PreviousNext

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 1 guest