Commit Graph

7 Commits

Author SHA1 Message Date
Antonioya e63c947204 GP: Refactor drawing engine to single VBO
This is part of T57829.

Reduce the number of batches used to only one by shader type.  This reduces GPU overhead and increase a lot the FPS. As the number of batches is small, the time to allocate and free memory was reduced in 90% or more.

Also the code has been simplified and all batch management has been removed because this is not necessary. Now, all shading groups are created after all vertex buffer data for all strokes has been created using DRW_shgroup_call_range_add().

All batch cache data has been moved to the Object runtime struct and not as before where some parts (derived data) were saved inside GPD datablock.

For particles, now the code is faster and cleaner and gets better FPS.

Thanks to Clément Foucault for his help and advices to improve speed.
2018-11-20 20:05:37 +01:00
Antonioya 39bc44ffc5 GP: Refactor Instance modifier and rename to Array
The old name Instance was logic when the modifier created new object instances, but now works equal to mesh Array modifier, so the old name was not logic and must be Array.

Also added a Object to use as offset similar to mesh Array modifier.
2018-10-28 18:20:50 +01:00
Antonioya e010d5e3b1 GP: New Time modifier
This modifier allows to offset the keyframe animated to get more variations in the animation when reuse the same datablock.
2018-10-22 18:30:26 +02:00
Sergey Sharybin fa6b0cdc79 GPencil: Use proper enumerator type
Was using GpencilModifierType in type definition,
but rest of usage was using values from GpencilModifierTypeType.
2018-09-28 10:04:31 +02:00
Campbell Barton ae57383648 Cleanup: comment blocks 2018-09-02 18:28:27 +10:00
Campbell Barton f06884b18a Cleanup: style, duplicate includes 2018-07-31 20:11:55 +10:00
Antonioya 66da2f537a New Grease Pencil object for 2D animation
This commit merge the full development done in greasepencil-object branch and include mainly the following features.

- New grease pencil object.
- New drawing engine.
- New grease pencil modes Draw/Sculpt/Edit and Weight Paint.
- New brushes for grease pencil.
- New modifiers for grease pencil.
- New shaders FX.
- New material system (replace old palettes and colors).
- Split of annotations (old grease pencil) and new grease pencil object.
- UI adapted to blender 2.8.

You can get more info here:

https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/
https://code.blender.org/2018/07/grease-pencil-status-update/

This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible.

Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-07-31 10:50:43 +02:00