助教

Forum Replies Created

Viewing 30 posts - 31 through 60 (of 73 total)
  • Author
    Posts
  • in reply to: displacement结果问题 #4121 Score: 0
    助教
    Keymaster
    14 pts

    图片上传失败,请更换图片文件类型重新上传。

    in reply to: [作业三]向量是否要normalize #3991 Score: 0
    助教
    Keymaster
    14 pts

    你的 normalize 实现应该是正确的,请检查你的框架是否更新、插值是否正确。

    in reply to: bump和displacement变换得到的normal是否要normalize #3976 Score: 0
    助教
    Keymaster
    14 pts

    相关改动已更新到文档与框架中。

    in reply to: bump和displacement变换得到的normal是否要normalize #3970 Score: 0
    助教
    Keymaster
    14 pts

    我个人认为是需要的,我将把说明添加到文档与代码中。

    • This reply was modified 4 years, 1 month ago by 助教.
    in reply to: 作业3如何换成其他的模型 #3969 Score: 0
    助教
    Keymaster
    14 pts

    理论上是的,如果还有问题可能需要检查下模型本身。

    in reply to: 作业三phong模型结果亮度很高 #3957 Score: 0
    助教
    Keymaster
    14 pts

    除了 v 没有 normalize,我暂未发现其他问题。

    in reply to: Frequently Asked Questions(Keep Updating) #3956 Score: 1
    助教
    Keymaster
    14 pts

    ⚠️⚠️⚠️作业三常见问题集合:
    (1) bump mapping 部分的 h(u,v)=texture_color(u,v).norm, 其中 u,v 是 tex_coords, w,h 是 texture 的宽度与高度
    (2) rasterizer.cpp 中 v = t.toVector4()
    (3) get_projection_matrix 中的 eye_fov 应该被转化为弧度制
    (4) bump 与 displacement 中修改后的 normal 仍需要 normalize
    (5) 可能用到的 eigen 方法:norm(), normalized(), cwiseProduct()
    (6) 实现 h(u+1/w,v) 的时候要写成 h(u+1.0/w,v)
    (7) 正规的凹凸纹理应该是只有一维参量的灰度图,而本课程为了框架使用的简便性而使用了一张 RGB 图作为凹凸纹理的贴图,因此需要指定一种规则将彩色投影到灰度,而我只是「恰好」选择了 norm 而已。为了确保你们的结果与我一致,我才要求你们都使用 norm 作为计算方法。
    (8) bump mapping & displacement mapping 的计算的推导日后将会在光线追踪部分详细介绍,目前请按照注释实现。

    This post has received 1 vote up.
    • This reply was modified 4 years, 1 month ago by 助教.
    • This reply was modified 4 years, 1 month ago by 助教.
    • This reply was modified 4 years, 1 month ago by 助教.
    • This reply was modified 4 years, 1 month ago by 助教.
    • This reply was modified 4 years, 1 month ago by 助教.
    in reply to: 作业3更正公告 #3930 Score: 3
    助教
    Keymaster
    14 pts

    ⚠️⚠️⚠️作业三常见问题集合:
    (1) bump mapping 部分的 h(u,v)=texture_color(u,v).norm, 其中 u,v 是 tex_coords, w,h 是 texture 的宽度与高度
    (2) rasterizer.cpp 中 v = t.toVector4()
    (3) get_projection_matrix 中的 eye_fov 应该被转化为弧度制
    (4) bump 与 displacement 中修改后的 normal 仍需要 normalize
    (5) 可能用到的 eigen 方法:norm(), normalized(), cwiseProduct()
    (6) 实现 h(u+1/w,v) 的时候要写成 h(u+1.0/w,v)
    (7) 正规的凹凸纹理应该是只有一维参量的灰度图,而本课程为了框架使用的简便性而使用了一张 RGB 图作为凹凸纹理的贴图,因此需要指定一种规则将彩色投影到灰度,而我只是「恰好」选择了 norm 而已。为了确保你们的结果与我一致,我才要求你们都使用 norm 作为计算方法。
    (8) bump mapping & displacement mapping 的计算的推导日后将会在光线追踪部分详细介绍,目前请按照注释实现。

    This post has received 3 votes up.
    • This reply was modified 4 years, 1 month ago by 助教.
    • This reply was modified 4 years, 1 month ago by 助教.
    • This reply was modified 4 years, 1 month ago by 助教.
    • This reply was modified 4 years, 1 month ago by 助教.
    • This reply was modified 4 years, 1 month ago by 助教.
    • This reply was modified 4 years, 1 month ago by 助教.
    • This reply was modified 4 years, 1 month ago by 助教.
    in reply to: 作业三 关于phong模型的问题 #3925 Score: 0
    助教
    Keymaster
    14 pts

    不,问题在于 normal 本身就是法向量,而你得到的 ne=normal-point 没有任何物理意义。所以我认为你需要仔细检查下自己对于法向量这一概念的理解。

    in reply to: 作业三 关于phong模型的问题 #3921 Score: 0
    助教
    Keymaster
    14 pts

    又看了看,你试着把所有用 nn 的地方换成 normal 试试。

    in reply to: 作业三 关于phong模型的问题 #3919 Score: 0
    助教
    Keymaster
    14 pts

    你说的对,我糊涂了,再看一看你的代码。
    之前那条 post 我先删了,避免误导别人。

    in reply to: 作业三bump与displacement显示问题 #3905 Score: 0
    助教
    Keymaster
    14 pts

    楼下说 1 -> 1.0,我觉得很对

    in reply to: 作业三bump与displacement显示问题 #3904 Score: 1
    助教
    Keymaster
    14 pts

    楼下说 1 -> 1.0,我觉得很对

    This post has received 1 vote up.
    in reply to: 作业三bump与displacement显示问题 #3903 Score: 0
    助教
    Keymaster
    14 pts

    原来是这样,估计那两位也是了吧。

    in reply to: 作业三bump与displacement显示问题 #3896 Score: 0
    助教
    Keymaster
    14 pts

    请将代码发到 lgz17@mails.tsinghua.edu.cn,我尽力帮忙看看。

    in reply to: 作业三bump与displacement显示问题 #3895 Score: 0
    助教
    Keymaster
    14 pts

    请将代码发到 lgz17@mails.tsinghua.edu.cn,我尽力帮忙看看。

    in reply to: 作业三bump与displacement显示问题 #3894 Score: 0
    助教
    Keymaster
    14 pts

    请将代码发到 lgz17@mails.tsinghua.edu.cn,我尽力帮忙看看。

    in reply to: 作业三 代码编译错误 #3875 Score: 0
    助教
    Keymaster
    14 pts

    (cwiseProduct)

    in reply to: 作业三 代码编译错误 #3874 Score: 0
    助教
    Keymaster
    14 pts

    建议严格按照注释提示的 // Use: fragment_shader_payload payload( interpolated_color, interpolated_normal.normalized(), interpolated_texcoords, texture ? &*texture : nullptr); 来实现。

    in reply to: 作业三 代码编译错误 #3872 Score: 0
    助教
    Keymaster
    14 pts

    既不是点积也不是叉积,是对应维相乘 (cwiseProduct)

    in reply to: 作业三 代码编译错误 #3865 Score: 0
    助教
    Keymaster
    14 pts

    是在课程提供的虚拟机上编译的吗?

    in reply to: 作业三问题 #3856 Score: 0
    助教
    Keymaster
    14 pts

    由于没化弧度,部分三角函数计算出错导致 tex_coords 变成 nan,进而引发崩溃。

    in reply to: 作业三问题 #3855 Score: 1
    助教
    Keymaster
    14 pts

    你程序崩溃是因为 get_projection_matrix 中没有将 eye_fov 由角度制化为弧度制,抱歉由于作业一批改进度较慢而无法及时让你们更正这一问题。

    This post has received 1 vote up.
    in reply to: 作业三问题 #3850 Score: 0
    助教
    Keymaster
    14 pts

    取值方法是正确的,请把完整的代码打包发给我的邮箱 lgz17@mails.tsinghua.edu.cn , 我将详细看看。

    in reply to: 作业三完成任务1,2后的错误结果 #3839 Score: 0
    助教
    Keymaster
    14 pts

    请问你是否使用了最新的更正框架?

    in reply to: 作业三问题 #3836 Score: 0
    助教
    Keymaster
    14 pts

    请直接将你现在实现的部分拷贝到更正后的框架中,再次编译运行。框架不止更正 p=150 这一个问题。

    助教
    Keymaster
    14 pts

    嗯,补充更正:将 main.cpp 187行的注释修改为 // Position p = p + kn * n * h(u,v)

    This post has received 1 vote up.
    助教
    Keymaster
    14 pts

    更新框架后默认使用 spot_triangulated_good.obj,此问题应该不存在了。

    助教
    Keymaster
    14 pts

    h(u,v) 指的就是 payload.texture->getColor(payload.tex_coords(0), payload.tex_coords(1))(0),既可以取第一维也可以取 norm.

    displacement 的 p 指的是 point, 也就是 payload.view_pos.

    我猜测你将取第一维改成 norm 就可以解决问题,不过我认为你的结果已经是可以接受的。

    • This reply was modified 4 years, 1 month ago by 助教.
    in reply to: 作业3发布公告 #3796 Score: -1
    助教
    Keymaster
    14 pts

    各位同学,非常抱歉!
    由于我的疏忽,作业3框架中存在一些较为明显的问题。
    现在我已经更正了代码框架中的问题,并且相应地调整了文档,请所有同学在更正后的版本上继续完成作业。
    清华云盘链接:https://cloud.tsinghua.edu.cn/f/324634252f4a47578062/?dl=1

    This post has received 1 vote down.
Viewing 30 posts - 31 through 60 (of 73 total)