From 7bc9ff7c83f4d13af1cb6de014236b0cc9b7123e Mon Sep 17 00:00:00 2001 From: yuanjiajia <1139393632@qq.com> Date: Thu, 8 Jun 2023 18:03:29 +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 --- examples/renderTest.php | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/examples/renderTest.php b/examples/renderTest.php index 8329150..64171e4 100644 --- a/examples/renderTest.php +++ b/examples/renderTest.php @@ -255,28 +255,16 @@ $target = $taskCamera->target; $target->x = $target->x * UNIT_CONVERSION_MM_TO_M; $target->y = $target->y * UNIT_CONVERSION_MM_TO_M; $target->z = $target->z * UNIT_CONVERSION_MM_TO_M; -$rotation = $taskCamera->rotation; -// $camera = new camera\Perspective( -// [ -// 'autovolumeEnable' => 0, -// 'lookatOrig' => "{$position->x} {$position->y} {$position->z}", -// 'lookatTarget' => "{$target->x} {$target->y} {$target->z}", -// 'up' => "{$rotation->x} {$rotation->y} {$rotation->z}", -// 'screenwindow' => "-1 1 -1 1", -// 'autofocusEnable' => 0, -// 'fieldofview' => $taskCamera->fov, -// 'cliphither' => 0.1, -// ] -// ); +$upVector = $taskCamera->upVector; $camera = new camera\Perspective( [ 'autovolumeEnable' => 0, - 'lookatOrig' => "-2 -3 1.4", - 'lookatTarget' => "-1.460702 -2.185458 1.186276", - 'up' => "0.1179874 0.1782052 0.976894", + 'lookatOrig' => "{$position->x} {$position->y} {$position->z}", + 'lookatTarget' => "{$target->x} {$target->y} {$target->z}", + 'up' => "{$upVector->x} {$upVector->y} {$upVector->z}", 'screenwindow' => "-1 1 -1 1", 'autofocusEnable' => 0, - 'fieldofview' => 39.59776, + 'fieldofview' => $taskCamera->fov, 'cliphither' => 0.1, ] ); @@ -314,8 +302,8 @@ $render .= $sceneCfg; $film = new Film(); -$film->width = 3000; -$film->heigth = 3000; +$film->width = 1024; +$film->heigth = 1024; $img = new Image(); $img->effect = [new Pretreatment(),new ToneMapLinear(),new CammaCorrection()];