Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
78c3d9e
pathtracing-anti-aliasing test
gam0022 Mar 14, 2017
0ead711
レンダリング方程式を間違えていた(emissionの扱いが正しくなかった)
gam0022 Mar 19, 2017
4c46db7
負のレイを無視する
gam0022 Mar 19, 2017
6bab2c3
レンダリング方程式の定義どおりに計算されていなそうだったのを修正
klab-hosoda-sho Mar 21, 2017
70b8aaa
git rm npm-debug.log
klab-hosoda-sho Mar 21, 2017
f33036a
Refactor
klab-hosoda-sho Mar 21, 2017
c6ce8ad
update comments
gam0022 Mar 21, 2017
07314d9
Add createTextureCube
gam0022 Mar 21, 2017
4d68e1a
Add envMap: castle
gam0022 Mar 21, 2017
4469357
Use EXT_shader_texture_lod (ジャギが減った)
gam0022 Mar 21, 2017
fda27c3
Fix missing texture06
gam0022 Mar 21, 2017
aafdfe3
ガンマ補正
klab-hosoda-sho Mar 24, 2017
0b00b9f
プリセットのシーンを修正
gam0022 Mar 25, 2017
1a2bb13
Add presetScene: examples
gam0022 Mar 26, 2017
4d3483d
Fix misc_superellipsoid.html
gam0022 Mar 26, 2017
446e2a3
importanceSampleDiffuse
gam0022 Mar 27, 2017
f2e5081
Refactor BRDF Sampling
gam0022 Mar 27, 2017
d62650d
Fix code format
klab-hosoda-sho Mar 28, 2017
405e8a4
Refactor: add sampleRefraction
klab-hosoda-sho Mar 28, 2017
6d6ae26
sampleRefraction をFresnelの反射係数のSchlick近似に対応
klab-hosoda-sho Mar 28, 2017
939c297
Fix GGX
klab-hosoda-sho Mar 28, 2017
721d85d
sampleRefraction の反射率の計算をmarupeke296に基づいた情報により修正
gam0022 Mar 28, 2017
4c0ed01
sampleRefraction を整理
gam0022 Mar 28, 2017
3fe0c2b
examplesのシーンの屈折率をガラスに近い1.51に設定
gam0022 Mar 28, 2017
fd29207
sampleRefractionのcosTの計算を最適化
gam0022 Mar 28, 2017
5742402
Add link
gam0022 Mar 28, 2017
42344b6
不要コードの削除
klab-hosoda-sho Mar 29, 2017
636bf7c
カメラ行列周りのコードを整理
klab-hosoda-sho Mar 29, 2017
c679903
カメラ行列の名前を整理
klab-hosoda-sho Mar 29, 2017
49dce99
Add comments
klab-hosoda-sho Mar 29, 2017
dd3892c
AAをリファクタリング
gam0022 Mar 29, 2017
bad9606
git rm npm-debug.log
gam0022 Mar 29, 2017
a476a37
importanceSampleDiffuse の計算方法についてコメント追加
klab-hosoda-sho Mar 31, 2017
0a37a7d
retab
gam0022 Mar 31, 2017
848c0e9
add presetScene: cornellBox
gam0022 Apr 2, 2017
98db41b
立体角の変化に伴う放射輝度の補正を入れたら暗くなったのでコメントアウト
gam0022 Apr 3, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
296 changes: 289 additions & 7 deletions js/pathtracing/presetScenes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var presetScenes = {
type: "MATERIAL_TYPE_GGX",
color: "#ffffff",
emission: "#000000",
roughness: 0.3,
roughness: 0.9,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
Expand All @@ -21,7 +21,7 @@ var presetScenes = {
type: "sphere",
material: {
type: "MATERIAL_TYPE_GGX",
color: "#ff5050",
color: "#ff0707",
colorTexture: 0,
emission: "#000000",
roughness: 0.2,
Expand Down Expand Up @@ -78,7 +78,7 @@ var presetScenes = {
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,
},
position: [ -2.0, 0.7, -2.0 ],
position: [ -2.5, 0.7, -2.0 ],
scale: [ 1.4, 1.4, 1.4 ],
},
{
Expand Down Expand Up @@ -119,19 +119,301 @@ var presetScenes = {
type: "MATERIAL_TYPE_GGX_REFRACTION",
color: "#ffffff",
colorTexture: 0,
emission: "#000000",
roughness: 0.2,
emission: "#4a4713",
roughness: 0.15,
refractiveIndex: 1.6,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.earth_inverse,
emissionTexture: textureChoices.earth_inverse,
roughnessTexture: textureChoices.none,
},
position: [ 0.0, 2.0, -4.0 ],
scale: [ 8.0, 4.0, 0.1 ],
},
];
},

examples: function() {
return [
{
type: "aabb",
material: {
type: "MATERIAL_TYPE_GGX",
color: "#ffffff",
emission: "#000000",
roughness: 0.9,
refractiveIndex: 1.3,
colorTexture: textureChoices.checkered,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,

},
position: [ 0.0, -0.05, 0.0 ],
scale: [ 10.0, 0.1, 10.0 ],
},
{
type: "sphere",
material: {
type: "MATERIAL_TYPE_DIFFUSE",
color: "#ffffff",
colorTexture: 0,
emission: "#000000",
roughness: 0.2,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,
},
position: [ -3.0, 0.7, 0.0 ],
scale: [ 1.4, 1.4, 1.4 ],
},
{
type: "sphere",
material: {
type: "MATERIAL_TYPE_SPECULAR",
color: "#ffffff",
colorTexture: 0,
emission: "#000000",
roughness: 0.2,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,
},
position: [ -1.0, 0.7, 0.0 ],
scale: [ 1.4, 1.4, 1.4 ],
},
{
type: "sphere",
material: {
type: "MATERIAL_TYPE_REFRACTION",
color: "#ffffff",
colorTexture: 0,
emission: "#000000",
roughness: 0.2,
refractiveIndex: 1.51,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,
},
position: [ 1.0, 0.7, 0.0 ],
scale: [ 1.4, 1.4, 1.4 ],
},
{
type: "sphere",
material: {
type: "MATERIAL_TYPE_GGX",
color: "#ffffff",
colorTexture: 0,
emission: "#000000",
roughness: 0.2,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,
},
position: [ 3.0, 0.7, 0.0 ],
scale: [ 1.4, 1.4, 1.4 ],
},
{
type: "sphere",
material: {
type: "MATERIAL_TYPE_SPECULAR",
color: "#000000",
colorTexture: 0,
emission: "#ffffff",
roughness: 0.2,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,
},
position: [ 0.0, 2.7, -3.0 ],
scale: [ 1.5, 1.5, 1.5 ],
},
//{
// type: "aabb",
// material: {
// type: "MATERIAL_TYPE_GGX_REFRACTION",
// color: "#ffffff",
// colorTexture: 0,
// emission: "#4a4713",
// roughness: 0.15,
// refractiveIndex: 1.6,
// colorTexture: textureChoices.none,
// emissionTexture: textureChoices.earth_inverse,
// roughnessTexture: textureChoices.none,
// },
// position: [ 0.0, 2.0, -4.0 ],
// scale: [ 8.0, 4.0, 0.1 ],
//},
];
},

cornellBox: function() {
return [
{
type: "aabb",
material: {
type: "MATERIAL_TYPE_GGX",
color: "#ffffff",
emission: "#ffffff",
roughness: 0.9,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,

},
position: [ 0.0, 10., 0.0 ],
scale: [ 3.0, 0.5, 3.0 ],
},
{
type: "aabb",
material: {
type: "MATERIAL_TYPE_GGX",
color: "#ffffff",
emission: "#000000",
roughness: 0.9,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,

},
position: [ 0.0, -0.05, 0.0 ],
scale: [ 10.0, 0.1, 10.0 ],
},
{
type: "aabb",
material: {
type: "MATERIAL_TYPE_GGX",
color: "#ffffff",
emission: "#000000",
roughness: 0.9,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,

},
position: [ 0.0, 10.05, 0.0 ],
scale: [ 10.0, 0.1, 10.0 ],
},
{
type: "aabb",
material: {
type: "MATERIAL_TYPE_GGX",
color: "#ff3333",
emission: "#000000",
roughness: 0.9,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,

},
position: [ -5.05, 5.0, 0.0 ],
scale: [ 0.1, 10.0, 10.0 ],
},
{
type: "aabb",
material: {
type: "MATERIAL_TYPE_GGX",
color: "#3333ff",
emission: "#000000",
roughness: 0.9,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,

},
position: [ 5.05, 5.0, 0.0 ],
scale: [ 0.1, 10.0, 10.0 ],
},
{
type: "aabb",
material: {
type: "MATERIAL_TYPE_GGX",
color: "#ffffff",
emission: "#000000",
roughness: 0.9,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,

},
position: [ 0.0, 5.0, -5.05 ],
scale: [ 10.0, 10.0, 0.1 ],
},
//{
// type: "aabb",
// material: {
// type: "MATERIAL_TYPE_GGX",
// color: "#ffffff",
// emission: "#000000",
// roughness: 0.9,
// refractiveIndex: 1.3,
// colorTexture: textureChoices.none,
// emissionTexture: textureChoices.none,
// roughnessTexture: textureChoices.none,

// },
// position: [ 0.0, 5.0, 5.05 ],
// scale: [ 10.0, 10.0, 0.1 ],
//},
{
type: "sphere",
material: {
type: "MATERIAL_TYPE_SPECULAR",
color: "#ffffff",
colorTexture: 0,
emission: "#000000",
roughness: 0.01,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,
},
position: [ -3.0, 1.5, -1.0 ],
scale: [ 3.0, 3.0, 3.0 ],
},
{
type: "sphere",
material: {
type: "MATERIAL_TYPE_GGX",
color: "#33ff33",
colorTexture: 0,
emission: "#000000",
roughness: 0.8,
refractiveIndex: 1.3,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,
},
position: [ 1.2, 2.0, -2.5 ],
scale: [ 4.0, 4.0, 4.0 ],
},
{
type: "sphere",
material: {
type: "MATERIAL_TYPE_REFRACTION",
color: "#ffffff",
colorTexture: 0,
emission: "#000000",
roughness: 0.2,
refractiveIndex: 1.51,
colorTexture: textureChoices.none,
emissionTexture: textureChoices.none,
roughnessTexture: textureChoices.none,
},
position: [ 2.5, 1.5, 1.7 ],
scale: [ 3.0, 3.0, 3.0 ],
},
];
},

table: function() {
var tableMaterial = {
type: "MATERIAL_TYPE_GGX",
Expand Down
6 changes: 3 additions & 3 deletions misc_superellipsoid.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@
// Textures

var r = "textures/cube/Bridge2/";
var urls = [ r + "posx.jpg", r + "negx.jpg",
r + "posy.jpg", r + "negy.jpg",
r + "posz.jpg", r + "negz.jpg" ];
var urls = [ r + "px.jpg", r + "nx.jpg",
r + "py.jpg", r + "ny.jpg",
r + "pz.jpg", r + "nz.jpg" ];

textureCube = new THREE.CubeTextureLoader().load( urls );
textureCube.format = THREE.RGBFormat;
Expand Down
Loading