Blender渲染
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
2.5 KiB

  1. <?php
  2. namespace Blobt\Luxcore\scene;
  3. include dirname(dirname(__FILE__)) . "/vendor/autoload.php";
  4. // //设置打印 渲染引擎 的配置参数
  5. // $renderEngine = new render\RenderEngine();
  6. // echo $renderEngine;
  7. // //设置打印GPU渲染设备的配置参数
  8. // $openCL = new render\OpenCL();
  9. // echo $openCL;
  10. // //设置打印光线跟踪的配置参数
  11. // $path = new render\Path();
  12. // echo $path;
  13. // //设置打印 采样器 配置参数
  14. // $sampler = new render\Sampler();
  15. // echo $sampler;
  16. // //设置打印 灯光策略 配置参数
  17. // $lightStrategy = new render\LightStrategy();
  18. // echo $lightStrategy;
  19. // //设置打印 文件储存格式 配置参数
  20. // $filesaver = new render\FileSaver();
  21. // echo $filesaver;
  22. // //设置打印 渲染终止 配置参数
  23. // $batch = new render\Batch();
  24. // echo $batch;
  25. // //设置打印 场景属性 配置参数
  26. // $scene = new render\Scene();
  27. // echo $scene;
  28. // //设置打印 “胶片” 配置参数
  29. // $film = new render\Film();//添加一个胶片,
  30. // $img = new render\Image();
  31. // $img->effect = [new render\effect\Pretreatment(),new render\effect\ToneMapLinear(),new render\effect\CammaCorrection()];
  32. // $film->addImage($img);
  33. // $film->addImage(new render\Image(['type' => 'ALBEDO']));
  34. // $film->addImage(new render\Image(['type' => 'AVG_SHADING_NORMAL']));
  35. // $film->addImage(new render\Image(['type' => 'OBJECT_ID']));
  36. // $img = new render\Image();
  37. // $img->effect = [new render\effect\NoiseReducerOIDN(),new render\effect\Pretreatment(),new render\effect\ToneMapLinear(),new render\effect\CammaCorrection()];
  38. // $film->addImage($img);
  39. // echo $film;
  40. // class vector implements \JsonSerializable
  41. // {
  42. // public function __construct( $arr )
  43. // {
  44. // $this->array = $arr;
  45. // }
  46. // public function jsonSerialize()
  47. // {
  48. // return $this->array;
  49. // }
  50. // }
  51. // $test = [
  52. // "x" => "geeks",
  53. // "y" => "for",
  54. // "z" => "geeks"
  55. // ];
  56. // $test = new Gltf();
  57. // echo json_encode($test, JSON_PRETTY_PRINT);
  58. $rr = 'AACAPwAAgD8AAIA/AACAPwAAgD8AAIC/AACAvwAAgD8AAIC/AACAvwAAgD8AAIA/AAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAgPwAAgD4AACA/AAAAPwAAYD8AAAA/AABgPwAAgD4AAAEAAgAAAAIAAwA=';
  59. // echo base64_decode($rr);
  60. // $fileType = base64_decode($rr);
  61. $fileType = "\x04\x00\xa0\x00";
  62. echo $fileType;
  63. echo "\n\n";
  64. $rr = unpack("cchars/nint",$fileType);
  65. var_dump($rr);
  66. $str = 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==';
  67. echo base64_decode($str);
  68. ?>