Home › Forums › GAMES在线课程(现代计算机图形学入门)讨论区 › 作业三 关于phong模型的问题
- This topic has 18 replies, 6 voices, and was last updated 6 years, 1 month ago by
guodw.
Viewing 11 reply threads
-
AuthorPosts
-
-
夏莉莉
Participant好的,我去修改一下
-
夏莉莉
Participant咦,0的p次方不是0吗
-
你说的对,我糊涂了,再看一看你的代码。
之前那条 post 我先删了,避免误导别人。
-
-
夏莉莉
Participant改成1也没有高光,而且好像应该是0呀
-
又看了看,你试着把所有用 nn 的地方换成 normal 试试。
-
夏莉莉
Participant那就是其实不用单位向量是吗,我定义的ll,nn都是单位向量
-
不,问题在于 normal 本身就是法向量,而你得到的 ne=normal-point 没有任何物理意义。所以我认为你需要仔细检查下自己对于法向量这一概念的理解。
-
-
夏莉莉
Participant哦哦,好的,我明白了,谢谢助教啦
-
-
guodw
ParticipantEigen::Vector3f v((eye_pos-point).normalized());
Eigen::Vector3f h((v+l).normalized());解决了
-
-
AuthorPosts
Viewing 11 reply threads
- You must be logged in to reply to this topic.