|
|
@ -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); |
|
|
|
|
|
|
|