[Bf-blender-cvs] [4d939ff47ac] greasepencil-refactor: GPencil: New evaluation of derived frames and Filling calculation

Antonio Vazquez noreply at git.blender.org
Sat Jan 18 11:56:35 CET 2020


Commit: 4d939ff47ac54ff13825e2e0f27cba08e8ada60f
Author: Antonio Vazquez
Date:   Sat Jan 18 11:32:58 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB4d939ff47ac54ff13825e2e0f27cba08e8ada60f

GPencil: New evaluation of derived frames and Filling calculation

As grease pencil was created before depgraph, it was using a custom solution to create derived data to apply modifiers on top. With the new refactor of the drawing engine, we need to have the runtime data at datablock (bGPdata) level to share between instances, but also we neeed to have separated eval data because different objects can use different modifiers (equals to actual mesh_eval logic). The old derived frame array solution is not valid anymore.

The initial idea was to make a full copy of the datablock in a separated eval copy, but testing this solution, it was very slow, so now, the full copy is only done once, and later, only the active frame data is updated (see note below).

In a future development, the ideal solution would calculate all frames at the same time and only copy again if something changes, but now this change is out of scope. I have been performing tests and with this "only active frame" copy,

Also, this solution simplifies several areas of the code, because now it's not necessary to deal with derived frame array, and just use datablock as is.

This update also includes the following:

* How the filling information is managed. Before, the triangulation data was created only during drawing process, and it was not saved. With the new engine, this information must be available always, so instead to calculate in drawing time, now the information is saved and generated or updated each time the stroke is modified. To have the filling information calculated improves FPS and simplify drawing and modifier evaluation code.

* Remove unused parameters related to old Filling calculation logic. This also simplifies the UI panels.

* Added simplify modifier options. This was removed, but after last changes it's good to have as before.

Differential Revision: https://developer.blender.org/D6597

===================================================================



===================================================================





More information about the Bf-blender-cvs mailing list