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

1.2 Different spheres' shading model and where to put second light #58

Open
mafshar opened this issue Oct 3, 2017 · 5 comments
Open

Comments

@mafshar
Copy link

mafshar commented Oct 3, 2017

Hi,

For 1.2, should we have one scene where there is diffuse shading, one with spectral, one with ambient, and one with all three? Also where does the second light source come in? Can someone please clarify.

Thank you in advance!

@jiangzhongshi
Copy link
Collaborator

Hi,

You can have one with diffuse and one with all three. Specular or ambient alone won't produce meaningful results.

For the second light source, you can decide its position on your own, but please make sure it has some effect in your scene.

Best,
Zhongshi

@jiangzhongshi jiangzhongshi changed the title shading question 1.2 Different spheres' shading model and where to put second light Oct 3, 2017
@mafshar
Copy link
Author

mafshar commented Oct 3, 2017

Okay thank you!

And for Specular Shading, it is my understanding that vector v is the normalized vector that represents the direction of the camera. That is, it is the origin vector normalized. Is this correct, or am I missing something?

@jiangzhongshi
Copy link
Collaborator

v represents the direction from intersection point to the viewer, not the ray you are casting. ray_intersection in the sample code represents the coordinate of the intersection point for the given ray.

@mafshar
Copy link
Author

mafshar commented Oct 3, 2017

Yes, I meant to say origin.

@jiangzhongshi
Copy link
Collaborator

The correct way is the following. You cast a ray to the objects. If an intersection occurs, denote p as the intersection point. Normalize the direction from p to the viewer eye position will give you v.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants