Sine and Cosine Nodes | 5-Minute Materials [UE4]

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025
  • Hey Prismaticult! In today's episode of 5-Minute Materials we're looking at the Sine and Cosine Nodes! These node are essential in creating animated textures and can provide the basis for a TONNE of shader-based effects including fluctuating brightness, crazy patterns, remapping values/gradients, creating vertex displacement animations and MUCH much more.
    I also want to give a shout out to our latest Patron ~Griblet~ (Isaac) who is an amazing 2D artist dipping their feet into the 3D world. (Links to their work SOON)
    ------------------------------
    Discord - / discord
    Patreon - / prismaticadev
    Twitch - / prismaticadev
    Twitter - / prismaticadev
    ------------------------------
    Computer Specs:
    Ryzen 3900x 12-core CPU
    MSI Geforce RTX 2080 Super
    64GB Corsair RAM
    One of those fancy nvme m.2 SSD's
    Programs of choice:
    Unreal Engine 4 - (Game Dev)
    Blender 2.8 - (Animation and Modelling)
    OBS - (Video/screen capture)
    Davinci Resolve - (Video editing)
    Adobe Photoshop - (Graphics and Texturing)
    Quixel Mixer - (Texturing)
    ProTools 11 - (Compositions and mixing)
    OldSchool Runescape - (Chillax time)
    Filmed using:
    Sony A7s2 body
    Sony 24-70mm f/2.8 GM lens
    Yonguo YN360 LED's for colour
    Yongnuo YN760 chip LED w/ Godox softbox for key
    My lovely cats names are Boycat, Girlcat and Ladycat :)

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

  • @timboslice5351
    @timboslice5351 11 месяцев назад +9

    Your "that is fucking terrifying" reaction just made my midday. Thank you for the great videos, Charlie!

  • @TerraTFT
    @TerraTFT 2 года назад +8

    I think the most useful part about these tutorials is that you provide your thought process with these tools. Even moreso because you end up going in directions that I wouldn't personally think of, so I always end up learning a lot more than I came here for.

  • @bersK00
    @bersK00 3 года назад +21

    It's pretty funny how you can see youtube's compression+bitrate fall apart when something starts changing colors quickly around the 4 min mark :D Love this series btw!

    • @PrismaticaDev
      @PrismaticaDev  3 года назад +2

      Hahahahaha I cannot unsee this. It might even be my export settings - I tend to export at a bitrate of 35,000kbp/s since RUclips will inevitably compress it but I'll double check the exported file :P
      Glad you're enjoying! Excited to keep it going :)

  • @michaelpease2103
    @michaelpease2103 Год назад +4

    This will be incredibly useful in conjunction with a white/blue color and a rocky normal map to make ice. It will look slightly transparent at the edges but not where the ice is thicker.
    Thanks dude!

  • @Fokkusu
    @Fokkusu 3 года назад +8

    Really cool nodes, I didnt know about cosine and I was just using sine without realizing the potential it has, like yeah a little bit your video definitely expanded the horizon quite a bit, thanks ^^

    • @PrismaticaDev
      @PrismaticaDev  3 года назад +1

      I didn't think of using Cos until I was struggling with getting a sine to start at 0 but maintain 0-1. I forget what the actual case was but then I thought of Cos!

    • @Fokkusu
      @Fokkusu 3 года назад +2

      @@PrismaticaDev I imagine the moment you used cos you laughed, I have a lot of those moments where I overcomplicate stuff to find out later than the solution is really simple

    • @PrismaticaDev
      @PrismaticaDev  3 года назад +1

      @@Fokkusu Literally hahahah. I was about to remap the entire output of the thing to a curve LUT until I realised I could get it to start from 0 with Cos...

    • @Fokkusu
      @Fokkusu 3 года назад

      @@PrismaticaDev xD, thats wild, Im glad you found out BEFORE doing that

  • @Daniel-be6cj
    @Daniel-be6cj 3 года назад

    You're bit about how materials don't like negative numbers was the "A-ha!" moment that helped me get my material working, great stuff and to the point!

  • @Trueomega93
    @Trueomega93 2 года назад +2

    This tutorial is absolutely fantastic Charlie. You've explained the Sine/Cosine perfectly. As someone who struggles with visualising the math sometimes, this has helped greatly. Thank you!

  • @LarsBryrup
    @LarsBryrup 3 года назад +5

    Just happened over this by chance, saw it and a few minutes later had updated some materials in my game to use this to create a pulsing glow. Amazing series - I gotta watch 'em all!

    • @PrismaticaDev
      @PrismaticaDev  3 года назад

      Fantastic my dude! Really glad it helped out :)

  • @JayCreationsDev
    @JayCreationsDev 3 года назад +27

    we live for 5 minute materials

  • @Greenrobotvp
    @Greenrobotvp Год назад

    Dude! the way you visualize the negative 1 and 1 and why you do that is so valuable, I could never wrap my head around why I have to do that but this helps so much!

  • @snook-official
    @snook-official 2 года назад +1

    These video are great help. I was really confused using the sine node as it just seemed to be a bit a random, now I understand why, you need to divide by 2 and add 0.5 to bring it above 0. Great explanation. Thanks

  • @leehammoud
    @leehammoud 3 года назад

    Please keep bringing these tuts in! There's so much of the Materials nodes yet to be explored :)

  • @YourSandbox
    @YourSandbox 3 года назад +6

    Mathew will be jealous. Great stuff, sir !

    • @PrismaticaDev
      @PrismaticaDev  3 года назад +2

      To-may-toes To-mah-toes haha. I love Mat's videos so much!

  • @Beakman.Studios
    @Beakman.Studios 4 месяца назад +1

    wearing the stripey tshirt for the sine tutorial 🔥

  • @Titank_Production
    @Titank_Production Месяц назад

    Thx man ! it worked out perfect for me.

  • @Jiyu
    @Jiyu 2 года назад

    I made a material for a bouncy tutorial arrow with time, sine and world position offset. Ty for your amazing work!

  • @joshuaisraelalbao1877
    @joshuaisraelalbao1877 3 года назад +5

    Wonderful content, as usual!

    • @PrismaticaDev
      @PrismaticaDev  3 года назад +1

      Thanks Joshua! Very happy that you're enjoying it :)

  • @UnderfundedScientist
    @UnderfundedScientist 3 года назад

    I'm going to have to watch this entire series

  • @KINGDOMSONSTV
    @KINGDOMSONSTV 3 года назад +1

    Disco lights now tripping balls ;) wooohoooo. Great vid

    • @PrismaticaDev
      @PrismaticaDev  3 года назад +2

      Hahaha glad you enjoyed :P I have a bad habit of creating materials that hurt eyeballs.

  • @sturgisDhouston
    @sturgisDhouston 3 года назад +2

    Would be interesting to play with this node and the one you used for water, I have a feeling it could easily make a wave on the shores vibe really easily

  • @AvatarNate
    @AvatarNate Год назад +1

    Great video sir!

  • @chopov11
    @chopov11 Год назад

    Lovely video ol chap😄

  • @akiAlex
    @akiAlex 2 года назад

    Thank you!

  • @lokij6058
    @lokij6058 3 года назад +1

    Great video mate

  • @jerrythomas6649
    @jerrythomas6649 9 месяцев назад

    Thank you so much!

  • @snook-official
    @snook-official Год назад +1

    Just to add to this topic, as I've been playing around with sine and cosine.. I needed a digital pulse, i.e. on and off. In this case, the Sine wave, once normalised is more suitable. To get the pulse you need to send it into the y input of a step node with the x value set to 0.5, this means when the signal goes above 0.5 it puts out a 1, below 0.5 it puts out a 0. Because the sine wave once normalised starts at 0.5, the pulse will start exactly at the right position of the wavelength. I had to visualise this myself in photoshop to get my head around it as cosine was giving me weird results, now I know why. By using the cosine with the step node it would put out a 1 for 1 quatre of it's wavelength, then drop to 0 for the next two quarters, then return to 1.

    • @PrismaticaDev
      @PrismaticaDev  Год назад +1

      You could also use Ceil right after the sine without remapping to get a 50/50 on and off. Step is great for getting any other ratio, though, and is a lot more descriptive

    • @snook-official
      @snook-official Год назад

      @@PrismaticaDev thanks I'll keep that in mind next time I need the effect

  • @xinlingluo2017
    @xinlingluo2017 2 года назад

    Your tutorials are great, I'm bad at math but can understand what you're saying🤯

  • @LionUnchained
    @LionUnchained Год назад

    I didn't ever learn complex math but have been learning game dev, and once they started putting math inside colors just made things 10x worse. I appreciate your explanations XD

  • @ThePCxbox
    @ThePCxbox 3 года назад +2

    Can you cover the DitherTemporalAA node? I saw a video where a guy made an oldschool dithering effect (think gameboy) with it. Thats one thing you can do with it but UE4 says theres all sorts of things that you can accomplish with that node.

    • @PrismaticaDev
      @PrismaticaDev  3 года назад +1

      Definitely! It’s one of my most used nodes since I use a cel shader and translucent materials don’t work very well, so dithering is my go-to for opacity masking :) I’ll definitely look in to other applications like colour as well

  • @SirDobbers
    @SirDobbers 3 года назад +1

    You are the Sebastian Lague of Unreal

    • @PrismaticaDev
      @PrismaticaDev  3 года назад

      Haha still a long way to go to compare to titans like that, but I appreciate it nonetheless! Don't forget to share with a friend :)

  • @Muhammad_Abdullah_Sultan
    @Muhammad_Abdullah_Sultan 3 года назад

    Bro can you guide about making sine wave through materials? Of which wave length and frequency we can change on run time.

  • @johninglis2622
    @johninglis2622 3 года назад +2

    Could you use this for larva?

    • @PrismaticaDev
      @PrismaticaDev  3 года назад

      Sure could! The only limit is your imagination

  • @mrmensje1
    @mrmensje1 3 года назад +1

    Hi! I've got a question on sine wavess, Let's say you want to alter the curvature of a sine wave (0 to 1 ramps up fast, but 1 to 0 fades out slowly, keeping the timing of waves intact) is this possible? As a fix for now I've just created a gradient textur with that exact falloff between values but I'm hoping there is a math way instead :)
    Thanks so much for this awesome video :D

    • @PrismaticaDev
      @PrismaticaDev  3 года назад +1

      A gradient texture is a really good solution, although you might be able to do it cheaper by overlapping 2 sine waves, with 1 of them offset. You would probably want to visualise it with an online graph viewer to get it perfect :)

  • @alucodev
    @alucodev 2 года назад

    Is there any way of converting all of these math function nodes into a single 'Math Expression' node? In normal the Blueprint Editor I can select "Add Math Expression" but for some reason this isn't an option in the Materials Editor. No idea why.

  • @andreykireev9088
    @andreykireev9088 3 месяца назад

    Hey. What about displacement?

  • @kalex07
    @kalex07 3 года назад

    I would imagine this would be a good way of creating a lava texture or fire.

  • @cr3ap3r1
    @cr3ap3r1 Год назад

    I was wondering if there is a difference between dividing by 2 and adding .5 to remap from (-1/1) to (0/1) than just using the remap material node?

    • @cr3ap3r1
      @cr3ap3r1 Год назад

      I'll answer my own question. Using the Remap node you need to know firsthand what the minimum and maximum input range will be whereas using the math will remap the value regardless of the input range. The math is more akin to the ConstantBiasScale node. In this case, since we know the minimum input will be -1 and the maximum will be 1 we can use the Remap node in place of the math. It is just a matter of preference.

  • @Elmarath
    @Elmarath 3 года назад +2

    how adding texture to the time node works man :D that's kind a abstract...

    • @Elmarath
      @Elmarath 3 года назад

      are "1" values in future :o

    • @PrismaticaDev
      @PrismaticaDev  3 года назад

      @@Elmarath Hahaha it's very weird to wrap your head around, but can be extremely useful!

  • @omba97
    @omba97 Год назад

    Is there a way that sine goes from 0 to 1 and instead of goes from 1 to 0 start again in 0 ??

    • @PrismaticaDev
      @PrismaticaDev  Год назад

      You can Add an offset before going in to the Sine node to make it start from a different point, and you can remap it after the Sine node to turn it from -1 -> 1 to 0 -> 1.

    • @PrismaticaDev
      @PrismaticaDev  Год назад

      Although you might also be asking for the Frac node, which removes anything left of the decimal place

  • @tiger5gaming
    @tiger5gaming 2 года назад

    4:00 lmao

  • @hotnaka9016
    @hotnaka9016 2 года назад

    why do you not show the entire material nodes?

    • @PrismaticaDev
      @PrismaticaDev  2 года назад +1

      I show all of the nodes necessary to learn about the Sine function - everything else isn't relevant to the video

    • @hotnaka9016
      @hotnaka9016 2 года назад

      @@PrismaticaDev Thanks for the reply! Is there a way to make the sine node period expression into a parameter?

  • @TyLovePie
    @TyLovePie 3 года назад

    Looks like a lava material

  • @kevinhh57
    @kevinhh57 Год назад

    Cant make this in unreal 5 tho color wont change

    • @PrismaticaDev
      @PrismaticaDev  Год назад

      Could you post a screenshot of your material graph? Something likely isn't plugged in. You might also have Live Preview turned off in your material editor - does it work once it's in the world?

  • @mexico4027
    @mexico4027 3 года назад +1

    Make a tutorial about how to make water, a lake, a ocean, etc.

    • @PrismaticaDev
      @PrismaticaDev  3 года назад

      That will be something I'll definitely do when the UE4 water system becomes a bit more fleshed out! Cheers :)

    • @mexico4027
      @mexico4027 3 года назад +1

      @@PrismaticaDev jajaja or cell shaded materials xd hello from mexico

  • @apaskiewicz
    @apaskiewicz 3 года назад

    Press 3 and click to make a color input. Unreal Engine is very useless at teaching these things, took me half an hour to figure this out.

  • @GabdaRocur
    @GabdaRocur 11 месяцев назад

    I'm pretty sure I'm blind after this video