Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiable Mipmap #599

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a8b350d
mipmap constructor
Feb 25, 2023
d2a2701
eval_1
Feb 26, 2023
477a96d
running mipmap for 1 channel
Feb 27, 2023
3fa88b7
test with ray differential
Feb 27, 2023
0d1a660
minor change
ziyi-zhang Feb 27, 2023
19f0df2
working mipmap under vector mode
Feb 27, 2023
0503de4
merge
Feb 27, 2023
202c7df
optimize eval level
Feb 28, 2023
baf8a79
test with pbrt
Feb 28, 2023
bf47cfb
trilinear sanity check
Mar 2, 2023
f81e67f
box and max(duv_dxy) seems to be better
Mar 2, 2023
20be5f4
spp=8 with pbrt
Mar 2, 2023
c5a92cc
mipmap ewa
Mar 8, 2023
78cb540
use pbrt way to calculate radius
Mar 9, 2023
337046e
working but slow ewa
Mar 13, 2023
16e265d
tensor downsampling
Mar 17, 2023
1aabb65
working differentiable trilinear
Mar 17, 2023
9032a10
trying to grad_replace ewa
Mar 17, 2023
b9511d9
2D mipmap without implementing query
Mar 20, 2023
c376564
back to array of textures
Mar 21, 2023
dd7be27
failing vcall
Mar 21, 2023
dc03a18
compiled texture vcall
Mar 22, 2023
282b251
working mipmap with vcall, but failed with ad
Mar 22, 2023
aa9bbc4
failing backward vcall
Mar 23, 2023
d05a311
change template
Mar 23, 2023
0f32c4e
working vcall ewa and trilinear
Mar 24, 2023
127b6b2
working 3 channel
Mar 24, 2023
26f912c
working 3 channel ewa
Mar 28, 2023
9c03f17
add interpolate_spectral
Mar 28, 2023
49edec3
no spectral support for mipmap; add clamp to downsampling
Mar 30, 2023
624b7fa
fix evalEWA3 bug
Mar 31, 2023
470b51b
working mipmap and replace_grad ewa
Jun 27, 2023
c152f39
Merge branch 'master' into mip
Axiwa Jun 27, 2023
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
Prev Previous commit
Next Next commit
tensor downsampling
  • Loading branch information
Axiwa authored and Axiwa committed Mar 17, 2023
commit 16e265d6b8eaf4c67014a17a05d206b3810328ad
980 changes: 980 additions & 0 deletions notebook/.ipynb_checkpoints/test_diff_mipmap-checkpoint.ipynb

Large diffs are not rendered by default.

152 changes: 88 additions & 64 deletions notebook/.ipynb_checkpoints/test_mipmap-checkpoint.ipynb

Large diffs are not rendered by default.

Binary file removed notebook/10.exr
Binary file not shown.
Binary file removed notebook/11.exr
Binary file not shown.
Binary file removed notebook/8.exr
Binary file not shown.
Binary file removed notebook/9.exr
Binary file not shown.
Binary file added notebook/figures/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebook/figures/24-split/imageonline/00.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebook/figures/24-split/imageonline/01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebook/figures/24-split/imageonline/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebook/figures/24-split/imageonline/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebook/figures/24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified notebook/figures/Checkerboard_pattern-split/imageonline/white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebook/figures/index.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebook/figures/mi_ref.exr
Binary file not shown.
Binary file added notebook/figures/narrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebook/figures/small_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebook/figures/smallcheck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebook/figures/white200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
949 changes: 949 additions & 0 deletions notebook/g.dot

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions notebook/mipmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
digraph {
rankdir=BT;
graph [dpi=50 fontname=Consolas];
node [shape=record fontname=Consolas];
edge [fontname=Consolas];
1 [label="{Label: \"b\"|{a1|S:1|R:2}}" fillcolor=yellowgreen style=filled];
2 [label="{Label: \"c\"|{a2|S:1|R:1}}" fillcolor=lightblue2 style=filled];
3 [label="{Label: \"myTexture\"|{a3|S:40000|R:2}}" fillcolor=yellowgreen style=filled];
6 [label="{unnamed|{a6|S:3145728|R:1}}" fillcolor=salmon style=filled];
10 [label="{mul|{a10|S:1|R:1}}" fillcolor=salmon style=filled];
398 [label="{scatter_reduce|{a398|S:4194304|R:1}}" fillcolor=salmon style=filled];
729 [label="{sub|{a729|S:40000|R:2}}"];
730 [label="{mul|{a730|S:40000|R:1}}"];
731 [label="{sum|{a731|S:1|R:1}}"];
732 [label="{mul|{a732|S:1|R:1}}" fillcolor=lightblue2 style=filled];
2 -> 1;
729 -> 3;
730 -> 729 [label=" 2"];
730 -> 729 [label=" 1"];
731 -> 730;
732 -> 731;
subgraph cluster_legend {
label="Legend";
l4 [style=filled fillcolor=yellowgreen label="Gradient present"];
l3 [style=filled fillcolor=salmon label="Input"];
l2 [style=filled fillcolor=lightblue2 label="Output"];
l1 [style=filled fillcolor=wheat label="Labeled"];
}
}
44 changes: 44 additions & 0 deletions notebook/mipmap.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
digraph {
rankdir=BT;
graph [dpi=50 fontname=Consolas];
node [shape=record fontname=Consolas];
edge [fontname=Consolas];
1 [label="{Label: \"b\"|{a1|S:1|R:2}}" fillcolor=yellowgreen style=filled];
2 [label="{Label: \"c\"|{a2|S:1|R:1}}" fillcolor=lightblue2 style=filled];
3 [label="{Label: \"myTexture\"|{a3|S:40000|R:2}}" fillcolor=yellowgreen style=filled];
6 [label="{unnamed|{a6|S:3145728|R:1}}" fillcolor=salmon style=filled];
10 [label="{mul|{a10|S:1|R:1}}" fillcolor=salmon style=filled];
729 [label="{sub|{a729|S:40000|R:2}}"];
730 [label="{mul|{a730|S:40000|R:1}}"];
731 [label="{sum|{a731|S:1|R:1}}"];
732 [label="{mul|{a732|S:1|R:1}}" fillcolor=lightblue2 style=filled];
733 [label="{Label: \"myTexture\"|{a733|S:40000|R:2}}" fillcolor=yellowgreen style=filled];
736 [label="{unnamed|{a736|S:3145728|R:1}}" fillcolor=salmon style=filled];
740 [label="{mul|{a740|S:1|R:1}}" fillcolor=salmon style=filled];
1164 [label="{scatter_reduce|{a1164|S:4194304|R:1}}" fillcolor=salmon style=filled];
2115 [label="{sub|{a2115|S:40000|R:2}}" fillcolor=yellowgreen style=filled];
2116 [label="{mul|{a2116|S:40000|R:1}}" fillcolor=yellowgreen style=filled];
2117 [label="{sum|{a2117|S:1|R:1}}" fillcolor=yellowgreen style=filled];
2118 [label="{mul|{a2118|S:1|R:1}}" fillcolor=yellowgreen style=filled];
2119 [label="{unnamed|{a2119|S:40000|R:1}}" fillcolor=salmon style=filled];
2120 [label="{unnamed|{a2120|S:40000|R:1}}" fillcolor=salmon style=filled];
2121 [label="{unnamed|{a2121|S:40000|R:1}}" fillcolor=salmon style=filled];
2 -> 1;
729 -> 3;
730 -> 729 [label=" 2"];
730 -> 729 [label=" 1"];
731 -> 730;
732 -> 731;
2115 -> 733;
2116 -> 2115 [label=" 2"];
2116 -> 2115 [label=" 1"];
2117 -> 2116;
2118 -> 2117;
subgraph cluster_legend {
label="Legend";
l4 [style=filled fillcolor=yellowgreen label="Gradient present"];
l3 [style=filled fillcolor=salmon label="Input"];
l2 [style=filled fillcolor=lightblue2 label="Output"];
l1 [style=filled fillcolor=wheat label="Labeled"];
}
}
Binary file added notebook/mipmap.dot.pdf
Binary file not shown.
Binary file added notebook/mipmap.pdf
Binary file not shown.
9 changes: 4 additions & 5 deletions notebook/mipmap.xml
Original file line number Diff line number Diff line change
@@ -41,15 +41,14 @@
</transform>
</texture>

<bsdf type="diffuse" id="myCheckboard">
<ref name="reflectance" id="test" />
<!-- <rgb name="reflectance" value="0.5, 0.5, 0.5" /> -->
</bsdf>

<!-- Shapes -->

<shape type="obj" id="floor">
<string name="filename" value="figures/meshes/Plane.obj"/>
<ref id="myCheckboard"/>
<bsdf type="diffuse" id="myCheckboard">
<!-- <ref name="reflectance" id="test" /> -->
<rgb name="reflectance" value="0.5, 0.5, 0.5" />
</bsdf>
</shape>
</scene>
41 changes: 41 additions & 0 deletions notebook/mipmap2
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
digraph {
rankdir=BT;
graph [dpi=50 fontname=Consolas];
node [shape=record fontname=Consolas];
edge [fontname=Consolas];
1 [label="{Label: \"b\"|{a1|S:1|R:2}}" fillcolor=yellowgreen style=filled];
2 [label="{Label: \"c\"|{a2|S:1|R:1}}" fillcolor=lightblue2 style=filled];
3 [label="{Label: \"myTexture\"|{a3|S:40000|R:2}}" fillcolor=yellowgreen style=filled];
6 [label="{unnamed|{a6|S:3145728|R:1}}" fillcolor=salmon style=filled];
10 [label="{mul|{a10|S:1|R:1}}" fillcolor=salmon style=filled];
729 [label="{sub|{a729|S:40000|R:2}}"];
730 [label="{mul|{a730|S:40000|R:1}}"];
731 [label="{sum|{a731|S:1|R:1}}"];
732 [label="{mul|{a732|S:1|R:1}}" fillcolor=lightblue2 style=filled];
733 [label="{Label: \"myTexture\"|{a733|S:40000|R:2}}" fillcolor=yellowgreen style=filled];
736 [label="{unnamed|{a736|S:3145728|R:1}}" fillcolor=salmon style=filled];
740 [label="{mul|{a740|S:1|R:1}}" fillcolor=salmon style=filled];
1164 [label="{scatter_reduce|{a1164|S:4194304|R:1}}" fillcolor=salmon style=filled];
2115 [label="{sub|{a2115|S:40000|R:2}}"];
2116 [label="{mul|{a2116|S:40000|R:1}}"];
2117 [label="{sum|{a2117|S:1|R:1}}"];
2118 [label="{mul|{a2118|S:1|R:1}}" fillcolor=lightblue2 style=filled];
2 -> 1;
729 -> 3;
730 -> 729 [label=" 2"];
730 -> 729 [label=" 1"];
731 -> 730;
732 -> 731;
2115 -> 733;
2116 -> 2115 [label=" 2"];
2116 -> 2115 [label=" 1"];
2117 -> 2116;
2118 -> 2117;
subgraph cluster_legend {
label="Legend";
l4 [style=filled fillcolor=yellowgreen label="Gradient present"];
l3 [style=filled fillcolor=salmon label="Input"];
l2 [style=filled fillcolor=lightblue2 label="Output"];
l1 [style=filled fillcolor=wheat label="Labeled"];
}
}
Binary file added notebook/mipmap2.pdf
Binary file not shown.
Binary file added notebook/out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading