Browse Source

修改文件路径,加入渲示用的模型文件

master
yuanjiajia 3 years ago
parent
commit
79d0b46648
  1. 2
      .vscode/launch.json
  2. BIN
      DomeScene/map/SD-037.exr
  3. BIN
      DomeScene/map/env.png
  4. BIN
      DomeScene/map/方形阴影遮照.png
  5. BIN
      DomeScene/map/纯白242.png
  6. BIN
      DomeScene/ply/AnNiuYinZi.ply
  7. BIN
      DomeScene/ply/DengSeDengGuang.ply
  8. BIN
      DomeScene/ply/FaceLight000.ply
  9. BIN
      DomeScene/ply/FaceLight001.ply
  10. BIN
      DomeScene/ply/FaceLight002.ply
  11. BIN
      DomeScene/ply/FaceLight003.ply
  12. BIN
      DomeScene/ply/FaceLight004.ply
  13. BIN
      DomeScene/ply/FaceLight005.ply
  14. BIN
      DomeScene/ply/FaceLight006.ply
  15. BIN
      DomeScene/ply/JinShuAnNiuDiZuo.ply
  16. BIN
      DomeScene/ply/JinShuYinZi.ply
  17. BIN
      DomeScene/ply/JinShuZhenDongZhou.ply
  18. BIN
      DomeScene/ply/LanSeDengGuang.ply
  19. BIN
      DomeScene/ply/SanGuangDengZhao.ply
  20. BIN
      DomeScene/ply/ShuaMao001.ply
  21. BIN
      DomeScene/ply/ShuaMao002.ply
  22. BIN
      DomeScene/ply/ShuaMao003.ply
  23. BIN
      DomeScene/ply/ShuaMaoYangBen001.ply
  24. BIN
      DomeScene/ply/ShuaMaoYangBen002.ply
  25. BIN
      DomeScene/ply/ShuaMaoYangBenJinShuYuanGuan.ply
  26. BIN
      DomeScene/ply/ShuaMaoYangBenYinZi.ply
  27. BIN
      DomeScene/ply/SuLiaoDianZi.ply
  28. BIN
      DomeScene/ply/TouMingSuLiaoKe.ply
  29. BIN
      DomeScene/ply/YaShuaTou.ply
  30. BIN
      DomeScene/ply/YaShuaTouWenZi.ply
  31. BIN
      DomeScene/ply/YuanZhuXingSuLiaoKe.ply
  32. BIN
      DomeScene/ply/ground.ply
  33. 14
      examples/startDemo.php

2
.vscode/launch.json

@ -12,7 +12,7 @@
"name": "Launch currently open script", "name": "Launch currently open script",
"type": "php", "type": "php",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/examples/startDome.php",
"program": "${workspaceFolder}/examples/startDemo.php",
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"port": 9055 "port": 9055
} }

BIN
DomeScene/map/SD-037.exr

BIN
DomeScene/map/env.png

After

Width: 4000  |  Height: 2000  |  Size: 716 KiB

BIN
DomeScene/map/方形阴影遮照.png

After

Width: 3000  |  Height: 3000  |  Size: 70 KiB

BIN
DomeScene/map/纯白242.png

After

Width: 268  |  Height: 268  |  Size: 3.1 KiB

BIN
DomeScene/ply/AnNiuYinZi.ply

BIN
DomeScene/ply/DengSeDengGuang.ply

BIN
DomeScene/ply/FaceLight000.ply

BIN
DomeScene/ply/FaceLight001.ply

BIN
DomeScene/ply/FaceLight002.ply

BIN
DomeScene/ply/FaceLight003.ply

BIN
DomeScene/ply/FaceLight004.ply

BIN
DomeScene/ply/FaceLight005.ply

BIN
DomeScene/ply/FaceLight006.ply

BIN
DomeScene/ply/JinShuAnNiuDiZuo.ply

BIN
DomeScene/ply/JinShuYinZi.ply

BIN
DomeScene/ply/JinShuZhenDongZhou.ply

BIN
DomeScene/ply/LanSeDengGuang.ply

BIN
DomeScene/ply/SanGuangDengZhao.ply

BIN
DomeScene/ply/ShuaMao001.ply

BIN
DomeScene/ply/ShuaMao002.ply

BIN
DomeScene/ply/ShuaMao003.ply

BIN
DomeScene/ply/ShuaMaoYangBen001.ply

BIN
DomeScene/ply/ShuaMaoYangBen002.ply

BIN
DomeScene/ply/ShuaMaoYangBenJinShuYuanGuan.ply

BIN
DomeScene/ply/ShuaMaoYangBenYinZi.ply

BIN
DomeScene/ply/SuLiaoDianZi.ply

BIN
DomeScene/ply/TouMingSuLiaoKe.ply

BIN
DomeScene/ply/YaShuaTou.ply

BIN
DomeScene/ply/YaShuaTouWenZi.ply

BIN
DomeScene/ply/YuanZhuXingSuLiaoKe.ply

BIN
DomeScene/ply/ground.ply

14
examples/startDemo.php

@ -99,7 +99,7 @@ $materials->setEmission('1 1 1'); // 设置材质为一个自
$materials->emissionCfg = new lights\Emission( // 设置发光属性 $materials->emissionCfg = new lights\Emission( // 设置发光属性
[ [
'gain' => "8 8 8", // 设置发光增益 'gain' => "8 8 8", // 设置发光增益
'mapfile' => "SD-037.exr", // 加载一个光域文件
'mapfile' => "./map/SD-037.exr", // 加载一个光域文件
'gamma' => 1, // 设置校正光域文件的gamma值 'gamma' => 1, // 设置校正光域文件的gamma值
'storage' => "float" // 声明光域文件表示色值的数据类型 'storage' => "float" // 声明光域文件表示色值的数据类型
] ]
@ -130,7 +130,7 @@ $light = new lights\env\HdrImage( // new 一个环境光对
'gain' => "1.25 1.25 1.25", // 设置颜色增益 '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", '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 值 'gamma' => 1, // 设置一个校正全景图像文件的 gamma 值
'storage' => "byte" // 声明这个图像文件表示色值的数据类型 'storage' => "byte" // 声明这个图像文件表示色值的数据类型
] ]
@ -156,7 +156,7 @@ $mapping->useUVMapping2d( // 使用"uvmapping2d"类
$texture = new texture\procedural\ImageMap( // 创建一个纹理 $texture = new texture\procedural\ImageMap( // 创建一个纹理
[ [
'file' => "./方形阴影遮照.png", // 加载一个图像文件
'file' => "./map/方形阴影遮照.png", // 加载一个图像文件
'gain' => 0.6, // 设置颜色增益 'gain' => 0.6, // 设置颜色增益
'gamma' => 1, // 设置校正图像文件的gamma值 'gamma' => 1, // 设置校正图像文件的gamma值
] ]
@ -507,7 +507,7 @@ $img->effect[] = new render\effect\ToneMapLinear(); // 添加一亮度
$img->effect[] = new render\effect\Synthesis(); // 添加一个合成效果管线,使用默认参数 $img->effect[] = new render\effect\Synthesis(); // 添加一个合成效果管线,使用默认参数
$img->effect[] = new render\effect\BackgroundImg( // 添加一个背景图像,使用默认参数 $img->effect[] = new render\effect\BackgroundImg( // 添加一个背景图像,使用默认参数
[ [
'file' => "./纯白242.png"
'file' => "./map/纯白242.png"
] ]
); );
$img->effect[] = new render\effect\CammaCorrection(); // 添加一个 gamma 校正,,使用默认参数 $img->effect[] = new render\effect\CammaCorrection(); // 添加一个 gamma 校正,,使用默认参数
@ -519,12 +519,12 @@ $render .= $film;
// 五、输出场景文件 scene.scn,及渲染文件 render.cfg // 五、输出场景文件 scene.scn,及渲染文件 render.cfg
echo $scene; echo $scene;
$handle = fopen( "~/demo/scene.scn",'w+');
$handle = fopen( "./DemoScene/scene.scn",'w+');
fwrite($handle,$scene); fwrite($handle,$scene);
fclose($handle); fclose($handle);
echo $render ; echo $render ;
$handle = fopen( "~/demo/render.cfg",'w+');
$handle = fopen( "./DemoScene/render.cfg",'w+');
fwrite($handle,$render); fwrite($handle,$render);
fclose($handle); 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; $output;
$returnVar; $returnVar;
exec($cmd,$output,$returnVar); exec($cmd,$output,$returnVar);

Loading…
Cancel
Save