User Tag List

Results 1 to 34 of 34

Thread: Material Function - World Aligned Texture/Normal With offset & Rotation.

  1. #1
    2

    Red face Material Function - World Aligned Texture/Normal With offset & Rotation.

    Hello All,

    Someone on our fb group needed a way to rotate a Texture object, while using the regular world aligned texture/normal and that is a hard thing to do..
    I decided to recreate these two nodes with additional features, and cleaning up/removing a few features (that nobody seem to use).



    - Texture Object input.
    - Texture size.
    - Texture Scale. (Because I find it useful)
    - Rotation Degrees. (0 - 360)
    - Texture Offset.

    Since a video does more than pictures and words alone:


    Added Alpha support:


    _____________________

    Update 1.03:
    - Added seperate axis rescaling options.

    Update 1.02:
    - Texture version now comes with alpha channel support.
    - Added 4.15 version


    Update 1.01b
    - Fixed normal rotation issues. it *should* work properly now.

    Update 1.01a

    - Fixed a vector3 bug in both regular and normal version, should have been vector2
    - Made sure the normal version is exposed to the library.

    - Created a new versions of both the worldAlignedTexture & WorldAlignedNormal where each axis (X, Y, And Z) can separately be scaled, rotated, offset.



    - Added example project with materials & Material instances.

    If you are interested, you can get these mat functions here:
    https://gumroad.com/l/tZpK


    Just add zero dollar if you don't feel like donating
    Last edited by Luos; 06-13-2017 at 03:57 PM.

  2. #2
    1
    Updated!

    - Fixed a vector3 bug in both regular and normal version, should have been vector2
    - Made sure the normal version is exposed to the library.

    Created a new versions of both the worldAlignedTexture & WorldAlignedNormal where each axis (X, Y, And Z) can seperately be scaled, rotated, offset.



    - Added example project with materials & Material instances.

    Can be downloaded from:
    https://www.dropbox.com/s/jl21dyenx0catjm/Luos_Mat_Functions.zip

  3. #3
    0
    Thanks Luos! They're good.

  4. #4
    1
    Hello, I just wanted everyone to know the tool is also available on GumRoad:
    https://gumroad.com/l/tZpK

    Just add zero dollar if you dont feel like donating

  5. #5
    0
    This is leagues better than the World Aligned Texture node provided with the engine. Thanks!

  6. #6
    0
    Supporter
    Join Date
    Jun 2015
    Posts
    3
    Cool node, that wouble better if rotation,size and offset x/y/z were single vector3 isntead of 3 scalars, to reduce clutter in material editor, so it would have 4-5 inputs instead of 11.

  7. #7
    0
    I seem to be having some trouble getting the Luos_WorldAlignedNormalAndRotation to work. Adding a rotation value does rotate the maps but my normal maps aren't getting their vectors updated.
    Name:  Luos WA normals not rot properly.JPG
Views: 5546
Size:  99.2 KB Name:  Luos WA normals not rot properly_2.JPG
Views: 5512
Size:  58.8 KB

    Am I doing something wrong here? Did an engine update break something? Any help would be greatly appreciated.

  8. #8
    0
    Quote Originally Posted by D3F3N357R40R View Post
    I seem to be having some trouble getting the Luos_WorldAlignedNormalAndRotation to work. Adding a rotation value does rotate the maps but my normal maps aren't getting their vectors updated.
    Name:  Luos WA normals not rot properly.JPG
Views: 5546
Size:  99.2 KB Name:  Luos WA normals not rot properly_2.JPG
Views: 5512
Size:  58.8 KB

    Am I doing something wrong here? Did an engine update break something? Any help would be greatly appreciated.
    It does sort of work when the mesh and/or the lighting is dynamic, but to actually get this correctly, it would need some weird math/lerp/blending between the normal map's red and green channel.. or was it something with the blue channel.
    its 1:30 am and brain is fried.

    Ill come back to this later

  9. #9
    0
    Cool, thanks! I will check back later then.

  10. #10
    0
    Infiltrator
    Join Date
    Apr 2015
    Posts
    16
    The NormalMap have some problems,can you update this functions will be very helpful~

  11. #11
    0
    Just (finally) updated the functions to adress the normal map rotation issue:
    https://gumroad.com/l/tZpK

    Let me know if it works properly now.
    Also, apologies for the laaaaaate fix, totally forgot about it untill paul posted his comment.

  12. #12
    0
    Great node!
    How to use ParallaxOcclusion with it?
    Last edited by brothermechanic; 04-07-2017 at 10:29 AM.

  13. #13
    0
    Quote Originally Posted by brothermechanic View Post
    Great node!
    How to use ParallaxOcclusion with it?
    No clue, never used it.
    You might need to try it with a heightmap or whatever and see if it works.

  14. #14
    0
    Hello
    I play with your nodes and parallax
    https://drive.google.com/file/d/0B2gY2jqH8FS8dWVVWHVObWlRaFk/view?usp=sharing
    Works only on +x +y +z
    But in -x -y -z height is inverted
    Can you help me to improve this function?

  15. #15

  16. #16
    0
    NO!
    It work only on cube and don't works on complecs objets (((

  17. #17
    0
    Quote Originally Posted by brothermechanic View Post
    NO!
    It work only on cube and don't works on complecs objets (((
    Please update posts instead of constantly adding new ones and basically hijacking/bumping the thread
    Also, a 600mb zipfile? cmon, nobody is gonna download that.

    I'll give the setup a try when I have time, in the meantime please be patient.

  18. #18
    0
    Hello
    Finally i fount a problem
    Abs World Position get polygon rotation from first uv! (i think)
    AND
    If uv rotation not by positive uv (as it in scene by x y z) its ok, if not - its parallax renders with an issue!
    You can try

    BUT
    My shader has 3 parallax node and become red in shader complexity (((( So i must to forget about this way....

    Second
    I fount build in unreal world texture coords (forget name) Whats the diffence beetwen yours? Why you created yours? Or it is yours already?

  19. #19
    0
    Quote Originally Posted by brothermechanic View Post
    Hello
    Finally i fount a problem
    Abs World Position get polygon rotation from first uv! (i think)
    AND
    If uv rotation not by positive uv (as it in scene by x y z) its ok, if not - its parallax renders with an issue!
    You can try

    BUT
    My shader has 3 parallax node and become red in shader complexity (((( So i must to forget about this way....

    Second
    I fount build in unreal world texture coords (forget name) Whats the diffence beetwen yours? Why you created yours? Or it is yours already?
    I gave it a try, but the parallax occlusion mat function is such a mess that I dont feel like bothering with it.
    As for the function, I did not realize there was one available untill a few months after I made mine.
    It works rather identical, though mine is cleaner and especially the normal one has a few instructions less.

  20. #20
    0
    I have a question. How do you control Normal intensity. Whatever
    I do I cannot get the intensity

  21. #21
    0
    Quote Originally Posted by Roginich View Post
    I have a question. How do you control Normal intensity. Whatever
    I do I cannot get the intensity
    not part of this tool. use a flatten normal node.

  22. #22
    0
    Luos, thanks a ton for these nodes. Practical uses in many situations! On another note, does anyone know how to access the alpha channel after its been aligned? I want to mask floor tile roughness so some are glassy and some are matte. Normally I would use the alpha channel of the diffuse, but since I couldn't access the alpha I used a separate texture lookup for the mask. Is there a better way? I attached the material in question to demonstrate.
    Name:  WorldAlignedMask.jpg
Views: 1864
Size:  323.7 KB

  23. #23
    0
    Quote Originally Posted by QuasiBerrry View Post
    Luos, thanks a ton for these nodes. Practical uses in many situations! On another note, does anyone know how to access the alpha channel after its been aligned? I want to mask floor tile roughness so some are glassy and some are matte. Normally I would use the alpha channel of the diffuse, but since I couldn't access the alpha I used a separate texture lookup for the mask. Is there a better way? I attached the material in question to demonstrate.
    you need to plug the alpha channel into it separately.
    first pin = RGB, then R pin, G pin, B pin, Alpha pin.


    also showing some slightly more advanced setup on how to keep textures panned/rotated.





  24. #24
    0
    Quote Originally Posted by Luos View Post
    you need to plug the alpha channel into it separately.
    first pin = RGB, then R pin, G pin, B pin, Alpha pin.
    Sorry Luos, not sure I understand. How can I use the alpha pin separately on a texture object?

  25. #25
    0
    Quote Originally Posted by QuasiBerrry View Post
    Sorry Luos, not sure I understand. How can I use the alpha pin separately on a texture object?
    apologies, just woke up when I wrote that hehe.
    These functions do not allow for the alpha channel because I never added support for it.
    As someone who almost never uses alpha channels it didnt cross my mind.

    I need to do some testing when I have time, but i'll see if i can add the functionality (or a new function) to support alpha channels.

    (nudge me in a week if i didnt, because I either forgot or got busy)

  26. #26
    0
    Quote Originally Posted by Luos View Post
    apologies, just woke up when I wrote that hehe.
    These functions do not allow for the alpha channel because I never added support for it.
    As someone who almost never uses alpha channels it didnt cross my mind.

    I need to do some testing when I have time, but i'll see if i can add the functionality (or a new function) to support alpha channels.

    (nudge me in a week if i didnt, because I either forgot or got busy)
    Hey Luos! Great work!

    I too need support for the alpha channel since I'm in the same boat as QuasiBerrry Hopefully the alpha functionality isn't too difficult to add on your end!

  27. #27
    0
    Quote Originally Posted by Zaidenknopka View Post
    Hey Luos! Great work!

    I too need support for the alpha channel since I'm in the same boat as QuasiBerrry Hopefully the alpha functionality isn't too difficult to add on your end!
    Added, can redownload it from gumroad
    Also added a 4.15 version.


  28. #28
    0
    Thanks Luos, you're a life saver!

  29. #29
    0
    Thanks Luos!!

  30. #30
    0
    Changed the scalar's for the texture into vector 2 so you can scale/resize each axis (of each axis) seperately

    update available at: https://gumroad.com/l/tZpK

  31. #31
    0
    Infiltrator
    Join Date
    Mar 2015
    Posts
    24
    Hi Luos,

    Does the latest release is 4.16 compliant ? I tried the 1.03 in 4.16 but the material editor preview seems getting a different result when it is applied in the scene.

    Regards,

    hlx

  32. #32
    0
    Quote Originally Posted by hlx View Post
    Hi Luos,

    Does the latest release is 4.16 compliant ? I tried the 1.03 in 4.16 but the material editor preview seems getting a different result when it is applied in the scene.

    Regards,

    hlx
    you might have to manually port it from 4.15 to 4.16, but it works like a charm for me.

  33. #33
    0
    Infiltrator
    Join Date
    Mar 2015
    Posts
    24
    Quote Originally Posted by Luos View Post
    you might have to manually port it from 4.15 to 4.16, ...
    What do you mean by porting it ? What I did was just to place the directory named Mat_functions in the game/content directory of my 4.16 project. Is it the way you recommend ?

    Hlx

  34. #34
    0
    Quote Originally Posted by hlx View Post
    What do you mean by porting it ? What I did was just to place the directory named Mat_functions in the game/content directory of my 4.16 project. Is it the way you recommend ?

    Hlx
    IF it doesnt work, put it in a 4.15 project, and convert the project to 4.16.
    I dont think I have seen any changes that would need to do that though.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •