WTF Is? Material - World Position in Unreal Engine 4 ( UE4 )

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ต.ค. 2024
  • What is the Material: World Position Node in Unreal Engine 4
    Source Files: github.com/MWa...

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

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

    At the end of a nearly 12 hour day trying to figure this out, I finally found this video. I can die happy.

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

    Thank you a lot for this!
    Two things to note here: The Z-axis is actually flipped which would become noticeable if you want to use a normal map. You have to multiply the B-value of the world position by -1 first. Speaking of normal maps, they seem to be incompatible with the PixelNormalWS node so I just replaced that with a VertexNormalWS node, which did exactly the same in my case.

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

      hello. could you throw off a screenshot of what all the nodes together should look like in the end? I have problems when I do multiply the B-value of the world position by -1

  • @R462venom
    @R462venom 6 ปีที่แล้ว +8

    Hey everybody! To get normals to work, use VertexNormalWS instead of PixelNormalWS and it should work.

  • @imperatormegatron2014
    @imperatormegatron2014 8 ปีที่แล้ว

    Wow the sheer amount of content you created, awesome. Gonna eat through it all. Thank you. )

  • @yaserbakri1618
    @yaserbakri1618 7 ปีที่แล้ว +14

    Thanks for this great video and awesome solution, I have one question please , I tried to attach this formula to a normal texture sample but it's giving an error with the pixel normal ...
    how can I fix this to keep the normal map running accordingly with the diffuse and roughness maps??

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

      MHD Yasser Albakri any solutions?

    • @dorinchira7197
      @dorinchira7197 5 ปีที่แล้ว +10

      @@NocteStudios Use VertexNormalWS instead of PixelNormalWS

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

      @@dorinchira7197 Life saver... thank you for tips. Normal map work fine

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

    What would be the blueprint version of "Camera Relative World Position (Including Material Shader Offsets)" ????

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

    Really cool that you were able to do this yourself. Does WorldCoordinate3Way do the same thing?

  • @s16161
    @s16161 7 ปีที่แล้ว +2

    What I have to change to use this in the Normal ? Thanks for the video!

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

    Perfect tutorial man! I really need to know how to blend an asset into the terrain. Is there a way to do that? I really need an answer asap if at all possible. Thanks so much!!

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

    anyway when do I use excluding material material offset?

  • @lorenznoichl3252
    @lorenznoichl3252 7 ปีที่แล้ว +5

    actually it doesnt work with the normal... have you got an advice for that? i get errors when i plug in the normal texture wich makes the tiling in my material

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

      Found a solution, perhaps. Helps PixelNormalWS swap to the VertexNormalWS. Yeah, late, but that´s more for others like me in the future o:

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

    Hi. Super useful tutorial. Thanks!
    1 Big question: Is it possible to add a parameter to obtain a softer transition between the sides? Let's say if I had a sphere or a cylinder and I wanted to avoid seeing an abrupt transition.

    • @АрхивариусСХ
      @АрхивариусСХ 2 ปีที่แล้ว

      Same question. Have you found a solution how to do it?

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

      @@АрхивариусСХ yes, unfortunately it's impossible with this method :/

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

    Is there a way to get Global Illumination to work with this tileable material? The material would receive bounced light, but won''t bounce the light.
    Cannot get GI to work with this setup nor with the WorldAlignedTexture node.
    GI works when WorldPosition node is removed. But with WorldPosition node - nada. ???

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

    What astounds me is what are there not defaults for these?

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

    really nice man

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

    Man I'm a beginner, was just trying to folow along but I couldn't figure out what the golden blueprint component was with the two coordinates, if anyone knows, that would dbe awesome

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

    Question: Could I use something like this for modular assets? Say if I build and unwrap a church and need a material tiled across elements of it (window wall, archway wall etc), could I do something similar?

  • @Kinosei30
    @Kinosei30 8 ปีที่แล้ว

    How can I add an offset in x and y? I have the tiled texture of some square stone floor and I want it to align the seams with the walls, and onlywith this world position node it is not aligned. I tried to put an add node after the multiply node, but it seems it's not doing anything.

  • @autentikum
    @autentikum 8 ปีที่แล้ว

    Hi Mathew, do you happen to know how to fix world alignment on vertical cordinates, or how to just rotate them to face the camera? Thanks in advance!

  • @Cyberpunk_RZ
    @Cyberpunk_RZ 4 ปีที่แล้ว

    one more question how do I get an absolute position on a complex SM "car"? that it doesn't look drawn in some places.

  • @RiccoDaniiDev
    @RiccoDaniiDev 8 ปีที่แล้ว

    Could you go over various uses of the Blueprint: Gamestate and How to use UE4's Saving System!!! Keep up the amazing work! You're definitely credited in my game!

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

      +Amaranthine Story The UE4 Saving system is covered using the GameSave object in this video here, th-cam.com/video/_4usRrTiqak/w-d-xo.html
      I do plan on doing one on GameState itself at some point but it's a tricky thing to make sure it cover all of it's quirks in single VS multiplayer and what you might use it for. I have used it in the past in some of the longer game jam videos so there are some uses of it in there.

    • @RiccoDaniiDev
      @RiccoDaniiDev 8 ปีที่แล้ว

      +Mathew Wadstein Okay I will check it out! I was wondering if it could be used to store variables from the player character to be accessed from anywhere in real time?

    • @MathewWadsteinTutorials
      @MathewWadsteinTutorials  8 ปีที่แล้ว

      +Amaranthine Story Yes if you wanted to do something like a "global" storage area then GameState would work for that. You can always get the player character from pretty much anywhere tho so there would not really be a reason to do that tho. The GameState would be more for keeping things like a global score or perhaps the timer for your game that is not really tied to any one thing but for the game itself.
      Note that GameState is deleted whenever the map changes or GameMode changes so that is something to keep in mind. GameInstance is more geared to keeping persistent information between maps and such as there is one GameInstance per game that is created when it starts and stays alive until the game is quit.

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

    Question: If I wanted to use the custom UV vertex shader instead of the pixel shader to find the direction that the cube is facing, what could I use instead of the Pixel Normal?

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

    Thank's Mathew for very helpfull work ! keep it comi'n :)

  • @ceofi
    @ceofi 4 ปีที่แล้ว

    I'm assuming you're using a 2k texture, that's why you've used 50 in the scalar param? Also how could i make the scalar value to be set as 1 by default and have the correct aspect ratio?

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

    Why are you multiplying a constant2 with the mask? Does it determines the size of the texture?

  • @MrBaptista69
    @MrBaptista69 7 ปีที่แล้ว +2

    has someone solved the error with the normal input?

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

    How would I keep the world position texture rotation when I rotate the object?

  • @TheT0N14
    @TheT0N14 7 ปีที่แล้ว +2

    How to combine World Position with TexCord (texture scalling ?

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

      change the divide parameter

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

    now i can rest in peace... .

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

    Nice tutorial!

  • @johnysilantiy1186
    @johnysilantiy1186 8 ปีที่แล้ว

    Hello Mathew,
    Can you explain how to do the same with a normal texture (to align it with base color texture)?

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

      +Johny Silantiy So for doing the Normal it would require some more changes as you cant use the PIxelNormalWS as you have a Normal itself for the input. There is however something that you might want to look into instead if this is your goal as it would give you more options. Check out the WorldAlignedNormal node and the one below it (Texture) for basically a custom function Epic created to do what you are looking for and what we basically created above but with more. You can also double click on any of these custom functions to see exactly how they did them as well. I will be covering these in the future =)
      Epic Docs: docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/Functions/Reference/Texturing/index.html#worldalignednormal
      Example using it: i.gyazo.com/6583093143a5e645c15821738d15bc79.png

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

    Hey, when i try to put abs to B gives me an error saying that B has to be a float, what should i do?

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

    U helped me, thanks.

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

    is there a way to use this with POM ???

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

    Thank you a lot)))))

  • @MaximMikeBazala
    @MaximMikeBazala 4 ปีที่แล้ว

    pom pom pom pom pom pom pom pom (y, right, 8 times)
    thank you for your short, but very helpful descriptions :)

  • @littlemoomin8899
    @littlemoomin8899 4 ปีที่แล้ว

    I feel really stupid . which current pixel --' ?

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

    thats very useful for lakes n shit
    great video btw (Y)

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

    I don't see the absolute world position node? Do older versions not have it?

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

      Nevermind, its literally "world position" when you search for it.

  • @소드마스터-j2r
    @소드마스터-j2r 6 ปีที่แล้ว +1

    i solve my problem thanks

  • @Cyberpunk_RZ
    @Cyberpunk_RZ 4 ปีที่แล้ว

    THX

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

    cool

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

    complejo la ultima parte