Using Custom Nodes in UE4 - Tips & Links

1 Like

Perhaps the biggest tip of all:

Do all your work in a real text editor, then paste it into the custom node

Otherwise you’ll end up murdering people.

4 Likes

There aren’t enough likes on this forum to truly express how much I agree with this.

Since in a custom node you can’t exactly (easily) input other custom nodes, I found defining your functions in a Struct is something I found pretty useful

So something like:

struct ExampleStruct
{
    float ExampleFunc(float input)
    {
        return input;
    }
}

ExampleStruct f;

return f.ExampleFunc(0);

I found this is the next best thing to just adding though a .USF, and haven’t really seen this documented anywhere

I’ve got a better example here that shows an actual use case, this can all hypothetically just be pasted into the custom node:
https://github.com/BhMbOb/Code/blob/master/Shaders/shd_volumeRaymarch_default.hlsl