Page 1 of 1

Multi-threaded is version 6?

Posted: Wed Jun 17, 2009 6:21 pm
by rogermate
Yoda :wink: was wondering if version 6 now employs multi-threading?

I would think rendering would be much quicker now that there are all of these double core and quad core CPUs.

Couldn't find any mention of it on the web site.

Posted: Wed Jun 17, 2009 9:53 pm
by Lost Marble
The application uses multiple threads, but not the rendering function specifically. A multi-core CPU will not speed up the rendering process, but it will keep your computer more responsive so that you can keep working on your animation while a render is running.

Posted: Wed Jun 17, 2009 10:41 pm
by MikeHart
Lost Marble wrote:The application uses multiple threads, but not the rendering function specifically. A multi-core CPU will not speed up the rendering process, but it will keep your computer more responsive so that you can keep working on your animation while a render is running.
Interesting developers opinion. I guess then some 3D packages of mine just remove the sleep loop, once multicore usage is activated :)

Posted: Wed Jun 17, 2009 11:06 pm
by Lost Marble
Sorry, I guess my comment wasn't clear.

A multi-core CPU can speed up rendering, but only if an algorithm is written to take advantage of the multiple cores. The rendering process in Anime Studio is not written to use multiple cores, and hence you won't see a speedup in rendering in Anime Studio.

I wasn't making a general statement about multi-core CPUs. Taking advantage of multiple cores can definitely speed up rendering, but as of right now Anime Studio doesn't do that. That is something I plan to change in the future.

Posted: Wed Jun 17, 2009 11:26 pm
by Manu
I made a standalone batch render app for OS X 10.5. The current version is 0.8.

I was going to add support for multiple threads, but felt there was little to no demand for it so it has become a bit of abandon-ware on my HD.

All the multi threading would do is set off multiple renders at the same time, which only really makes sense if you have several scenes to render. I did test it out as a proof of concept, and it certainly does speed up rendering significantly.

But again, unless someone really needs this, I'm wont bother. Mike is already on the case and his solution is bound to be better than the hack I was going to create.

Posted: Thu Jun 18, 2009 2:14 am
by Darramouss
I'm glad to hear that you're looking to make use of multi-core computers, Mike!! I've got an 8 core Mac that would make light work of any render!!

If I could make a suggestion, when you change the program to take advantage of multi-cores could you make it so that the user can specify how many cores they wish to use, like Blender does? That way you could assign x number of cores for renders and save y number of cores for other takes you're doing.

Good work with ASP6, Mike.

Posted: Thu Jun 18, 2009 4:18 pm
by MikeHart
Lost Marble wrote:I wasn't making a general statement about multi-core CPUs. Taking advantage of multiple cores can definitely speed up rendering, but as of right now Anime Studio doesn't do that. That is something I plan to change in the future.
Nice, thatnks for clearing this up.

Posted: Sun Jun 21, 2009 9:04 pm
by rogermate
Lost Marble wrote:A multi-core CPU can speed up rendering, but only if an algorithm is written to take advantage of the multiple cores.
Technically speaking, the computer code merely needs to support multi-threading. The was a time when writing programs for parallel CPU architectures was quite a challenge.

The rendering of video is the epitome of an ideal candidate for multi-core PCs - which nearly every new PC for the last year or two has been. For the most part, rendering each frame is an independent action and can be done at the same time. The state variables which are changed from frame to frame can remain in a single thread - but they represent a small proportion of the total computation time.

MasterThread : handles "global" state variables - Single thread computes N frames into the future.
SceneRenderingThread[n] - Calculates each scene.

If scene n+1 requires state information from scene n, then the Scene redering code (now executed by StartThread) does two passes, the first to calculate updated "global" state changes which are returned to the MasterThread to pass onto the next thread, and the remaining (bulk) calculations are completed.

Anywho, I'd encourage the move to Multi-threading. Especially if you want to call it AS Pro.

Basic economic theory tells us that when you reduce the "cost" of higher quality animated renderings for artists using AS Pro, you will increase the supply of such renderings.

Granted, the todo list has lots of ideas.

Posted: Sun Jun 21, 2009 10:35 pm
by mytbyte
Lost Marble wrote: I wasn't making a general statement about multi-core CPUs. Taking advantage of multiple cores can definitely speed up rendering, but as of right now Anime Studio doesn't do that. That is something I plan to change in the future.
If you promise to do that soon, I primise will upgrade to the Pro version ASAP...it is a very needed feature indeed...I currently run 2 instances of Anime Studio and assign each one to a different CPU...but it is a bit tedious...LOL

Posted: Mon Jun 22, 2009 7:30 pm
by Lost Marble
mytbyte wrote:If you promise to do that soon...
Sorry, but although this is on the list of things I really want to do, I can't make any promises about when anything will happen. Priorities change, new issues come up, and a promised feature may have to slip. The best I can do is say that I'm aware of it, and it's something I really would like to do.

-Mike

Posted: Wed Jun 24, 2009 9:06 am
by keisern
If I remember correctly, we sometimes used the 'set affinity' option in the Task manager on our PC rendering machine. Basically we started two versions of the batch renderer and went into Task Manager, right-clicked on the batch processes and chose 'Set affinity' and let them use different CPUs. I believe this sped up our rendering, but was a hassle to set up every time.

You should give it a go if you need to render a lot of scenes on a PC. Maybe the mac also offer the same ability to choose which core to use?

Posted: Wed Jun 24, 2009 12:29 pm
by Darramouss
Unfortunately you can only run one instance of ASP6 at a time on a Mac. That kinda sucks. That's a Mac thing, not an ASP6 thing, though.

Posted: Wed Jun 24, 2009 12:37 pm
by Manu
Well, you can as many instances of this OS X batch renderer as you want. All you have to do is make copies of the app and run them simultaneously.

Posted: Wed Jun 24, 2009 12:45 pm
by ulrik
Darramouss wrote:Unfortunately you can only run one instance of ASP6 at a time on a Mac. That kinda sucks. That's a Mac thing, not an ASP6 thing, though.
If you make a copy of AS you're able to run them at the same time on a mac

Posted: Fri Jun 26, 2009 6:10 pm
by Lost Marble
Darramouss wrote:Unfortunately you can only run one instance of ASP6 at a time on a Mac. That kinda sucks. That's a Mac thing, not an ASP6 thing, though.
You can use multiple instances the command-line renderer on the Mac.