PDA

View Full Version : A better way to do multithreading, would it be in LW9 ?



JML
10-16-2005, 03:46 PM
since the core is being re-done, I was wondering if the way LW multithread is
going to stay the same or not. I hope it will change.

right now, when rendering with more than 1 thread,
LW seems to divide the picture into 2,4 or 8 segment, and assign each segment to different processor.

the problem with this (especially with dual CPU system) is that some scene will render a lot slower that what it should.
some segments being 'easier' to render than others,
depending on where the objects are in the scene, one of the processor might be doing nothing after finishing rendering its segments instead of helping the other cpu to finish the segments left.

a better way would be to do it like vray for example, where instead of segment, the image is divided into lots of little buckets (100x100 for example), and then each assigned to cpus.
this way all the image will be rendered with both cpu at 100%, no matter how the scene is..
(because the image is no longer divided into 8 big parts, but divided into 100 little parts..)

Captain Obvious
10-16-2005, 05:00 PM
I wouldn't mind if F9 turned into a bucket renderer, if it's possible. "Bucketing" seems to be a very easy way to get very good multithreading.

Architook
10-16-2005, 10:34 PM
LW seems to divide the picture into 2,4 or 8 segment, and assign each segment to different processor.

the problem with this (especially with dual CPU system) is that some scene will render a lot slower that what it should.


We always use 8 threads, even though we only have dual CPUs. It does shave a few seconds for exactly the reasons you said, especially the top stripes tend to be very fast since they're often empty sky. Using 8 stripes (not 2) solves this. It's not 100x100 size like you mention, but it's enough to solve the problem.

Mylenium
10-16-2005, 11:44 PM
since the core is being re-done, I was wondering if the way LW multithread is
going to stay the same or not. I hope it will change.

right now, when rendering with more than 1 thread,
LW seems to divide the picture into 2,4 or 8 segment, and assign each segment to different processor.

the problem with this (especially with dual CPU system) is that some scene will render a lot slower that what it should.
some segments being 'easier' to render than others,
depending on where the objects are in the scene, one of the processor might be doing nothing after finishing rendering its segments instead of helping the other cpu to finish the segments left.

a better way would be to do it like vray for example, where instead of segment, the image is divided into lots of little buckets (100x100 for example), and then each assigned to cpus.
this way all the image will be rendered with both cpu at 100%, no matter how the scene is..
(because the image is no longer divided into 8 big parts, but divided into 100 little parts..)

Technically it is already a bucket renderer (for instance limited region will only load the parts contained within its area) as some people have told me, it's just not very smart. I don't mind using the stripes method, but at least they should be permanently split dynamically as in Cinema 4D. Currently one CPU is always waiting for the other stripes to finish. If they made this smarter, they could have achieved rendering speedups even without rewriting their raytracing functions (not meaning that this isn't good also ;-)).

Mylenium

JML
10-17-2005, 07:23 AM
well , having a dual cpu system, with most scene, I usually get better result with 4 thread than 8. sometimes 2
and I'm not going to find out which number of thread works best every time I start a new project.

they should remove this thread thing and have the cpus decide what's best in order to finish the render as soon as possible. and make sure that while a cpu is working hard, the other one is not having tea.

if it stays the same then we should have an option in the camera property to split the scene into lots of limited regions.

(I was rendering a big project at 5400x3600, and of course having not enough memory (3GB) , I had to split the image in order to render it but did that with third party plugin outside LW.
it would be great if we could do that directly in LW. knowing LW has memory issue, to let us render something with lots of limited region, and then stitch it back after.)

going back to the threads stuff,
one of a limited region of the 5400x3600 image was rendered with 4 threads with screamernet,
at first in the task manager, it would say CPU load at 100% , and after a while, 25% (so only 1 CPU working !) what about the other cpu?!