- Sat Jul 14, 2018 8:07 pm
#397330
Hello,
I'm using following script for batch and progressive renderings of a single mxs-File with several cameras/ scenes on my station:
how to adapt the script so that it would work with extra sampling? I know have to configure the extra sampling parameters (Sampling Level, Custom alpha) in the mxs-File. But so far I didn't find a way that the script includes extra sampling. My script skills are too bad for that and I didn't find hints in the maxwell script documentation.
best regards
Daniel
I'm using following script for batch and progressive renderings of a single mxs-File with several cameras/ scenes on my station:
Code: Select all
now my question:var firstSceneIndex = 1;
var lastSceneIndex = 3;
var baseName = "E_";
var inputFile = "C:\Users\Daniel\Desktop\NGS-Rework\Render-exterior\NGS-R-103-exterior.mxs";
var outputFolder = "C:\Users\Daniel\Desktop\NGS-Rework\Render-exterior\output";
var initialSL = 5;
var finalSL = 15;
var slStep = 2;
var ResX = 1469;
var ResY = 720;
var currentSL = initialSL;
var i = 0;
var isRendering = 0;
var currentSceneIndex = firstSceneIndex;
RenderEvents["renderFinished()"].connect(renderHasFinished);
Maxwell.clearConsole();
//////////////////////////////////////////////////////////////////
while( currentSL <= finalSL )
{
currentSceneIndex = firstSceneIndex;
renderScene();
while( 1 )
{
if( isRendering == 0 )
{
break;
}
}
currentSL += slStep;
}
//////////////////////////////////////////////////////////////////
function renderScene()
{
while (currentSceneIndex <= lastSceneIndex)
{
renderCamera(currentSceneIndex);
while(1)
{
if(isRendering == 0)
{
break;
}
}
currentSceneIndex++;
}
}
//////////////////////////////////////////////////////////////////
function renderCamera(frameNumber)
{
var sceneName = baseName + frameNumber;
Maxwell.openMxs( inputFile );
var imagePath = outputFolder + "\" + sceneName + ".png";
var mxiPath = outputFolder + "\" + sceneName + ".mxi";
Mxi.setActiveCamera(sceneName);
if (Mxi.activeCameraName != sceneName)
{
Maxwell.print("The MXS contains no camera named '" + sceneName + "'!");
}
else
{
Maxwell.print("rendering Scene: " + sceneName + " until SL " + currentSL);
Scene.setCpuThreads(7)
Scene.setMxiPath( mxiPath);
Scene.setImagePath( imagePath );
Scene.setSamplingLevel( currentSL );
Mxi.setResX( ResX );
Mxi.setResY( ResY );
Scene.setResumeRenderEnabled( true );
isRendering = 1;
Maxwell.startRender();
}
}
//////////////////////////////////////////////////////////////////
function renderHasFinished()
{
isRendering = 0;
Maxwell.print( "Render finished!" );
}
how to adapt the script so that it would work with extra sampling? I know have to configure the extra sampling parameters (Sampling Level, Custom alpha) in the mxs-File. But so far I didn't find a way that the script includes extra sampling. My script skills are too bad for that and I didn't find hints in the maxwell script documentation.
best regards
Daniel