Download

Custom Output Node? (4.8 source preview)

I’ve been playing around with the rendering in the 4.8 source preview and I noticed a new option in the material nodes:

Clicking on it crashes the editor so I’m guessing it’s a work in progress but would we be able to get any details on what this will do?

I’m currently working on a custom colour buffer output from a material for use in the post processing stage so if this is going to be anything similar I might not bother wasting my time.

Or its an option to output a crash report. Which will be very custom :wink:
(sorry, couldnt resist :rolleyes:)

Its the base class for the new grass material functionality, im guessing it shouldn’t be appearing in the menu, as it does nothing by itself, and in fact the reason it causes a crash is the GetFunctionName function is marked PURE VIRTUAL. It could be used by others to add other custom output functionality similar to the grass material if extended in custom classes.

That sounds like exactly what I want to do! I’ll have a deeper dig into the code.

Edit: What file is the grass material in? I can’t seem to find anywhere.

Source\Runtime\Landscape\Classes\Materials\MaterialExpressionLandscapeGrassOutput.h should give you an idea of where to begin

Thanks, I’ve found it now. For some reason none of the files are showing up in the solution explorer. Grep to the rescue! :slight_smile:

Edit: After digging around in the code this doesn’t look like a great option for custom output if you’re planning on doing a lot of it. The compiler implementation is in HLSLMaterialTranslator.h::3700. It compilers a new function for each input so this would effectively double the shader code for each material using it to write to a custom colour buffer. I think I’m better off going with my original plan to extend the standard output nodes.