# Root points projection

[Root points](https://cgtoolbox.gitbook.io/cgtoolbox-docs/pcg-painter/tool-documentation#tool-steps) are created during brush strokes on objets, but can be projected again after their creation on visible objects, in case the objects moves.

<figure><img src="https://1814096787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKe5TD1aXXmvLmaYrg9eD%2Fuploads%2FxJnWqjeBp7TXFmWjbrqq%2Fprojection.png?alt=media&#x26;token=fc534fde-ac1c-40f1-bbe5-d29336f5c9b3" alt=""><figcaption><p>Root points painted | Object moved | Root points re-projected / baked</p></figcaption></figure>

This can be done using the PCGPainter parameters of any PCGPainterActor:

<figure><img src="https://1814096787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKe5TD1aXXmvLmaYrg9eD%2Fuploads%2FkqhHFOsaeYtl2Bfc5Zty%2Fimage.png?alt=media&#x26;token=b2d7d56f-1ca6-459a-b59d-b525eb4a46ad" alt=""><figcaption></figcaption></figure>

Use the "BakeProjectedRootPoints" to re-project and re-baked root points on visible objects, scattered points will be recreated using the new root point positions.

**Projection mode:**

Two projection modes are available:

* "Hit normal", the root points will be projected in a direction defined by the hit normal of the existing root points when there where drawn the first time.
* "World Z", the root points will be projected using a top - down direction only.

<figure><img src="https://1814096787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKe5TD1aXXmvLmaYrg9eD%2Fuploads%2FObhluWcnApqsDExFmw9G%2Fimage.png?alt=media&#x26;token=4dd5d6f6-aa07-4278-b1c9-82d4ccd2ca6f" alt=""><figcaption><p>Hit normal projection</p></figcaption></figure>

<figure><img src="https://1814096787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKe5TD1aXXmvLmaYrg9eD%2Fuploads%2FcwsvBeRDGdw5DwQHEWmd%2Fimage.png?alt=media&#x26;token=b824ec7c-3f26-4f6d-a28d-6f4d202a622e" alt=""><figcaption><p>World Z projection</p></figcaption></figure>

**RaycastLenghtMultiplier:**

This parameter is used to create the projection lenght, it's defined using the brush strokes radius \* RaycastLengthMultiplier.

**Show trace debug:**

If on, green lines will be displayed with the lenght and orientation of the projection on each root points.

**Draw time:**

The amount of time in second the debug projection lines will be displayed.

**Bake root points on end stroke:**

If ON, force to rebake the root points on each brush strokes "mouse release".

***
