Home Forums GAMES在线课程(现代计算机图形学入门)讨论区 作业3双线性插值后效果更差了

Tagged: 

Viewing 4 reply threads
  • Author
    Posts
    • #4145 Score: 0
      Keneyr
      Participant
      6 pts

      按照自己的理解写了个双线性插值的代码,把bot_texture.png从1024*1024换成了502*502,然后尝试如下,结果效果更差了什么鬼?。。。是我哪里理解有问题吗?小伙伴们你们效果咋样?

      Attachments:
      You must be logged in to view attached files.
    • #4159 Score: 0
      Bear
      Participant
      -11 pt

      https://cseweb.ucsd.edu/classes/wi18/cse167-a/lec9.pdf
      给你个参考链接,我按这个做得

    • #4163 Score: 0
      sQ
      Participant
      2 pts

      a+coef*(b-a)

      • #4186 Score: 0
        Keneyr
        Participant
        6 pts

        失误···这里公式忘了检查。。。但是改正了之后效果还是不好···

        • #4187 Score: 0
          sQ
          Participant
          2 pts

          s t不除宽高试试

          • #4190 Score: 0
            Keneyr
            Participant
            6 pts

            好了很多~就四条腿那块儿,灰白交界处依然毛躁

            • #4197 Score: 0
              sQ
              Participant
              2 pts

              蹄子那里本来效果就比较糙吧?

              • #4198 Score: 0
                Keneyr
                Participant
                6 pts

                这样的蹄子也可以吗

                Attachments:
                You must be logged in to view attached files.
                • #4200 Score: 0
                  Bear
                  Participant
                  -11 pt

                  我的结果供参考,好像是有点问题。。。

                  • This reply was modified 1 year, 10 months ago by Bear.
                  Attachments:
                  You must be logged in to view attached files.
                  • #4203 Score: 1
                    Keneyr
                    Participant
                    6 pts

                    为啥你的色彩也这么浓郁

                    This post has received 1 vote up.
                    • #4210 Score: 0
                      Bear
                      Participant
                      -11 pt

                      重点是边缘部分吧。。。你对比下几个颜色部分的交界处确定下效果

                      你这么一说我发现我普通贴图的结果就很浓郁,看上去又不像出错。。。

                      • #4412 Score: 0
                        Keneyr
                        Participant
                        6 pts

                        老铁们我知道我错在哪儿了,texture.cpp中,getcolor()函数里面,应该把width-1,hieght-1。完了之后,双线性插值效果特别好

    • #4165 Score: 0
      戴皓天
      Participant
      8 pts

      lerp写错了吧,楼上说的是对的,既然第一个参数c代表百分比,那不应该是(1-c)*a+c*b吗

    • #4527 Score: 0
      lllu
      Participant

      我能不能问一下为什么要width-1,hieght-1呀

      • #4529 Score: 0
        L-Sun
        Participant

        uv坐标是0到1,比如u刚好为1的时候,得到的width刚好是1024,而图片的坐标的范围是0~1023,所以要width-1。height同理

        • #4530 Score: 0
          lllu
          Participant

          嗷 我明白了!谢谢你!

Viewing 4 reply threads
  • You must be logged in to reply to this topic.