Showing posts with label 3ds max 2014. Show all posts
Showing posts with label 3ds max 2014. Show all posts

2013-05-08

Get the Balance Right: mental ray thread priority in 3ds max 2014

Hello World!

As promised (but later than I promised), some news about the new 3ds Max 2014 release that may not be immediately obvious.

 One thing we changed in 3ds max 2014 was the thread priority of the mental ray render threads - they now default to "Below Normal", and when rendering in the background (i.e. via Backburner), one notch lower than that.

 Most people praise this, and say things like "Woohoo, I can finally read my email while rendering" or "When we use the sales departmens machines as render slaves, they don't even know we are doing it any more, mouhahaha, hahaha, ha ha ha haaaaaaaaaaaaaa"

However, once or twice someone says things like "Hey, my 3d screen saver on my render slave took all the CPU and now my render is still at 1% a week later, you suck!!"

So the question is - can this behaviour be changed?

YES IT CAN.

In your 3ds max directorys subdirectory "plugcfg_ln" you will find a file called "mentalray_cpu.ini", which is fairly self-explanatory, but reads something akin to this:
;
; - mentalray_cpu.ini
;
; Sets thread priority and thread count for mental ray renderer.
; Meaning of Thread Priority numbers are
;    0 == Normal
;   -1 == Below Normal
;   -2 == Lowest
; Meaning of Thread Count numbers are
;    0 == Use as many threads as there are cores
;    N == Use N threads
;   -N == Use as many threads as there are cores, minus N
;
[Threads]
;
; Settings for normal / interactive renders in the UI
;
;   Thread priority (defaults to -1 = "Below Normal")
RenderThreadPriority=-1
;   Thread count  (defaults to 0 = use all cores)
RenderThreadCount=0
;
; Settings for backburner / network renders
;
;   Thread priority (defaults to -2 = "Lowest")
BgRenderThreadPriority=-2
;   Thread count  (defaults to 0 = use all cores)
BgRenderThreadCount=0
As you can see, we can set both thread count and thread priority by fiddling with this file. [Note: this file is read at Startup, so any changing of it needs you to restart your Max!]

For thread priority we use the same parametrs as Windows does, where 0 is "same/Normal", -1 is "Below normal" and -2 is "Low". I advice you not to try a positive value, or you may not actually be able to move your mouse until the render completes....

For thread count, I made it such that if the value is zero, it does what it always did in the past - use all the cores.

However, if the value is positive, it will launch that number of threads - completely ignorind the number of cores on your machine. You can set it to 4 on an 8-core or 8 on a 4-core, doesn't matter, it's up to you - there may in some cases even be a benifit in using more threads than actual cores, but your mileage may vary.

Finally, if you set a negative value, it will take that many threads less than the available number of cores. This is really intended for the use case of using the accounting departments machines stealthily as render slaves.... leave them some CPU to do their spreadsheets on!


I hope this helps keeping your priorities straight!


/Z


2013-03-27

Launching the 2014 product line...

In case you missed it, tonight is a "launch event" for the 2014 products from Autodesk Media and Entertainment, which includes some work I've done. I will be blogging more in detail later about what we added. 

Here is the launch site:



The "Unfold" Event


You can also find the list of new features for 3ds Max. This is a very simplified list, though, and misses a LOT of stuff, like:

  • Unified Sampling
  • Image Based Lighting
  • iRay 3.1
  • Automatic Gamma Correction
  • And more...
It also skips a lot of the "Small Annoying Things" we've fixed in the last year (where in our team alone nearly a 100 'tiny little things' and bugs and whatnot have been slain. Like for example:
  • "Zoom about Mouse" is now the default - and works!
  • mental ray thread priority no longer hangs your computer!
  • New exception handling causes error handling to be much more robust
  • Bugfixes. Bugfixes! BUGFIXES!!
  • Etc. etc. etc.
Did we get to all I'd wanted to fix? For sure not. Max is a big product, and things like killing every bug related to gamma correction... well... that takes time :)

I'll blog on these things as we move forward. For now, have a fun Easter and enjoy the new release.

/Z