WTF Is? Material - Texture Coordinate in Unreal Engine 4

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

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

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

    The option to un-mirror U and/or V coordinate is primarily for two-sided materials or materials used on an object that has a front and back (or top/bottom) pairing that should line up rather than being the same. For example, suppose you have a modular interior wall with a door frame that is closer to one end, and your stylized material includes some darkening to simulate shadows around the door frame. You might make this wall from a single flat mesh with a two-sided material, or it might be two such meshes with a narrow gap between.
    In this project, the darkened area for the door frame needs to be toward the left when viewed from one side of the wall, but toward the right when viewed from the other side. If you use a two-sided material, you would select the mirrored or non-mirrored UV coordinate based on the front of back facing of the pixel being rendered There is a built-in node in Unreal and most other 3D engines that is a Boolean indicating front or back face, and you can use that with a Switch node to choose which version of the Texture Sampler to use.
    For two single-sided wall meshes facing opposite directions, you need two Material instances with a Static Boolean Switch parameter to choose the mirrored variant for one instance and the non-mirrored variant for the other. [*] Exposing this option as a parameter does allow you to make modular assets with left and right variants.
    If you are making a transparent or translucent material, or one with opacity masking to allow cutout holes, the situation is almost the same as for a two-sided material in the wall example.
    As the video suggests, this option can also correct flipped textures from the artwork, but in my experience the more common use is to deal with the front/back facing I've described here.
    [*] There are fancier ways to achieve this such as encoding the left/right variant info into vertex colors, checking the object-space vertex or pixel normal, etc., but those are for another video. :)

  • @DevinDTV
    @DevinDTV 7 ปีที่แล้ว +4

    Luckily you made like 500 videos explaining many of these things so I actually have a clue what's going on.

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

    wanted to know what the coordinate index actually did is there a place i could learn that?

  • @dvr102
    @dvr102 3 ปีที่แล้ว +2

    How to convert this as a parameter?

    • @business2015
      @business2015 3 ปีที่แล้ว +2

      th-cam.com/video/y7yWSlzxu-4/w-d-xo.html

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

      @@business2015 thanks! So basically create a parameter (0-1) and then multiply with the Texture Co-ordinate value

    • @business2015
      @business2015 3 ปีที่แล้ว +3

      @@dvr102 Yes, and you can also create parameters for the starting offset, as shown here: th-cam.com/video/sZm0dIusJdo/w-d-xo.html So you could create a texture atlas with content of various sizes.

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

    how can i change the mapping coordinates of the textures to follow the normals instead of the uv map?

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

    how to make a parameter for X and Y if i wanna make material instance

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

      In the node palette, look under Parameters. You can either create separate Scalar Parameter inputs for U and V, then combine their outputs with a MakeFloat2 node and multiply the resulting Vector2 by the TexCoord to get the UV for your TextureSamplers, or you can use a Vector Parameter to get three axes and then use a Component Mask node selecting only R and G (ignoring B and A). The Vector Parameter node shows a color picker, but you can put any numbers you want into the R, G, B, and A fields by typing the data into the fields.
      Remember to give each parameter a name and tooltip so users of your material will know what it does. :)

    • @antoinetteengelbrecht-schn7421
      @antoinetteengelbrecht-schn7421 ปีที่แล้ว

      @@scottcourtney8878 I searched for this for so long. THANK YOU. This saved my day!

  • @randomstuff6094
    @randomstuff6094 5 ปีที่แล้ว

    i have 5 tiles of textures how would i connect it at once as a diffuse?

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

    helped me so much! Thx for the vid!

  • @yans.d.4174
    @yans.d.4174 8 ปีที่แล้ว

    Thanks so much man, great tutorials !!

  • @alessandr0ananias
    @alessandr0ananias 7 ปีที่แล้ว

    This is very helpful - thansk Matt

  • @NeroForte_
    @NeroForte_ 3 ปีที่แล้ว

    WTF is the best UE short tutorials. Mathew is

  • @kaushiquedhrubo908
    @kaushiquedhrubo908 6 ปีที่แล้ว

    saved my day bro....

  • @3rdDimensionFox
    @3rdDimensionFox 6 ปีที่แล้ว +1

    Thanks dude

  • @derpchronicles1450
    @derpchronicles1450 7 ปีที่แล้ว

    really helpful :3

  • @matheusjoga5114
    @matheusjoga5114 9 ปีที่แล้ว

    thx man