Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
shader instead.
|
|
Guide curves should be a higher-level concept. All fibers should have their
own curve control points, with subdivision on the GPU.
|
|
|
|
Note: Metaballs only support the first material slot. Splicing it per
material would create empty Batches. In order to overcome this we set
the batch for other materials to NULL. We added extra checks in EEVEE
and Workbench to not draw when the geom is NULL.
|
|
This make the limited wireframe not a performance problem anymore.
However, this does change the number of edges displayed as the threshold
is now computed per vertex instead of per edges.
For this reason we extended (internaly) the range of the slider so that the
users can hide more edge.
|
|
|
|
The default behaviour is to show the same amount of edges as 2.7.
The slider makes it possible to show all edges or even less.
|
|
This fix T55280 Loose edges not visible in object mode
|
|
Only OB_MESH is supported for now.
Creates a simple index buffer with negative indices if the edges is not a
real edge.
Also create the buffer texture representation of this buffer along with the
pos_in_order buffer texture.
|
|
|
|
Since this method have no failure case for manifold objects, use it.
|
|
|
|
levels.
|
|
|
|
separate branch.
|
|
|
|
This makes the shadows ~10 times faster in the general case.
This only create extrusion geometry on the outline edges. Also we increment
or decrement the stencil buffer by 2 for each manifold edge and only by 1
for non manifold. This make the algorithm robust yet less heavy than creating
one prism for each triangles.
|
|
Currently unused, but is required for an upcoming work.
|
|
|
|
We can not rely on edit->psys, it is not set for particle edit,
and there is some logic deeper inside which does different things
dependent on that.
We need to replace those checks with some some HAIR vs. PARTICLES
flag and always set psys pointer.
|
|
The idea is that edit mode structure is owned by original object,
and used for drawing. This is a bit confusing, especially since
path cache is also in that structure and needs evaluated object
to calculate cache.
In the future we should split edit data from visualization data,
but that's bigger refactor.
|
|
|
|
Does all points all the time, ignoring the setting in viewport header.
This is to be addressed by the next commit.
|
|
|
|
|
|
Now they are properly converted to Linear space before interpolation.
Since the only way to get vertex color in eevee and cycles is via the
attribute node with the CD_AUTO_FROM_NAME flag, we have to know at binding
time which type of buffer will be connected to this auto input.
We store this information inside the batch cache (together with the according
uniform name) and pass it as uniform to the shader which does conversion if
needed. The same shader can then be reused to draw another mesh with
different auto layers configuration.
|
|
|
|
The way how particle state is to be accessed or used did not change
in Blender 2.8, so the drawing code should follow old design.
This code is somewhat duplicated from drawobject.c, but old draw
code is on the way to be removed anyway.
This fixes issue with disappearing particles when tweaking number
of particles.
|
|
|
|
|
|
|
|
|
|
|
|
Text
**ToDo:**
- add vertbuff for UV (what can be adapted from `dl_surf_to_renderdata`)
|
|
|
|
|
|
|
|
Differential Revision: D2914
|
|
Scalp mesh now is passed explicitly to the hair API functions again.
The idea is that hair systems can be created in any object and use
another object as the scalp. Sharing the same hair pattern should be
implemented at a later time, pending a good design for assigning
follicles to specific hair systems.
|
|
|
|
The purpose of this branch is to create a new hair system with a dedicated
grooming tool, unlike the current direct editing of hair guide curves.
The modified bmesh-based strand edit mode is quite complex and distracts
from the main purpose of the branch, so its better to remove it for now
and implement a new tool.
|
|
|
|
Use mesh batch cache for mesh selection.
Note that we could create the batches and free immediately
so they don't take up memory.
This resolves a problem where selection was limited
to immediate-mode buffer size.
|
|
For rendering hair fibers the edit mode should just use the underlying data.
|
|
|
|
Subdivision works on the parent strands for efficiency. The fibers lengths
are based on the final subdivided length of parents, so no changes to the
shader are required.
This would be nicer with a tesselation shader, but this feature is not
available in Blender 2.8.
|
|
Hair drawing requires fairly large vertex buffers. Vertices also need to be interpolated
and displaced according to the control (parent) hairs and hair-style features like curling
and clumping.
Instead of doing this in advance on the CPU and uploading a large vertex buffer every frame,
this work can be done on the GPU for realtime display, because interpolation and displacement
are highly parallelizable. The vertex buffers then only need to be uploaded once (as long
as strand lengths remain the same). The vertex format can also be very lightweight, requiring
only a curve parameter and index (half the size needed for full positions).
For interpolating a buffer texture is used in the shader, which contains all information
about the control curves (parents) from which to interpolate final vertex positions.
|