Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: ART thread optimisation  (Read 11113 times)

thecolclough

  • Sr. Member
  • ****
  • Posts: 890
  • 3D Ignoramus 1988-2002, Anim8or User 2002-present.
    • View Profile
    • www.mattghc.com
ART thread optimisation
« on: September 30, 2021, 10:46:27 am »

another question for Steve...

the project mentioned in my previous thread includes some light bulbs in the scene, and i can see that the pixels occupied by the glass material take several times longer to render in ART compared to those occupied by simpler materials - which is to be expected.

as a side effect, this means that my 12-thread processor can blast through most of the render in a matter of seconds, but then a small number of threads (typically 2 to 6) get stuck working on the glass pixels for a few minutes while the rest of the CPU goes idle.  not much of an issue when rendering a single frame, but i need to output more than 5,000 of the darn things, so that'll be a lot of wasted core time :P

so here's what i was wondering: ART currently seems to divide up the image into blocks of 100x100 pixels (or thereabouts), and i was wondering if we could achieve more efficient CPU utilisation for bulk renders if that figure was changed to, say, 10x10 pixels per block?  or maybe make it user-configurable?
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile
Re: ART thread optimisation
« Reply #1 on: October 01, 2021, 08:00:17 am »

You can change the size of the rendering chunks. Make an int attribute (menu command Scene->Attributes dialog) named ChunkSize and set it the the size that you want. Note that there are extra computations for the pixels around each chunk so if you make it too small it could slow the render down.

You can also experiment with the attribute RayDepth to limit extremely deep rays tha can occur with some geometry.
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile
Re: ART thread optimisation
« Reply #2 on: October 01, 2021, 08:04:08 am »

Logged

thecolclough

  • Sr. Member
  • ****
  • Posts: 890
  • 3D Ignoramus 1988-2002, Anim8or User 2002-present.
    • View Profile
    • www.mattghc.com
Re: ART thread optimisation
« Reply #3 on: October 04, 2021, 12:27:18 pm »

ah, good to know.  i must have either missed that discussion when it first happened, or managed to forget about it =P

thanks Steve
Logged

ENSONIQ5

  • Hero Member
  • *****
  • Posts: 1012
    • View Profile
    • Mission Backup Earth
Re: ART thread optimisation
« Reply #4 on: October 05, 2021, 02:44:09 am »

Note that there are extra computations for the pixels around each chunk so if you make it too small it could slow the render down.

I frequently reduce chunk sizes in other renderers for the exact reason thecolclough stated, to ensure there's more than one or two threads left battling their way through a complicated bit of the scene at the end of a frame, and I've often wondered what disadvantages there were (if any) to small chunk sizes.  So this is good to know :)
Logged