Notifications
Clear all

[Closed] Threading the render function…

Hi chaps,

Great to see someone doing some more research into this stuff, I only ever scratched the surface and gave up as I pretty much encountered the same limitations over non dotnet based functions. MultiThreading is something that my brain just gives up on after a while. I looked into it for my VB programming, and you should in theory be able to use the system.threading class in max but the background worker is just a simpler alternative that takes all of the nasty delegate handling out of the equation. My only bit i’d add is you have to be careful about what stuff gets passed between threads, nothing can be referenced from another thread that was created on a different thread without passing it via the correct delegate method. So with that primitve understanding of it i’d say that’s what is probably happening with the stuff errroring and hanging. Mental Ray must be pretty well threaded process already, so your guess is as good as mine as the what is actually happening at various points in the render process.

Sorry if thats a bit vague guys but thats about as far as I got with it too!

1 Reply
(@marcobrunetta)
Joined: 11 months ago

Posts: 0

Well I only found about it after reading your article, so thanks for that!. Right now I’m working on a script that adds controls to a flowLayoutPanel depending on some data, and being able to thread the control creation, so that the user does not have to wait for the whole process to finish has been extremely practical, and makes the script feel a lot more “professional”. I can see myself using this threading stuff a lot more in the future.

So…no threading for mental ray render…i thought that because thread a process that it’s going to be threaded also…it’s a bit weird, but i don’t understand why autodesk cannot let us continue working at the same time that mental is rendering, once you have exported the scene max can be free i think, all the work is done by mental wich is an external renderer well integrated, i’m only guessing, with that in mind progressive rendering can be a real thing even without the progressive rendering option of mental ray 3.7+ activate inside max…what a pitty hehe.

Cheers and thanks for the answer LoneRobot!

Page 2 / 2