Unreal Engine 5 Tutorial - Technical Shading - HLSL Brick/Tile Generator

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ม.ค. 2025

ความคิดเห็น • 10

  • @Shilin_GG
    @Shilin_GG 2 ปีที่แล้ว +1

    Thanks for share!

  • @ellenribeiro15
    @ellenribeiro15 9 หลายเดือนก่อน +1

    If anoyone have problems with the colors, I could it fix it just put in outputType in the custom component to CMOT Float 3

  • @torgath5088
    @torgath5088 2 ปีที่แล้ว

    Incredible!

  • @oskaroskar9589
    @oskaroskar9589 ปีที่แล้ว

    i have a question, we write that if(tex.x >= dim.x.... if its true the color is mortar. but it looks that it change color to colBrick. It seems that values x10 y24 are higher than 0.8 0.8 in dimension. Can you explain me once again?😵

  • @kennykenken4567
    @kennykenken4567 6 หลายเดือนก่อน

    Is there a way to write the HLSL code directly in vs code(without having to copy paste back and forth)?

    • @helmofhades23
      @helmofhades23 2 หลายเดือนก่อน

      there is now, if you add a custom node you can type it in directly. tested on UE 5.4.4

  • @Wei-su3dn
    @Wei-su3dn ปีที่แล้ว

    This is awsome! Thanks for this tutorial! Mind if I ask why divide by 2, I tried plug in vector2 to offset but the preview of material was not what I expected to see. especially the (0.25, 0.25 ) and (0.5, 0.5). They seem to moving the UV a bit based on the math of frac function, so whenever we have something thats over 1 with (uv.x * grid.x + offset.x) then the frac function give something with the reminder and compared that with that with dim.x make it hard to see the outcome of the uv.

    • @renderbucket
      @renderbucket  ปีที่แล้ว +1

      There are probably better ways of coding this than what I did here which is a bit wonky and messy, I'm not great at Math. But to answer your question why Divide by 2. Its just a offset that centers the drawing of the Shape (Square or Rectangle by half its Height/Width). It does this by modifying the tiling and offset.
      A remainder is being produced which ends up tiling the UVs by a additional 1/4th of a single tile as well as effecting the offset.
      One thing that can help when trying to troubleshoot these things or see actual values being produced is to use the Debug nodes in Unreal. It will out put the actual values from a variable. Or you can also use the Tools->Debug->Pixel Inspector which is also a valuable tool when doing shading in Unreal.
      There's so many different ways you can tile things like this to give different configurations and patterns. Perhaps ill do a video on that and debugging values at some point.

    • @Wei-su3dn
      @Wei-su3dn ปีที่แล้ว

      @@renderbucket Thanks!!!! I got what you mean now. The pattern is a box so divide by half make sense to have the pattern tilling over the corner!

  • @Trucker-Belly
    @Trucker-Belly 8 หลายเดือนก่อน

    Bricks are installed in a running bond pattern. Which means each row is staggered and the joints overlap at the halfway point. This isnt brick pattern, its called a stacked pattern. 😂