Browse Source

渲染测式 案例 开发

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

7
examples/renderTest.php

@ -30,7 +30,7 @@ $taskModel = $taskScene->model;
/**
* 创建 Luxcore 材质
* 创建 Luxcore 材质
*/
function createLuxcoreMat($matOriginal, $textureScaleU, $textureScaleV, $scene){
switch($matOriginal->renderType){
@ -50,6 +50,7 @@ function createLuxcoreMat($matOriginal, $textureScaleU, $textureScaleV, $scene){
// 创建一个场景;
$scene = new Scene();
$sceneTemplatePath = dirname(dirname(__FILE__)) . "/sceneTemplate";
// 一、创建光场:
@ -289,12 +290,12 @@ $render .= $film;
// 五、输出场景文件 scene.scn,及渲染文件 render.cfg
echo $scene;
$handle = fopen( "./DemoScene/scene.scn",'w+');
$handle = fopen( $sceneTemplatePath . "/scene.scn",'w+');
fwrite($handle,$scene);
fclose($handle);
echo $render ;
$handle = fopen( "./DemoScene/render.cfg",'w+');
$handle = fopen( $sceneTemplatePath . "/render.cfg",'w+');
fwrite($handle,$render);
fclose($handle);

Loading…
Cancel
Save