Browse Source

渲染测式 案例 开发

master
yuanjiajia 1 year ago
parent
commit
3e7e449372
  1. 64
      sceneTemplate/render.cfg
  2. 2072
      sceneTemplate/scene.scn
  3. 6
      src/utils/MatHelper.php

64
sceneTemplate/render.cfg

@ -0,0 +1,64 @@
renderengine.type = PATHOCL
renderengine.seed = 1
opencl.cpu.use = 0
opencl.gpu.use = 1
opencl.devices.select = 1
path.pathdepth.total = 16
path.pathdepth.diffuse = 8
path.pathdepth.glossy = 8
path.pathdepth.specular = 8
path.hybridbackforward.enable = 1
path.hybridbackforward.partition = 0
path.hybridbackforward.glossinessthreshold = 0.05
path.forceblackbackground.enable = 1
path.clamping.variance.maxvalue = 1000
sampler.type = SOBOL
sampler.sobol.overlapping = 32
sampler.sobol.super.sampling = 1
sampler.sobol.tile.size = 16
sampler.sobol.bucket.size = 1
sampler.sobol.adaptive.strength = 0.9
lightstrategy.type = LOG_POWER
filesaver.format = TXT
filesaver.renderengine.type = PATHGPU
batch.haltspp = 1000
batch.halttime = 0
scene.file = scene.scn
scene.epsilon.min = 1.0E-5
scene.epsilon.max = 0.1
film.width = 3000
film.heigth = 3000
film.opencl.enable = 1
film.opencl.device = 0
film.noiseestimation.warmup = 8
film.noiseestimation.step = 32
film.filter.type = NONE
film.filter.width = 1.5
film.imagepipelines.000.0.type = NOP
film.imagepipelines.000.1.type = TONEMAP_LINEAR
film.imagepipelines.000.1.scale = 1
film.imagepipelines.000.2.type = GAMMA_CORRECTION
film.imagepipelines.000.2.value = 2.2
film.imagepipelines.001.0.type = INTEL_OIDN
film.imagepipelines.001.0.oidnmemory = 6000
film.imagepipelines.001.0.sharpness = 0
film.imagepipelines.001.1.type = NOP
film.imagepipelines.001.2.type = TONEMAP_LINEAR
film.imagepipelines.001.2.scale = 1
film.imagepipelines.001.3.type = PREMULTIPLY_ALPHA
film.imagepipelines.001.4.type = BACKGROUND_IMG
film.imagepipelines.001.4.file = ./map/纯白242.png
film.imagepipelines.001.4.gamma = 2.2
film.imagepipelines.001.4.storage = byte
film.imagepipelines.001.5.type = GAMMA_CORRECTION
film.imagepipelines.001.5.value = 2.2
film.outputs.0.type = RGB_IMAGEPIPELINE
film.outputs.0.filename = ./DemoScene/RGB_IMAGEPIPELINE_0.png
film.outputs.0.index = 0
film.outputs.1.type = OBJECT_ID
film.outputs.1.filename = ./DemoScene/OBJECT_ID.png
film.outputs.2.type = RGBA
film.outputs.2.filename = ./DemoScene/RGBA.exr
film.outputs.3.type = RGB_IMAGEPIPELINE
film.outputs.3.filename = ./DemoScene/RGB_IMAGEPIPELINE_1.png
film.outputs.3.index = 1

2072
sceneTemplate/scene.scn
File diff suppressed because it is too large
View File

6
src/utils/MatHelper.php

@ -47,7 +47,7 @@ class MatHelper{
// 旋转角度 // 旋转角度
"0", "0",
// 缩放比例 // 缩放比例
`$textureScaleU $textureScaleV`,
"$textureScaleU $textureScaleV",
// 偏移量 // 偏移量
"0 0", "0 0",
); );
@ -73,7 +73,7 @@ class MatHelper{
); );
$roughnessTexture->mapping = $mapping; $roughnessTexture->mapping = $mapping;
$scene->registerTexture($roughnessTexture); $scene->registerTexture($roughnessTexture);
$material->setMetallic($roughnessTexture);
$material->setRoughness($roughnessTexture);
} }
if($matOriginal->matParams->bumpTexture){ if($matOriginal->matParams->bumpTexture){
$bumpTexture = new ImageMap( $bumpTexture = new ImageMap(
@ -117,7 +117,7 @@ class MatHelper{
static function createMatOfEmission(){ static function createMatOfEmission(){
} }
/** /**
* 十六进制颜色 转换为 浮点数颜色 * 十六进制颜色 转换为 浮点数颜色

Loading…
Cancel
Save