cgtoolbox docs
PCG Painter
PCG Painter
  • 🖌️Intro
  • 📖Tool documentation
  • 💡Custom graph and PCGPainterActor
  • ⬇️Root points projection
  • ❔FAQ
Powered by GitBook
On this page
  • PCG points to graphs
  • Custom PCGPainterActor

Custom graph and PCGPainterActor

PreviousTool documentationNextRoot points projection

Last updated 5 days ago



PCG points to graphs

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)

  • __BrushStrokeId (int)

  • __PainterImpactNormal (vector, inverted object hit normal)

  • __BrushSampleCount (int)

  • __RootPoint (int, 0 or 1)

  • __RayCastLengh (float)

  • ActorReference (SoftRef)

  • PhysicalMaterial (SoftRef)


Custom PCGPainterActor

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.

You can see an example here in the PCGPainterData folder: /Game/PCGPainterData/CustomPainterActor

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:

As the PCG graph is embedded directly in the actor, the pcg painter UI widget will not ask you to select it.

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


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.

Example of a simple PCG graph processor ( PCG_PainterExample ).
Creation of a new custom PCGPainter actor

Note that the parameters must be public of course
PCGgraph example: /Game/PCGPainterData/PCG_CustomActorExample
💡
Latest features video documentation
The core PCG graph "PCG_PainterGraphPreparePoints"
Tool documentation