Custom graph and PCGPainterActor
Last updated
Last updated
As said at the , the tool works in steps, it generates the scattered points then executes a custom graph created by the user, with those points as inputs.
The core graph which will generate the root and scattered points is "PCG_PainterGraphPreparePoints". It can be found in PCGPainter/PCGGraph folder.
In this graph, a node "Execute PCG graph processor" will execute the custom graph selected by the user or the graph set in custom PCGPainterActor.
An exampler of PCG graph processor is available in the "PCGPainterData" folder "PCG_PainterExample"
Few attributes are available to help you build the systems you need:
__BrushCustomData (int, from 0 to 9)
__BrushRadius (float)
__PainterImpactNormal (vector, inverted object hit normal)
__BrushSampleCount (int)
__RootPoint (int, 0 or 1)
__RayCastLengh (float)
ActorReference (SoftRef)
PhysicalMaterial (SoftRef)
A custom BP actor can be used to process the painted points, it can embbed a PCG process graph of your choice, expose parameters or add any custom features you'd need.
To create a custom PCGPainterActor BP, it must be of type "PCGPainterActor":
Then you can set the PCG graph you want to use to process the painted point directly in the PCG component of the actor:
Any parameters added in the category "Painter Parameters" will be exposed when "instance parameters" option is checked on. As seen in the CustomPainterActor example:
Example of parameters exposed which can be edited directly from the PCG Painter UI:
Those parameters can be access by the PCG graph processor simply using the "GetActorProperty" node