From 0da23f38dd37686399c869b82df0eb11c33fb027 Mon Sep 17 00:00:00 2001 From: yuanjiajia <1139393632@qq.com> Date: Fri, 9 Jun 2023 15:16:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B2=E6=9F=93=E6=B5=8B=E5=BC=8F=20?= =?UTF-8?q?=E6=A1=88=E4=BE=8B=20=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- examples/renderTest.php | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ac96889..a25d91e 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,8 @@ vendor.zip composer.lock /sceneTemplate/cacheFiles/* +/sceneTemplate/imageOut/* +/sceneTemplate/log/* /sceneTemplate/render.cfg -/sceneTemplate/render.log /sceneTemplate/scene.scn diff --git a/examples/renderTest.php b/examples/renderTest.php index 64171e4..34372bb 100644 --- a/examples/renderTest.php +++ b/examples/renderTest.php @@ -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";