Release Candidate

master
bill 4 years ago
parent f7eb9cb123
commit 603603993a

@ -1,2 +1,2 @@
# graphics_hw1 # graphics_hw2
[link](https://billsun.dev/graphics/hw1) [link](https://billsun.dev/graphics/hw2)

@ -58,25 +58,18 @@ Solar RTX
<p> <p>
<i style="font-size:25px;">Here is how it works:</i> <i style="font-size:25px;">Here is how it works:</i>
<ul> <ul>
<li>First, I added <a href="http://planetpixelemporium.com/download/download.php?earthmap1k.jpg">texture</a> to the sphere. The code to load the texture is from <li>First, I started with what I've already done in homework 1. Which already included complete Phong shading with
<a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Using_textures_in_WebGL">here</a>. Please wait a sec for the texture to download.</li> Specular light and much more (spherical texture mapping, simple interactions, improved UI/shader editor).
<li>Then, I mapped the 3D sphere surface to the rectangular 2D texture picture. </li> </li>
<li>I also make it look like it's rotating by adding uTime to the offset of the texture and reset the offset to 0 whenever it exceeds <li> I then merged the code from hw2 and added texture to each sphere.</li>
the width of the texture.</li> <li> I modified the ray tracing algorithm so that when hitting an object, instead of returning color calculated from
<li>I used Perlin Noise to generate fake clouds.</li> Phong model:<br>
<li> I modified the lighting so that the light source won't move with the sphere and
the lighting will change when the sphere moves. I also added specular lights to make it shinier.</li>
<li> I tried to add some 'soft shadow' to it. I used a mix of methods inspired by Ambient Occlusion and Ray Tracing.<br>
<ul> <ul>
<li>The Ambient lights and diffusion lights are reduced with respect to the distance between the background point and the sphere.</li> <li>I recursively traced the light reflected and refract from the object.</li>
<li>The specular light of the background wall is eliminated and the diffusion factor is reduced when the ray shooting from the background point <li></li>
towards the light source or from the background point towards the camera position intersect with the sphere.</li>
</ul> </ul>
<li>I added basic interactions such as press ctrl + 't' key to hide/show texture, click on the above canvas to pause/unpause animations. <li></li>
Just a proof of concept.</li> <li>Finally, I used super sampling via doubling the render dimensions of the canvas to reduce aliasing.</li>
<li>Finally, I made some small changes like changing R over time and refined the UI a little bit. I used
<a href="https://ace.c9.io">Ace</a> for code highlighting and autocompletion on the edit panel.</li>
<li>Comments begin with '//*' are added by me.</li>
<li>Repo on <a href="https://github.com/sunyinqi0508/graphics_hw1">Github</a>.</li> <li>Repo on <a href="https://github.com/sunyinqi0508/graphics_hw1">Github</a>.</li>
</li> </li>
</ul> </ul>

Loading…
Cancel
Save