Home Coding, Scripting, Shaders

UE4 BreakOutFloat3Components Questions

Hey all,

I'm trying to understand some nodes that I'm not familiar with in UE4. I followed a tutorial for a moss shader and am trying to understand what exactly the BreakOutFloat node does, as well as why the R channel has specifically been used to get the values for specular and roughness. As far as I understand, the node takes a Float3 value and breaks it in to three seperate float values, but as for what the outputs are and how they derive the values for RGB, I have no clue.

So what exactly does the node do and how would you know which outputs to use for different circumstances?

(Also apologies if this is in the wrong forum, I'm new here!)


Replies

  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    BreakOutFloat_Components is just a Material Function with Component Masks. It's a cleaner way of splitting a RGB/RGBA texture to individual channels in cases where you don't have access to those channels directly or instead of placing multiple Component Mask nodes since they only output a single channel. You could update the WorldAligned function to output the exact same thing if it's something you end up having to do often. 

    As for why they used the red channel for Roughness and Specular, it's just a cheap way of getting Spec/Roughness variation. It's a weird workflow that I really don't care for personally. You could pick any of the 3 channels based on the Base Color texture and which channel has the desired contrast, but it's all arbitrary.
  • evelyngardner
    Options
    Offline / Send Message
    Ah that makes sense now, thanks so much for taking the time to explain it. Much appreciated!
Sign In or Register to comment.