diff --git a/.vscode/launch.json b/.vscode/launch.json index eb29118..327d8f4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,7 +12,7 @@ "name": "Launch currently open script", "type": "php", "request": "launch", - "program": "${workspaceFolder}/examples/startDome.php", + "program": "${workspaceFolder}/examples/startDemo.php", "cwd": "${workspaceFolder}", "port": 9055 } diff --git a/DomeScene/map/SD-037.exr b/DomeScene/map/SD-037.exr new file mode 100644 index 0000000..e5c2782 Binary files /dev/null and b/DomeScene/map/SD-037.exr differ diff --git a/DomeScene/map/env.png b/DomeScene/map/env.png new file mode 100644 index 0000000..b0aa992 Binary files /dev/null and b/DomeScene/map/env.png differ diff --git a/DomeScene/map/方形阴影遮照.png b/DomeScene/map/方形阴影遮照.png new file mode 100644 index 0000000..e7b06d2 Binary files /dev/null and b/DomeScene/map/方形阴影遮照.png differ diff --git a/DomeScene/map/纯白242.png b/DomeScene/map/纯白242.png new file mode 100644 index 0000000..6aa89c9 Binary files /dev/null and b/DomeScene/map/纯白242.png differ diff --git a/DomeScene/ply/AnNiuYinZi.ply b/DomeScene/ply/AnNiuYinZi.ply new file mode 100644 index 0000000..e99a9df Binary files /dev/null and b/DomeScene/ply/AnNiuYinZi.ply differ diff --git a/DomeScene/ply/DengSeDengGuang.ply b/DomeScene/ply/DengSeDengGuang.ply new file mode 100644 index 0000000..e9a5b04 Binary files /dev/null and b/DomeScene/ply/DengSeDengGuang.ply differ diff --git a/DomeScene/ply/FaceLight000.ply b/DomeScene/ply/FaceLight000.ply new file mode 100644 index 0000000..f9016aa Binary files /dev/null and b/DomeScene/ply/FaceLight000.ply differ diff --git a/DomeScene/ply/FaceLight001.ply b/DomeScene/ply/FaceLight001.ply new file mode 100644 index 0000000..2f6b86a Binary files /dev/null and b/DomeScene/ply/FaceLight001.ply differ diff --git a/DomeScene/ply/FaceLight002.ply b/DomeScene/ply/FaceLight002.ply new file mode 100644 index 0000000..512c083 Binary files /dev/null and b/DomeScene/ply/FaceLight002.ply differ diff --git a/DomeScene/ply/FaceLight003.ply b/DomeScene/ply/FaceLight003.ply new file mode 100644 index 0000000..8b1649a Binary files /dev/null and b/DomeScene/ply/FaceLight003.ply differ diff --git a/DomeScene/ply/FaceLight004.ply b/DomeScene/ply/FaceLight004.ply new file mode 100644 index 0000000..40e3ce4 Binary files /dev/null and b/DomeScene/ply/FaceLight004.ply differ diff --git a/DomeScene/ply/FaceLight005.ply b/DomeScene/ply/FaceLight005.ply new file mode 100644 index 0000000..8c8a94d Binary files /dev/null and b/DomeScene/ply/FaceLight005.ply differ diff --git a/DomeScene/ply/FaceLight006.ply b/DomeScene/ply/FaceLight006.ply new file mode 100644 index 0000000..b34ac23 Binary files /dev/null and b/DomeScene/ply/FaceLight006.ply differ diff --git a/DomeScene/ply/JinShuAnNiuDiZuo.ply b/DomeScene/ply/JinShuAnNiuDiZuo.ply new file mode 100644 index 0000000..f377341 Binary files /dev/null and b/DomeScene/ply/JinShuAnNiuDiZuo.ply differ diff --git a/DomeScene/ply/JinShuYinZi.ply b/DomeScene/ply/JinShuYinZi.ply new file mode 100644 index 0000000..28580ed Binary files /dev/null and b/DomeScene/ply/JinShuYinZi.ply differ diff --git a/DomeScene/ply/JinShuZhenDongZhou.ply b/DomeScene/ply/JinShuZhenDongZhou.ply new file mode 100644 index 0000000..be9d140 Binary files /dev/null and b/DomeScene/ply/JinShuZhenDongZhou.ply differ diff --git a/DomeScene/ply/LanSeDengGuang.ply b/DomeScene/ply/LanSeDengGuang.ply new file mode 100644 index 0000000..19caa29 Binary files /dev/null and b/DomeScene/ply/LanSeDengGuang.ply differ diff --git a/DomeScene/ply/SanGuangDengZhao.ply b/DomeScene/ply/SanGuangDengZhao.ply new file mode 100644 index 0000000..0dba384 Binary files /dev/null and b/DomeScene/ply/SanGuangDengZhao.ply differ diff --git a/DomeScene/ply/ShuaMao001.ply b/DomeScene/ply/ShuaMao001.ply new file mode 100644 index 0000000..eab5d90 Binary files /dev/null and b/DomeScene/ply/ShuaMao001.ply differ diff --git a/DomeScene/ply/ShuaMao002.ply b/DomeScene/ply/ShuaMao002.ply new file mode 100644 index 0000000..8ad13f3 Binary files /dev/null and b/DomeScene/ply/ShuaMao002.ply differ diff --git a/DomeScene/ply/ShuaMao003.ply b/DomeScene/ply/ShuaMao003.ply new file mode 100644 index 0000000..ac1a7f5 Binary files /dev/null and b/DomeScene/ply/ShuaMao003.ply differ diff --git a/DomeScene/ply/ShuaMaoYangBen001.ply b/DomeScene/ply/ShuaMaoYangBen001.ply new file mode 100644 index 0000000..e7321dc Binary files /dev/null and b/DomeScene/ply/ShuaMaoYangBen001.ply differ diff --git a/DomeScene/ply/ShuaMaoYangBen002.ply b/DomeScene/ply/ShuaMaoYangBen002.ply new file mode 100644 index 0000000..0f85d86 Binary files /dev/null and b/DomeScene/ply/ShuaMaoYangBen002.ply differ diff --git a/DomeScene/ply/ShuaMaoYangBenJinShuYuanGuan.ply b/DomeScene/ply/ShuaMaoYangBenJinShuYuanGuan.ply new file mode 100644 index 0000000..f582522 Binary files /dev/null and b/DomeScene/ply/ShuaMaoYangBenJinShuYuanGuan.ply differ diff --git a/DomeScene/ply/ShuaMaoYangBenYinZi.ply b/DomeScene/ply/ShuaMaoYangBenYinZi.ply new file mode 100644 index 0000000..52ceefa Binary files /dev/null and b/DomeScene/ply/ShuaMaoYangBenYinZi.ply differ diff --git a/DomeScene/ply/SuLiaoDianZi.ply b/DomeScene/ply/SuLiaoDianZi.ply new file mode 100644 index 0000000..96da095 Binary files /dev/null and b/DomeScene/ply/SuLiaoDianZi.ply differ diff --git a/DomeScene/ply/TouMingSuLiaoKe.ply b/DomeScene/ply/TouMingSuLiaoKe.ply new file mode 100644 index 0000000..444ad8f Binary files /dev/null and b/DomeScene/ply/TouMingSuLiaoKe.ply differ diff --git a/DomeScene/ply/YaShuaTou.ply b/DomeScene/ply/YaShuaTou.ply new file mode 100644 index 0000000..8d943d1 Binary files /dev/null and b/DomeScene/ply/YaShuaTou.ply differ diff --git a/DomeScene/ply/YaShuaTouWenZi.ply b/DomeScene/ply/YaShuaTouWenZi.ply new file mode 100644 index 0000000..1bce95a Binary files /dev/null and b/DomeScene/ply/YaShuaTouWenZi.ply differ diff --git a/DomeScene/ply/YuanZhuXingSuLiaoKe.ply b/DomeScene/ply/YuanZhuXingSuLiaoKe.ply new file mode 100644 index 0000000..5b9c565 Binary files /dev/null and b/DomeScene/ply/YuanZhuXingSuLiaoKe.ply differ diff --git a/DomeScene/ply/ground.ply b/DomeScene/ply/ground.ply new file mode 100644 index 0000000..dbd017b Binary files /dev/null and b/DomeScene/ply/ground.ply differ diff --git a/examples/startDemo.php b/examples/startDemo.php index 226fe5b..1c0a224 100644 --- a/examples/startDemo.php +++ b/examples/startDemo.php @@ -99,7 +99,7 @@ $materials->setEmission('1 1 1'); // 设置材质为一个自 $materials->emissionCfg = new lights\Emission( // 设置发光属性 [ 'gain' => "8 8 8", // 设置发光增益 - 'mapfile' => "SD-037.exr", // 加载一个光域文件 + 'mapfile' => "./map/SD-037.exr", // 加载一个光域文件 'gamma' => 1, // 设置校正光域文件的gamma值 'storage' => "float" // 声明光域文件表示色值的数据类型 ] @@ -130,7 +130,7 @@ $light = new lights\env\HdrImage( // new 一个环境光对 'gain' => "1.25 1.25 1.25", // 设置颜色增益 'transformation' => "0.1736481 -0.9848078 0 0 -0.9848078 -0.1736481 0 0 0 0 1 0 0 0 0 1", //设置对象变换 - 'file' => "./env.png", // 加载一个全景图像文件 + 'file' => "./map/env.png", // 加载一个全景图像文件 'gamma' => 1, // 设置一个校正全景图像文件的 gamma 值 'storage' => "byte" // 声明这个图像文件表示色值的数据类型 ] @@ -156,7 +156,7 @@ $mapping->useUVMapping2d( // 使用"uvmapping2d"类 $texture = new texture\procedural\ImageMap( // 创建一个纹理 [ - 'file' => "./方形阴影遮照.png", // 加载一个图像文件 + 'file' => "./map/方形阴影遮照.png", // 加载一个图像文件 'gain' => 0.6, // 设置颜色增益 'gamma' => 1, // 设置校正图像文件的gamma值 ] @@ -507,7 +507,7 @@ $img->effect[] = new render\effect\ToneMapLinear(); // 添加一亮度 $img->effect[] = new render\effect\Synthesis(); // 添加一个合成效果管线,使用默认参数 $img->effect[] = new render\effect\BackgroundImg( // 添加一个背景图像,使用默认参数 [ - 'file' => "./纯白242.png" + 'file' => "./map/纯白242.png" ] ); $img->effect[] = new render\effect\CammaCorrection(); // 添加一个 gamma 校正,,使用默认参数 @@ -519,12 +519,12 @@ $render .= $film; // 五、输出场景文件 scene.scn,及渲染文件 render.cfg echo $scene; -$handle = fopen( "~/demo/scene.scn",'w+'); +$handle = fopen( "./DemoScene/scene.scn",'w+'); fwrite($handle,$scene); fclose($handle); echo $render ; -$handle = fopen( "~/demo/render.cfg",'w+'); +$handle = fopen( "./DemoScene/render.cfg",'w+'); fwrite($handle,$render); fclose($handle); @@ -532,7 +532,7 @@ fclose($handle); // 六、启动渲染器 -$cmd = "luxcoreconsol -o ~/demo/render.cfg -f ~/demo/scene.scn 1>../render.log 2>&1"; +$cmd = "luxcoreconsol -o ./DemoScene/render.cfg -f ./DemoScene/scene.scn 1>./DemoScene/render.log 2>&1"; $output; $returnVar; exec($cmd,$output,$returnVar);