Is there any way to get progressbar text while rendering?

Is there any way to get progressbar text while rendering?

laoweiwei
Explorer Explorer
1,175 Views
9 Replies
Message 1 of 10

Is there any way to get progressbar text while rendering?

laoweiwei
Explorer
Explorer
Hi guys,

I’m trying to fetch the V-ray render process percentage number while rendering, I opened it via the script as follow :

render camera:$Camera001 vfb:off outputwidth:width outputheight:height outputFile:fileName progressbar:true cancelled:&cancelled

and the percentage just showed at the bottom of screen, but How could I read it??

Many thanks 

 

processbar.jpeg

 

=================================================

I ased the same question on CGTalk, it's link: CGTalk link 
=================================================
As Serejah suggested, now I can get the render process bar percentage number, but I still has no idea how to get the text that describe which stage the render job goes.
0 Likes
Accepted solutions (1)
1,176 Views
9 Replies
Replies (9)
Message 2 of 10

denisT.MaxDoctor
Advisor
Advisor

First, why do you need it?

 

0 Likes
Message 3 of 10

laoweiwei
Explorer
Explorer

We made a QT client for users to commit/review render jobs (these jobs will be executed on a certain server), since it shall take a long time to finish rendering, so we want to keep users informed of the rendering process.

0 Likes
Message 4 of 10

denisT.MaxDoctor
Advisor
Advisor

instead of reading percentage value from UI just ask the progress bar the value by sending the PBM_GETPOS message.

 

before that you should to know the progressbar's range... use PBM_GETRANGE message for it

 

 

(I hope we are talking about Windows)

0 Likes
Message 5 of 10

laoweiwei
Explorer
Explorer

Yeah, we are using Windows platform, I print PBM_GETPOS/PBM_GETRANGE in my script, and with PBM_GETPOS increasing, PBM_GETRANGE remains 100:

PBM_GETPOS>> 90
PBM_GETRANGE>> 100
PBM_GETPOS>> 90
PBM_GETRANGE>> 100
PBM_GETPOS>> 90
PBM_GETRANGE>> 100
PBM_GETPOS>> 91
PBM_GETRANGE>> 100
PBM_GETPOS>> 91
PBM_GETRANGE>> 100
PBM_GETPOS>> 91
PBM_GETRANGE>> 100
PBM_GETPOS>> 91
PBM_GETRANGE>> 100
PBM_GETPOS>> 92
PBM_GETRANGE>> 100

I think we might not talking about the same thing 😛

What I need is "Rendering image..." text at left bottom of my screenshot.

0 Likes
Message 6 of 10

denisT.MaxDoctor
Advisor
Advisor

@laoweiwei wrote:

...

how to get the text that describe which stage the render job goes.

Well, if Serejah could not find how, then apparently in no way ... 

 

look for another solution... monitor, for example, the folder for the appearance of a new image file... they have to create a file first, and then render to it.  ... they have to open a file for writing, maybe change during render, and close and save after render ends.

0 Likes
Message 7 of 10

Serejah
Advocate
Advocate

According to c++ sdk reference this progress title is set by .SetTitle method of RenderProgressCallback

I tried to get the instance of this callback from maxscript using c# via Interface8.GetRendProgressCallback method but it returns undefined, maybe it doesn't work because of being called not from the main thread (I called it from background worker thread) or If NULL, the renderer will use its default progress dialog, who knows

 

0 Likes
Message 8 of 10

denisT.MaxDoctor
Advisor
Advisor

@Serejah wrote:

According to c++ sdk reference this progress title is set by .SetTitle method of RenderProgressCallback

 


this is a different thing. it's about render window.

 

search ProgressStart in sdk help

0 Likes
Message 9 of 10

Serejah
Advocate
Advocate

Oh, indeed. How could I miss that. Thanks

 

Feels like it might be simpler to gain access to wxWindowNR control text of vray frame buffer instead of that progress bar label

0 Likes
Message 10 of 10

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

@Serejah wrote:

Feels like it might be simpler to gain access to wxWindowNR control text of vray frame buffer instead of that progress bar label


👍  good idea

 

speaking of progress control, I don't see any messages that could be hooked to get "the left side text" (progress bar caption)... it's most likely done by the drawing mechanics, so there's no chance of catching the content.

0 Likes