|
|
@ -53,13 +53,17 @@ echo $scene; |
|
|
|
//设置打印 “胶片” 配置参数
|
|
|
|
$film = new render\Film();//添加一个胶片,
|
|
|
|
|
|
|
|
$film->addImage( new render\Image(['type' => render\Image::TYPE_RGBA ]) ); //为胶片添加一个 RGBA类型 的图片输出
|
|
|
|
$film->addImage( new render\Image(['type' => render\Image::TYPE_MATERIAL_ID ]) );//为胶片添加一个 MATERIAL_ID类型 的图片输出
|
|
|
|
$img = new render\Image(); |
|
|
|
$img->effect = [new render\effect\Pretreatment(),new render\effect\ToneMapLinear(),new render\effect\CammaCorrection()]; |
|
|
|
$film->addImage($img); |
|
|
|
|
|
|
|
$img = new render\Image(); //创建一个默认类型的图片输出,
|
|
|
|
$img->effect = [new render\effect\NoiseReducerOIDN(),new render\effect\Pretreatment(),new render\effect\ToneMapLinear(),new render\effect\AnalogFilmSimulation(),new render\effect\CammaCorrection()]; //为图片添加效果管线处理
|
|
|
|
$film->addImage(new render\Image(['type' => 'ALBEDO'])); |
|
|
|
$film->addImage(new render\Image(['type' => 'AVG_SHADING_NORMAL'])); |
|
|
|
|
|
|
|
$img = new render\Image(); |
|
|
|
$img->effect = [new render\effect\NoiseReducerOIDN(),new render\effect\Pretreatment(),new render\effect\ToneMapLinear(),new render\effect\CammaCorrection()]; |
|
|
|
$film->addImage($img); |
|
|
|
|
|
|
|
$film->addImage($img); //将这个图片添加到胶片
|
|
|
|
|
|
|
|
echo $film; |
|
|
|
|
|
|
@ -89,17 +93,18 @@ $mix->amount = 0.6; //指定混合系数为 0.6 |
|
|
|
|
|
|
|
$obj->material = $mix; //为模型赋予这个混合材质
|
|
|
|
|
|
|
|
$scene->addObject($obj); //将模型添加到场景中
|
|
|
|
|
|
|
|
$scene->addobjects($obj); //将模型添加到场景中
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
//添加第二个模型
|
|
|
|
$obj = new objects\Objects( [ 'ply' => 'mesh-119.ply','appliedtransformation' => '1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1' ] ); //创建一个的模型,
|
|
|
|
$obj->material = new materials\Metal( ['fresnel' => "2517393611944Fresnel"] ); //为模型创建一个 金属 类型的材质
|
|
|
|
$scene->addObject($obj); //将模型添加到场景中
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
echo $scene; |
|
|
|
//echo $scene;
|
|
|
|
|
|
|
|
?>
|