Skip to content

Commit

Permalink
add cornell box with mirror test
Browse files Browse the repository at this point in the history
  • Loading branch information
FROL256 committed Feb 26, 2019
1 parent b2f0ed3 commit 5c5d369
Show file tree
Hide file tree
Showing 9 changed files with 306 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"request": "launch",
"program": "${workspaceFolder}/cmake-build-release/hydra_app/hydra",
"args" : ["-nowindow", "0",
"-saveinterval", "300",
"-enable_mlt", "0"],
"-saveinterval", "60",
"-enable_mlt", "1"],
// "-out", "/home/frol/temp/test_out/image.png",
// "-outall", "/home/frol/temp/test_out/gbuff",
// "-outdir", "/home/frol/temp/test_out/imgseq",
Expand Down
30 changes: 5 additions & 25 deletions hydra_app/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,17 @@ Input::Input()
g_hydraApiDisableSceneLoadInfo = true;

//noWindow = false; ///< run 'console_main', else run 'window_main'
inLibraryPath = "tests/test_42"; ///< cornell box with teapot
//inLibraryPath = "tests/test_42"; ///< cornell box with teapot
inLibraryPath = "tests/test_42_with_mirror";
//inLibraryPath = "tests/test_223_small"; ///< cornell box with sphere
//inLibraryPath = "tests/test_224_sphere";
//inLibraryPath = "tests/test_224_sphere_microfacet";
//inLibraryPath = "/media/frol/886234F06234E49A/scenes/benchmark4"; ///< cornell box with mirror glossy back wall
//inLibraryPath = "/media/frol/886234F06234E49A/scenes/phong_test/torspar1";
//inLibraryPath = "/media/frol/886234F06234E49A/scenes/cornell_water";
//inLibraryPath = "tests/test_pool";
//inLibraryPath = "/home/frol/temp/suncg1_scenelib/statex_00003.xml";
//inLibraryPath = "/home/frol/PROG/HydraAPI/main/tests_f/test_204";
//inLibraryPath = "/home/frol/temp/MMLT_notCaustics_scenelib";

//inLibraryPath = "/home/frol/PROG/HydraAPI/main/tests/test_86";
//inLibraryPath = "/home/frol/temp/hydra_debug_scene";
//inLibraryPath = "/home/frol/PROG/HydraAPI/main/tests_f/test_202";
//inLibraryPath = "/home/frol/PROG/HydraAPI/main/tests/test_44";
//inLibraryPath = "/home/frol/yandexdisk/samsungdata/HeadlampLights/SimpleLightModel/scenelib_sphere";
//inLibraryPath = "/home/frol/yandexdisk/samsungdata/HeadlampLights/SimpleLightModel/scenelib_rectangle";

//inLibraryPath = "D:/[archive]/2017/HydraAPP/hydra_app/tests/hydra_benchmark_07";
//inLibraryPath = "D:/[archive]/2017/HydraOldRepo/HydraAPP/home/frol/hydra/rendered_images/a_3602.png/hydra_app/tests/hydra_benchmark_07";
//inLibraryPath = "/home/frol/PROG/HydraAPI/main/tests/test_77";
//inLibraryPath = "/home/frol/PROG/HydraAPI/main/tests_f/test_403";

//inLibraryPath = "C:/[Hydra]/pluginFiles/scenelib";
//inLibraryPath = "/media/frol/6E0467C0046789C3/[Hydra]/pluginFiles/scenelib";
//inLibraryPath = "D:/temp/scenelib/";
//inLibraryPath = "/home/frol/PROG/HydraAPI/main/tests/test_76";
//inLibraryPath = "/home/frol/temp/scenelib";
//inLibraryPath = "/home/frol/temp/scenelib_thinSphere";
//inLibraryPath = "/home/frol/PROG/HydraCore/hydra_app/tests/test_pool";

inDevelopment = false; ///< recompile shaders each time; note that nvidia have their own shader cache!
inDevelopment = true; ///< recompile shaders each time; note that nvidia have their own shader cache!
inDeviceId = 0; ///< opencl device id
cpuFB = true; ///< store frame buffer on CPU. Automaticly enabled if
enableMLT = false; ///< if use MMLT, you MUST enable it early, when render process just started (here or via command line).
Expand Down
2 changes: 1 addition & 1 deletion hydra_app/tests/test_42/statex_00001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<diff_trace_depth>3</diff_trace_depth>
<maxRaysPerPixel>4096</maxRaysPerPixel>
<draw_tiles>0</draw_tiles>
<qmc_variant>0</qmc_variant>
<qmc_variant>7</qmc_variant>
</render_settings>
</render_lib>
<scenes>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
298 changes: 298 additions & 0 deletions hydra_app/tests/test_42_with_mirror/statex_00001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,298 @@
<?xml version="1.0"?>
<textures_lib total_chunks="5">
<texture id="0" name="Map#0" loc="data/chunk_00000.image4ub" offset="8" bytesize="16" width="2" height="2" dl="0" />
</textures_lib>
<materials_lib>
<material id="0" name="grayOverrideMat" type="hydra_material">
<diffuse brdf_type="lambert">
<color val="0.5 0.5 0.5" />
</diffuse>
</material>
<material id="1" name="grayOverrideMat" type="hydra_material">
<diffuse brdf_type="lambert">
<color val="0.5 0.5 0.5" />
</diffuse>
</material>
<material id="2" name="hydra_placeholder_material" type="hydra_material">
<diffuse brdf_type="lambert">
<color>0.078 0.0 0.156</color>
</diffuse>
</material>
<material id="3" name="Green" type="hydra_material">
<emission>
<color val="0 0 0" />
<cast_gi val="1" />
</emission>
<diffuse brdf_type="lambert">
<color val="0.0196078 0.352941 0.0196078" />
<roughness val="0" />
</diffuse>
<reflectivity brdf_type="phong">
<extrusion val="luminance" />
<color val="0 0 0" />
<glossiness val="0.100000001" />
<fresnel val="0" />
<fresnel_ior val="1.5" />
</reflectivity>
<transparency brdf_type="phong">
<color val="0 0 0" />
<glossiness val="1" />
<thin_walled val="0" />
<fog_color val="1 1 1" />
<fog_multiplier val="0" />
<ior val="1.5" />
</transparency>
<opacity smooth="0">
<skip_shadow val="0" />
</opacity>
<translucency>
<color val="0 0 0" />
<multiplier val="0" />
</translucency>
</material>
<material id="4" name="White" type="hydra_material">
<emission>
<color val="0 0 0" />
<cast_gi val="1" />
</emission>
<diffuse brdf_type="lambert">
<color val="0.501961 0.501961 0.501961" />
<roughness val="0" />
</diffuse>
<reflectivity brdf_type="phong">
<extrusion val="luminance" />
<color val="0 0 0" />
<glossiness val="0.100000001" />
<fresnel val="0" />
<fresnel_ior val="1.5" />
</reflectivity>
<transparency brdf_type="phong">
<color val="0 0 0" />
<glossiness val="1" />
<thin_walled val="0" />
<fog_color val="1 1 1" />
<fog_multiplier val="0" />
<ior val="1.5" />
</transparency>
<opacity smooth="0">
<skip_shadow val="0" />
</opacity>
<translucency>
<color val="0 0 0" />
<multiplier val="0" />
</translucency>
</material>
<material id="5" name="Red" type="hydra_material">
<emission>
<color val="0 0 0" />
<cast_gi val="1" />
</emission>
<diffuse brdf_type="lambert">
<color val="0.352941 0.0196078 0.0196078" />
<roughness val="0" />
</diffuse>
<reflectivity brdf_type="phong">
<extrusion val="luminance" />
<color val="0 0 0" />
<glossiness val="0.100000001" />
<fresnel val="0" />
<fresnel_ior val="1.5" />
</reflectivity>
<transparency brdf_type="phong">
<color val="0 0 0" />
<glossiness val="1" />
<thin_walled val="0" />
<fog_color val="1 1 1" />
<fog_multiplier val="0" />
<ior val="1.5" />
</transparency>
<opacity smooth="0">
<skip_shadow val="0" />
</opacity>
<translucency>
<color val="0 0 0" />
<multiplier val="0" />
</translucency>
</material>
<material id="6" name="teaport_material" type="hydra_material">
<emission>
<color val="0 0 0" />
<cast_gi val="1" />
</emission>
<diffuse brdf_type="lambert">
<color val="0.207843 0.188235 0" />
<roughness val="0" />
</diffuse>
<reflectivity brdf_type="phong">
<extrusion val="luminance" />
<color val="0.367059 0.345882 0" />
<glossiness val="0.720000029" />
<fresnel val="0" />
<fresnel_ior val="1.5" />
</reflectivity>
<transparency brdf_type="phong">
<color val="0 0 0" />
<glossiness val="1" />
<thin_walled val="0" />
<fog_color val="1 1 1" />
<fog_multiplier val="0" />
<ior val="1.5" />
</transparency>
<opacity smooth="0">
<skip_shadow val="0" />
</opacity>
<translucency>
<color val="0 0 0" />
<multiplier val="0" />
</translucency>
</material>
<material id="7" name="08 - Default" type="hydra_material">
<emission>
<color val="0 0 0" />
<cast_gi val="1" />
</emission>
<diffuse brdf_type="lambert">
<color val="0 0 0" />
<roughness val="0" />
</diffuse>
<reflectivity brdf_type="phong">
<extrusion val="maxcolor" />
<color val="0.75 0.75 0.75" />
<glossiness val="1" />
<fresnel val="0" />
<fresnel_ior val="1.5" />
</reflectivity>
<transparency brdf_type="phong">
<color val="0 0 0" />
<glossiness val="1" />
<thin_walled val="0" />
<fog_color val="1 1 1" />
<fog_multiplier val="0" />
<ior val="1.5" />
</transparency>
<opacity smooth="0">
<skip_shadow val="0" />
</opacity>
<translucency>
<color val="0 0 0" />
<multiplier val="0" />
</translucency>
</material>
<material id="8" name="environment_material" type="hydra_material" light_id="0" visible="1">
<emission>
<color val="0 0 0" />
</emission>
</material>
<material id="9" name="TPhotometricLight001_material" type="hydra_material" light_id="1" visible="1">
<emission>
<color val="9.88522 9.88522 9.88522" />
</emission>
</material>
</materials_lib>
<lights_lib>
<light id="0" name="environment" type="sky" shape="point" distribution="uniform" visible="1" mat_id="8">
<intensity>
<color val="0 0 0" />
<multiplier val="1" />
</intensity>
</light>
<light id="1" name="TPhotometricLight001" type="area" shape="rect" distribution="diffuse" visible="1" mat_id="9" mesh_id="3">
<intensity>
<multiplier val="9.88522434" />
<color val="1 1 1" />
</intensity>
<size radius="0.355599999" half_length="0.355599999" half_width="0.355599999" />
</light>
</lights_lib>
<cam_lib>
<camera id="0" name="Camera001" type="uvn">
<fov>39.5977554</fov>
<nearClipPlane>0.00999999978</nearClipPlane>
<farClipPlane>100</farClipPlane>
<up>0 1 1.62921e-07</up>
<position>0 0 4.50035</position>
<look_at>0 1.62921e-05 -95.4996</look_at>
<tiltRotX>0</tiltRotX>
<tiltRotY>0</tiltRotY>
<tiltShiftX>0</tiltShiftX>
<tiltShiftY>0</tiltShiftY>
<enable_dof>0</enable_dof>
</camera>
</cam_lib>
<geometry_lib total_chunks="5">
<mesh id="0" name="Box01" type="vsgf" bytesize="1304" loc="data/chunk_00001.vsgf" offset="0" vertNum="20" triNum="10" dl="0" path="" bbox="3.40282e+38 -3.40282e+38 3.40282e+38 -3.40282e+38 3.40282e+38 -3.40282e+38">
<positions type="array4f" bytesize="320" offset="24" apply="vertex" />
<normals type="array4f" bytesize="320" offset="344" apply="vertex" />
<tangents type="array4f" bytesize="320" offset="664" apply="vertex" />
<texcoords type="array2f" bytesize="160" offset="984" apply="vertex" />
<indices type="array1i" bytesize="120" offset="1144" apply="tlist" />
<matindices type="array1i" bytesize="40" offset="1264" apply="primitive" />
</mesh>
<mesh id="1" name="Teapot01" type="vsgf" bytesize="3379192" loc="data/chunk_00002.vsgf" offset="0" vertNum="53028" triNum="25600" dl="0" path="" bbox="3.40282e+38 -3.40282e+38 3.40282e+38 -3.40282e+38 3.40282e+38 -3.40282e+38">
<positions type="array4f" bytesize="848448" offset="24" apply="vertex" />
<normals type="array4f" bytesize="848448" offset="848472" apply="vertex" />
<tangents type="array4f" bytesize="848448" offset="1696920" apply="vertex" />
<texcoords type="array2f" bytesize="424224" offset="2545368" apply="vertex" />
<indices type="array1i" bytesize="307200" offset="2969592" apply="tlist" />
<matindices type="array1i" bytesize="102400" offset="3276792" apply="primitive" />
</mesh>
<mesh id="2" name="Plane001" type="vsgf" bytesize="1936" loc="data/chunk_00003.vsgf" offset="0" vertNum="25" triNum="32" dl="0" path="" bbox="3.40282e+38 -3.40282e+38 3.40282e+38 -3.40282e+38 3.40282e+38 -3.40282e+38">
<positions type="array4f" bytesize="400" offset="24" apply="vertex" />
<normals type="array4f" bytesize="400" offset="424" apply="vertex" />
<tangents type="array4f" bytesize="400" offset="824" apply="vertex" />
<texcoords type="array2f" bytesize="200" offset="1224" apply="vertex" />
<indices type="array1i" bytesize="384" offset="1424" apply="tlist" />
<matindices type="array1i" bytesize="128" offset="1808" apply="primitive" />
</mesh>
<mesh id="3" name="TPhotometricLight001_lightmesh" type="vsgf" bytesize="280" loc="data/chunk_00004.vsgf" offset="0" vertNum="4" triNum="2" dl="0" path="" light_id="1" bbox="3.40282e+38 -3.40282e+38 3.40282e+38 -3.40282e+38 3.40282e+38 -3.40282e+38">
<positions type="array4f" bytesize="64" offset="24" apply="vertex" />
<normals type="array4f" bytesize="64" offset="88" apply="vertex" />
<tangents type="array4f" bytesize="64" offset="152" apply="vertex" />
<texcoords type="array2f" bytesize="32" offset="216" apply="vertex" />
<indices type="array1i" bytesize="24" offset="248" apply="tlist" />
<matindices type="array1i" bytesize="8" offset="272" apply="primitive" />
</mesh>
</geometry_lib>
<render_lib>
<render_settings type="HydraModern" id="0">
<width>1024</width>
<height>1024</height>
<method_primary>pathtracing</method_primary>
<method_secondary>pathtracing</method_secondary>
<method_tertiary>pathtracing</method_tertiary>
<method_caustic>pathtracing</method_caustic>
<shadows>1</shadows>
<trace_depth>6</trace_depth>
<diff_trace_depth>4</diff_trace_depth>
<pt_error>2</pt_error>
<minRaysPerPixel>256</minRaysPerPixel>
<maxRaysPerPixel>2000000</maxRaysPerPixel>
<mmlt_burn_iters>1024</mmlt_burn_iters>
<mmlt_threads>524288</mmlt_threads>
<mmlt_sds_fixed_prob>0</mmlt_sds_fixed_prob>
<mmlt_multBrightness>1</mmlt_multBrightness>
<mlt_med_enable>false</mlt_med_enable>
<mlt_med_threshold>0.400000006</mlt_med_threshold>
<envclamp>1000000</envclamp>
<bsdfclamp>1000000</bsdfclamp>
<separate_swap>0</separate_swap>
<forceGPUFrameBuffer>0</forceGPUFrameBuffer>
<evalgbuffer>1</evalgbuffer>
<dont_run>0</dont_run>
<scenePrepass>0</scenePrepass>
<offline_pt>0</offline_pt>
<resources_path>C:/[Hydra]/bin2/shaders</resources_path>
<tmGamma>2.20000005</tmGamma>
<outputRedirect>0</outputRedirect>
</render_settings>
</render_lib>
<scenes>
<scene id="0" name="my scene" discard="1" bbox="3.40282e+38 -3.40282e+38 3.40282e+38 -3.40282e+38 3.40282e+38 -3.40282e+38">
<instance id="0" mesh_id="0" rmap_id="-1" scn_id="0" scn_sid="0" matrix="1 0 0 0 0 1.15132 0 -1.04481 0 0 1 0 0 0 0 1 " />
<instance id="1" mesh_id="1" rmap_id="-1" scn_id="0" scn_sid="0" matrix="0.999889 0 -0.0149171 0 0 1 0 -1.04621 0.0149171 0 0.999889 0 0 0 0 1 " />
<instance id="2" mesh_id="2" rmap_id="-1" scn_id="0" scn_sid="0" matrix="-2.29124e-07 -1.40635 6.14735e-08 -1.14358 0 -6.14735e-08 -1.40635 -0.302691 1.40635 -2.29124e-07 1.00153e-14 -0.0806333 0 0 0 1 " />
<instance_light id="0" light_id="0" matrix="1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 " lgroup_id="-1" />
<instance_light id="1" light_id="1" matrix="1 0 0 0 0 1 9.31323e-10 1.02243 0 -9.31323e-10 1 0 0 0 0 1 " lgroup_id="-1" />
<instance id="3" mesh_id="3" rmap_id="-1" matrix="1 0 0 0 0 1 9.31323e-10 1.02243 0 -9.31323e-10 1 0 0 0 0 1 " light_id="1" linst_id="1" />
</scene>
</scenes>

0 comments on commit 5c5d369

Please sign in to comment.