Skip to content

Commit

Permalink
added task07
Browse files Browse the repository at this point in the history
  • Loading branch information
nobuyuki83 committed Jun 3, 2024
1 parent f78ac5a commit 15f0d34
Show file tree
Hide file tree
Showing 9 changed files with 512 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ add_subdirectory(task03)
add_subdirectory(task04)
add_subdirectory(task05)
add_subdirectory(task06)
# add_subdirectory(task07)
add_subdirectory(task07)
# add_subdirectory(task08)
# add_subdirectory(task09)
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Topics:
|(4)<br>May 13| **Graphics pipeline**<br>depth buffer method, shading, shadow, anti aliasing | [task04](task04) | [[12]](http://nobuyuki-umetani.com/acg2024s/rasterization_3d.pdf) [[13]](http://nobuyuki-umetani.com/acg2024s/graphics_pipeline.pdf) |
|(6)<br>May 20| **Ray Casting 1**<br/>spatial data structure | [task05](task05) | [[14]](http://nobuyuki-umetani.com/acg2024s/shading.pdf) [[16]](http://nobuyuki-umetani.com/acg2024s/implicit_modeling.pdf) |
|(7)<br>May 27| **Ray Casting 2**<br>Rendering equation, Monte Carlo integration | [task06](task06) | [[15]](http://nobuyuki-umetani.com/acg2024s/rasterization_subpixel.pdf) [[17]](http://nobuyuki-umetani.com/acg2024s/ray_casting.pdf) [[18]](http://nobuyuki-umetani.com/acg2024s/monte_carlo_integration.pdf) [[19]](http://nobuyuki-umetani.com/acg2024s/ray_triangle_collision.pdf) |
|(8)<br>June 3| **Character animation**<br> Linear blend skinning | task07 | |
|(8)<br>June 3| **Character animation**<br> Linear blend skinning | [task07](task07) | [[20]](http://nobuyuki-umetani.com/acg2024s/character_deformation.pdf) [[21]](http://nobuyuki-umetani.com/acg2024s/jacobian.pdf) |
|(9)<br>June 10| Guest lecture by Dr. Rex West | | |
|(10)<br>June 17| **Optimization** <br> Inverse kinematic | task08 | |
|(11)<br>June 24| Laplacian mesh deformation | task09 | |
Expand Down Expand Up @@ -84,7 +84,7 @@ Look at the following document.
| [task04](task04) | **Vertex shader practice** <br>Rendering pipeline, mirror reflection, OpenGL | <img src="task04/preview.png" width=100px> |
| [task05](task05) | **Fragment shader practice**<br>Ray marching method, CSG modeling, implicit modeling | <img src="task05/preview.png" width=100px> |
| [task06](task06) | **Monte Carlo integration1**<br>Ambient occlusion, importance sampling, BVH | <img src="task06/preview.png" width=100px> |
| task07 | **Monte Carlo integration2**<br/>Multiple importance sampling | <img src="task07/preview.png" width=100px> |
| [task07](task07) | **Monte Carlo integration2**<br/>Multiple importance sampling | <img src="task07/preview.png" width=100px> |
| task08 | **Skeletal Character Animation**<br>Linear blend skinning, articulated rigid body | <img src="task08/preview.png" width=100px> |
| task09 | TBD | |
| task10 | TBD | |
Expand Down Expand Up @@ -136,6 +136,8 @@ Look at the following document.
- [[18]Monte Carlo Integration](http://nobuyuki-umetani.com/acg2024s/monte_carlo_integration.pdf)

- [[19]Ray Triangle Collision](http://nobuyuki-umetani.com/acg2024s/ray_triangle_collision.pdf)
- [[20]Character deformation](http://nobuyuki-umetani.com/acg2024s/character_deformation.pdf)
- [[21]Jacobian&Hessian](http://nobuyuki-umetani.com/acg2024s/jacobian.pdf)



Expand Down
2 changes: 1 addition & 1 deletion task06/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE) # we are using STL library
#############################
# set project name

project(task07)
project(task06)

#############################
# define macro
Expand Down
35 changes: 35 additions & 0 deletions task07/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# specify the version of cmake (intentionally using old version for those who cannot update CMake)
cmake_minimum_required(VERSION 3.10)

#############################
# set C++ detail
enable_language(CXX) # we are using C++
set(CMAKE_CXX_STANDARD 17) # we are using C++ 17
set(CMAKE_CXX_STANDARD_REQUIRED TRUE) # we are using STL library

#############################
# set project name

project(task07)

#############################
# define macro
add_definitions(-DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}")

#############################
# specifying libraries to use

########################
# include, build, and link

include_directories(
${PROJECT_SOURCE_DIR}/../external
${PROJECT_SOURCE_DIR}/../external/eigen
)

add_executable(${PROJECT_NAME}
main.cpp
)

target_link_libraries(${PROJECT_NAME}
)
41 changes: 41 additions & 0 deletions task07/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Task07: Multiple Importance Sampling (Brdf sampling, Light sampling)

![preview](preview.png)

**Deadline: June 6th (Thu) at 15:00pm**

----

## Before Doing Assignment

If you have not done the [task01](../task01), [task02](../task02) do it first to set up the C++ development environment.

Follow [this document](../doc/submit.md) to submit the assignment, In a nutshell, before doing the assignment,
- make sure you synchronized the `main ` branch of your local repository to that of remote repository.
- make sure you created branch `task07` from `main` branch.
- make sure you are currently in the `task07` branch (use `git branch -a` command).

Now you are ready to go!

---

## Problem

- Implement light sampling by lighting a single line code around `line #364`
- Implement Brdf sampling by lighting a single line code around `line #383`
- Implement MIS sampling by lighting a few lines of code around `line #401` around `line #403`

Run the program with **Release mode** and it will generate three images that replace the images below.

| Light sampling | Brdf sampling | MIS sampling |
| ----------------------- | ------------------------ | ------------------------ |
| ![light](out_light.png) | ![brdf](out_brdf.png) | ![mis](out_mis.png) |

Observe that three image looks similar but the noise is reduced by MIS sampling.




## After Doing the Assignment

After modify the code, push the code and submit a pull request. Make sure your pull request only contains the files you edited. Good luck!
Loading

0 comments on commit 15f0d34

Please sign in to comment.