Overview

The render progress UI has been redesigned to better reflect the ongoing progress during rendering. A "preparing" state has been added to the progress along with the previous "rendering", "done" and "failed" states. The preparing state now reflects the progress of the render job data being packaged and sent to the render server. Additionally, some UI changes have been made to give the UI a new look. The dialog itself has been changed from a dialog window to an application window, allowing it to be stretched and resized.

Compile Time Changes

redRenderJob.cm

The following fields have been added to the RedRenderJob class in order to calculate render job transfer progress:

Added: public bool jobTransferred;
Added: public int64 jobTransferProgress;
Added: public int64 jobTransferSize;

cm.core.red3D.redRenderJobDialog.cm

In order to allow resizing of the render progress dialog, it now extends AppWindow instead of DialogWindow.

Old: public class REDRenderJobDialog extends DialogWindow {...}
New: public class REDRenderJobDialog extends AppWindow {...}

Thus, the constructor has also been changed.

Old:
public constructor(Window parent) {
	super(parent, brush=labBoxBg, label=$RenderJobDialogCaption,
	      size=(100, 100), initVisible=false);
	build();
	autoPosition();
}
New:
public constructor(Window parent) {
	super(brush=labBoxBg, label=$RenderJobDialogCaption,
	      size=(100, 100), initVisible=false, appWinAsDialogParent=parent,
	      noMinimize=true, noMaximize=true);
	build();
	minSize = size;
	maxSize = (size.w * 2, (size.h.double * 1.5).int);
}

Finally, two fields have been added to constrain the window size.

Added: public sizeI mazSize;
Added: public sizeI minSize;

cm.core.red3D.redRenderJobItem.cm

Due to changes in UI a new constructor has been added to RedRenderJobItem.

Added:
    public constructor(str key, str label, color textColor, REDRenderJob job, sizeI barSize, SrcRef src=#:src) {
	super(key, label, textColor, src=src);
	this.job = job;
	total = 1;
	colorKey = "green";
	this.barSize = barSize;
	updateProgress(job.progress());
    }

REDRenderFrame do now support asking for more than depthMap. It's now possible to ask for other renderlayers now.

// redRenderFrame.cm, Class: REDRenderFrame
Old: public bool generateDepthMap;
New: private renderLayerType{} generateLayers();
New: extend public bool generateDepthMap();
New: extend public bool generateDiffuseMap();
New: extend public bool generateNormalMap();

OutputTile now uses LayerImagesData to store render result rather than ImageWithDepthData.

//tile.cm, Class: OutputTile
Old: public ImageWithDepthData image;
New: public LayerImagesData image;

RenderImageCache now uses LayerImagesData to store render result rather than ImageWithDepthData.

// renderImageCache.cm, Class: RenderImageCache
Old: final public ImageWithDepthData get(Url url)
New: final public LayerImagesData get(Url url)

Old: final public void put(Url url, ImageWithDepthData image)
New: final public void put(Url url, LayerImagesData image)

// renderImageCache.cm, Class: RenderImageCacheEntry
Old: public ImageWithDepthData image;
New: public LayerImagesData image;

Runtime/Behavior Changes

zrpcRenderChore.cm

Method processProtocol() has been updated to accurately calculate job transfer progress. If buffer size is used to calculate progress and the number of bytes packed is less than buffer size, progress will not be calculated correctly. Instead we compare the number of bytes packed.

Old:
extend package rpcStatus processProtocol() {
    (...)
    if (zcall.exec() == 0) {
	  if (job) job.packageProgress(packageToSend.first,
	                                packageToSend.last,
	                                factory.bufferSize,     
					factory.totalSize);
    (...)
}
New:
extend package rpcStatus processProtocol() {
    (...)
    if (zcall.exec() == 0) {
	  if (job) job.packageProgress(packageToSend.first,
	                                packageToSend.last,
					factory.bytesPacked.int,
					factory.totalSize);
    (...)
}