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.

70 lines
1.7 KiB

  1. <?php
  2. namespace Blobt\Luxcore\scene;
  3. use Blobt\Luxcore\scene\materials\MaterialsBase;
  4. use Blobt\Luxcore\scene\objects\Objects;
  5. include dirname(dirname(__FILE__)) . "/vendor/autoload.php";
  6. /*
  7. //设置打印 渲染引擎 的配置参数
  8. $renderEngine = new RenderEngine();
  9. echo $renderEngine;
  10. //设置打印GPU渲染设备的配置参数
  11. $openCL = new OpenCL();
  12. echo $openCL;
  13. //设置打印光线跟踪的配置参数
  14. $path = new Path();
  15. echo $path;
  16. //设置打印 采样器 配置参数
  17. $sampler = new Sampler();
  18. echo $sampler;
  19. //设置打印 灯光策略 配置参数
  20. $lightStrategy = new LightStrategy();
  21. echo $lightStrategy;
  22. //设置打印 文件储存格式 配置参数
  23. $filesaver = new FileSaver();
  24. echo $filesaver;
  25. //设置打印 渲染终止 配置参数
  26. $batch = new Batch();
  27. echo $batch;
  28. //设置打印 场景属性 配置参数
  29. $scene = new Scene();
  30. echo $scene;
  31. //设置打印 “胶片” 配置参数
  32. $film = new Film();
  33. $film->outputs[] = new file\ImageSaver(['type' => file\ImageSaver::TYPE_RGBA ]);
  34. $film->outputs[] = new file\ImageSaver(['type' => file\ImageSaver::TYPE_MATERIAL_ID ]);
  35. $film->outputs[] = new file\ImageSaver(['index' => 5 ]);
  36. $film->imagepipelines[5] = [new effect\NoiseReducerOIDN(),new effect\Pretreatment(),new effect\ToneMapLinear(),new effect\AnalogFilmSimulation(),new effect\CammaCorrection()];
  37. echo $film;
  38. */
  39. $scene = new Scene();//创建一个场景,
  40. $scene->objects[0] = new Objects();//在场景中创建一个编号为0的模型,
  41. $scene->materials[7] = new MaterialsBase();//在场景中创建一个编号为7的材质,
  42. $scene->objects[0]->material = 7;//给编号为0的模型,添加编号为7的材质
  43. echo $scene;
  44. ?>