2 ways Material fade wall when block camera - UE5 unreal

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • Code for material 1: blueprintue.co...

Комментарии • 5

  • @aelx4132
    @aelx4132 29 дней назад

    that is so sick! keep up with the good content

  • @stereocodes
    @stereocodes 28 дней назад +1

    Interesting. I wonder though why not use a linetrace from the camera to the wall. Or a line trace from the camera to the player character. If the line trace is intersected by the wall then do the fade? wouldnt that be an easier solution than having to hand place collisions? also collisions have a higher cost than the line trace I believe. You could add a tag to the mesh "canfade" or something so that you can control it in finer detail. The masking is a solid tip though, thanks!

    • @nixies78
      @nixies78  28 дней назад

      @@stereocodes it could work with a line trace. However it has a few issues, first cost, line trace would need to fire on tick or something regular to check it if their was something in the way. This would be a constant cost. The second option I show in the video is my favourite everything is done on the material level so no need for extrajust a little cost on the GPU.

    • @stereocodes
      @stereocodes 28 дней назад

      @@nixies78 maybe you would use tick but I would use an interval because I could turn it off and it would be polling at a far lesser value than every frame. on top that it wouldnt require hundreds of hit boxes in the scene if it were an open world. the line trace scales better than the hitbox solution. You would still use your technique with the material mask but it would require almost no setup with additional actors.

    • @nixies78
      @nixies78  27 дней назад

      @@stereocodes I'm getting lost now. The first example is just a material. No hit boxes or anything. It just works on distance from camera. But yer, line trace would work well.