|
|
@ -301,16 +301,17 @@ $sceneCfg = new render\Scene(); |
|
|
|
$render .= $sceneCfg; |
|
|
|
|
|
|
|
|
|
|
|
$imageOutPath = $sceneTemplatePath.'/imageOut'; |
|
|
|
$film = new Film(); |
|
|
|
$film->width = 1024; |
|
|
|
$film->heigth = 1024; |
|
|
|
$img = new Image(); |
|
|
|
$img->effect = [new Pretreatment(),new ToneMapLinear(),new CammaCorrection()]; |
|
|
|
|
|
|
|
$film->addImage($img, $sceneTemplatePath); |
|
|
|
$film->addImage($img, $imageOutPath); |
|
|
|
|
|
|
|
$film->addImage(new Image(['type' => Image::TYPE_OBJECT_ID]), $sceneTemplatePath); |
|
|
|
$film->addImage(new Image(['type' => Image::TYPE_RGBA]), $sceneTemplatePath); |
|
|
|
$film->addImage(new Image(['type' => Image::TYPE_OBJECT_ID]), $imageOutPath); |
|
|
|
$film->addImage(new Image(['type' => Image::TYPE_RGBA]), $imageOutPath); |
|
|
|
|
|
|
|
$img = new Image(); |
|
|
|
$img->effect[] = new NoiseReducerOIDN(); |
|
|
@ -323,7 +324,7 @@ $img->effect[] = new BackgroundImg( |
|
|
|
] |
|
|
|
); |
|
|
|
$img->effect[] = new CammaCorrection(); |
|
|
|
$film->addImage($img, $sceneTemplatePath); |
|
|
|
$film->addImage($img, $imageOutPath); |
|
|
|
$render .= $film; |
|
|
|
|
|
|
|
|
|
|
@ -344,7 +345,7 @@ fclose($handle); |
|
|
|
// 六、启动渲染器
|
|
|
|
$cfgPath = $sceneTemplatePath . "/render.cfg"; |
|
|
|
$scenePath = $sceneTemplatePath . "/scene.scn"; |
|
|
|
$logPath = $sceneTemplatePath . "/render.log"; |
|
|
|
$logPath = $sceneTemplatePath . "/log/render.log"; |
|
|
|
|
|
|
|
$cmd = "luxcoreconsole -o " . $cfgPath . " -f " . $scenePath . " 1>" . $logPath . " 2>&1"; |
|
|
|
echo "\n".$cmd."\n"; |
|
|
|