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