Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The idea is to only use pointers to particles in original object when
creating an edit structure. The derived mesh we get from evaluated
object.
The rest of the commit is just keeping pointers in sync.
|
|
|
|
This allows to rely on brush to update children positions,
and avoid tag of object. Makes it way faster to comb with
children enabled.
|
|
... it's getting late here.
|
|
|
|
Maybe disabled modifier check should be done higher in the call hierarchy.
|
|
Also use 'uint'.
|
|
|
|
This new system use transform feedback to compute subdivided hair points
position. For now no smoothing is done between input points.
This new system decouple the strands data (uv, mcol) with the points
position, requiring less update work if only simulation is running.
In the future, we can have compute shader do the work of the feedback
transform pass since it's really what it's meant to. Also we could generate
the child particles during this pass, releasing some CPU time.
draw_hair.c has been created to handle all of the Shading group creations
as well as subdivision shaders.
We store one final batch per settings combination because multiple viewport
or render could use the same particle system with a different subdivision
count or hair shape type.
|
|
|
|
There are a few places where DerivedMesh is still used, most notably
when calling the (not yet ported) cloth simulation. There is also still
the use of Object.derivedDeform and Object.derivedFinal. Those places are
marked with a TODO.
Some functions in the editors module were copied to accept Mesh. Those
already had 'mesh' in the name; the copies are suffixed with '__real_mesh'
for easy renaming later when the DM-based functionality is removed.
|
|
Passing the wrong index caused the particles to stop being shown when the
first particle dies.
|
|
|
|
The idea is to allow "regular" strands to update edit cache and hence
get the final update strands.
|
|
Currently unused, but is required for an upcoming work.
|
|
Makes it possible to have children strands to be visible during combing.
Actual implementation still needs work though.
|
|
|
|
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.
|
|
|
|
This way we know it's in sync with edit mode.
|
|
|
|
|
|
|
|
Does all points all the time, ignoring the setting in viewport header.
This is to be addressed by the next commit.
|
|
|
|
Makes it more local where we have to do all the tricky checks.
|
|
Before it was only supporting hair strand paths editing.
|
|
|
|
|
|
|
|
Will make it simple to add strands from edit mode as well.
|
|
Should make it fairly simple to make it re-usable by children particles.
|
|
Will allow us to merge two code paths more easily.
|
|
Keeps main function shorter.
|
|
|
|
|
|
Make parent UVs calculation for simple children to match another block.
|
|
|
|
|
|
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.
This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.
Differential Revision: https://developer.blender.org/D3152
|
|
This means fewer indices to store. That being said, it seems to be a little
slower because of the restart index. But that's in the case we would be
vertex bound, which is mostly never going to happen.
|
|
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.
|