Browse Source

渲染测式 案例 开发

master
yuanjiajia 1 year ago
parent
commit
7bc9ff7c83
  1. 26
      examples/renderTest.php

26
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()];

Loading…
Cancel
Save