Posts

Showing posts from June, 2020

6/9 Final Results

Image
Here are the final results for our attempt at subsurface scattering. We managed to get single-scatter events to work (this image was referenced in a previous post). The main issue, in the end, was attempting to integrate into multi-scatter events. The way direct lighting processed a specular surface caused issues in which it would create a glossy texture and we could somewhat render out the individual components of the scatter and the diffuse, but combining the two made it look like just a diffuse with more specularity. We believed that this image above best demonstrates subsurface scattering. Despite not achieving the jade effects we aimed for, we managed to successfully process lighting within an object with single scatter events. For a reference to our initial images, this is what we started with: Finally, here is what we aimed to achieve:  Through this project, we've learned a lot about the physical properties of objects and how subsurface scattering works on a fundamental leve...

6/9: More and more research

Image
Further research on topic of Fresnel equations: https://www.cs.rpi.edu/~cutler/classes/advancedgraphics/S10/final_projects/turnbull.pdf https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-ray-tracing/adding-reflection-and-refraction https://en.wikipedia.org/wiki/Fresnel_equations#:~:text=The%20Fresnel%20equations%20(or%20Fresnel,interface%20between%20different%20optical%20media. Slight issues from before that have now been corrected: Check for total internal reflectance We now update our values better by using a check for the dot between incoming angle and surface normal, so that if this product is negative, we know we're inside and we utilize this to update the values. If we reintroduce our coloring we get Compared to update 6/7 on glass it's a lot better. The issue is we had a check for reflecting whenever refract would fail. Turns out this would cause reflection artifacts along the edges which were why the previous post had such solid edges  Whoa. Redid ...

6/8: Homogeneous Volume Attempt

Image
Attempt at a single scatter homogenous volume render. The dragon looks a lot better now! Looking closely, you can see the scatter of the light inside the object and it is starting to get a bit closer to jade. If you look at the small parts, it looks more dense and lesss light is being let through which will require some tweaking.  https://graphics.pixar.com/library/ProductionVolumeRendering/paper.pdf Updated coloring from  https://books.google.com/books?id=V8NwDwAAQBAJ&pg=PT241&lpg=PT241&dq=jade+material+color+rgb&source=bl&ots=Tnv3iH648v&sig=ACfU3U1W4tqYCJXW5s_bJOSs0wm3vkFvdw&hl=en&sa=X&ved=2ahUKEwjd2_71hvLpAhWlJzQIHcQ0ALAQ6AEwF3oECAoQAQ#v=onepage&q&f=false  section 7.3 which actually dives into the jade material instead Values being used are close, but it felt a bit too white so I slightly tweaked it diffuse 0.4 0.95 0.60 shininess 12.8 ambient 0.135 0.2225 0.1575 specular 0.3162 0.3162 0.3162 Reduced scatter distance by facto...

6/7: Time for a reset

Image
Time to go back to our basic code with nee + rr. We were initially checking for jade as a completely separate material similar to how we processed lights. This approach is probably not correct which caused the lighting issues because light should still be integrated as normal, but if we hit jade we do different code. So now we need to reattempt integration but put it inside where we calculate direct lighting + indirect lighting. We've also cleaned up the code as it was fairly messy what did what and now everything is more clear. Goal: Achieve basic refracting for this dragon Implementing:  https://www.cs.rpi.edu/~cutler/classes/advancedgraphics/S10/final_projects/turnbull.pdf Reason we do this is because the basic of subsurface scattering is deciding between refracting and reflecting inside of the object. If we can figure out how to nail refractance, combining it with the preexisting reflectance code shouldn't be too bad. Well looking at it, it's actually not that bad right...

6/5 Update

Image
Built off previous 20% contribution from shooting through, now give rays chance to either reflect or shoot through the object. Based on  https://computergraphics.stackexchange.com/questions/2482/choosing-reflection-or-refraction-in-path-tracing . The random chance of reflecting vs refracting is based on ior of jade to air and getting the fresnel value off that (Slide 21 of  https://www.brown.edu/research/labs/mittleman/sites/brown.edu.research.labs.mittleman/files/uploads/lecture13_0.pdf ). Using ior of 2.42 for jade and ior of 1.0 for air. Integrated with existing rr code. Compared to previous 20% contribution, more light shines through the thin surfaces New colors to try to get closer to jade 0.00 0.4 0.05 diffuse 0.00 0.659 0.42 ( https://www.colorhexa.com/00a86b ) For some reason this one is super blue, might be an algorithm issue instead of a color issue? Here's the same set of colors with a slightly different algorithm Same algorithm with the 2nd coloring Imo first algor...

Update 6/5

Image
Reverted back to old code since we had partial mis working and a lot of random code everywhere. Attempt 2 at shooting rays through the object and taking 50% contribution from the object color. For some reason dragon appears to be emissive too but results look at bit better. 20% contribution here

Update 6/3/20

Image
An attempt at shooting ray straight through object if jade material intersected. After reading more on this topic, it seems like much of the fundamentals build off of being able to shoot rays into the object and processing them there. So this attempt was to try to simulate something glass-like where the ray would shoot through the object first. This would provide a better basis for being able to manipulate the ray after shooting it into the object.