Age | Commit message (Collapse) | Author |
|
Only affects internal API, bout could be exposed as an option for
the compatibility reasons with other software.
Is a part of some ongoing development of multires, but might or
might not be used.
|
|
Was only used by subsurf in the past years, it is unlikely
other modifiers will every need this any time soon.
|
|
Those were used for partial updates during edit mode, which will
not be possible anymore with OpenSubdiv.
Optimization for OpenSubdiv would be to re-use topology refiner
if topology does not change. But this is something to be done
for both edit and object modes, no need to have separate code
paths for those.
This commit makes OpenSubdiv to properly work in edit mode.
|
|
Was happening when using OSD for modifiers.
|
|
The main goal of this patch is to cleanup the interface of every modifier. More specifically the interface of modifiers should be DerivedMesh-free.
Internally some modifiers still use DerivedMesh. However I think it is better when the wrappers are in the modifiers so that higher level functions can use the simplified interface.
This patch removes the applyModifier_DM and applyModifierEM_DM functions. In a previous patch (rB3614d9d) the other functions that used DerivedMesh have been removed.
Reviewers: brecht
|
|
Attempts to substitude CCGDM with an OpenSubdiv based structure
which has less abstraction levels. The missing part in this
substitude is a face pointers which old CCGDM/multires code was
using to stitch faces (averaging boundaries).
Another curial bit missing: "reshaping" of multires CD_MDISPS
to the state of new PBVH grids.
The new code is only available when OpenSubdiv modifier is
enabled (WITH_OPENSUBDIV_MODIFIER=ON) and with debug value of
128. This is so this WIP code is not interfering with current
production machines in the studio.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3685
|
|
|
|
|
|
Adds a displacement support for OpenSubdiov based subsurf object implemented
as a callback which gives vector displacement in object space. Currently is
implemented to calculate displacement based on myltires displacement grids,
but we can support things in the future if needed.
Submitting to review to see if there is something obviously wrong in the
direction (old multires code was sharing same displacement code to both
calculate final displaced mesh and reshape an existing one, which is rather
confusing and probably can be done more cleanly?).
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3604
|
|
Currently behaves same as subsurf, support of displacement is the
next task in the line to tackle!
|
|
For users it defines how accurate vertex positions are in terms
of limit surface (as in, how close the vertices locations to the
condition when they are calculated for an infinitely subdivided
mesh).
This affects things like:
- Irregular vertices (joint of 3 or more edges)
- Crease
Keep quality value low for performance.
NOTE: Going higher does not necessarily mean real improvement
in quality, ideal case might be reached well before maximum
quality of 10. Quality of 3 is a good starting point.
Internally quality is translated directly to adaptive subdivision
level.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3599
|
|
There are following reasons to do so:
- The plan is to replace it with some sort of object or viewport option,
so we can apply OpenSubdiv subdivisions on top of modifier stack and
keep modifier stack purely CPU side.
This will solve issues when adding some relation in scene will force
modifier to be evaluated on CPU.
- With new upcoming OpenSubdiv based CPU modifier implementation we can
cache topology similar to what GPU side was doing, which will already
be reasonably faster.
- OpenSubdiv GPU does not work since the OpenGL version bump, and is
to be rewritten with all the adaptive refine options kept in mind.
Since OpenSubdiv GPU was already broken and was only causing object
to become invisible, there is no reason to keep having that option in
the modifier.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3598
|
|
This replaces old single toggle option to subdivide UVs with
an enum which can have more options. The usecase for this is
to be compatible with other software. But we also might choose
different subdivision type as default in the future.
DNA and underlying code supports all possible options, but
only the ones which are compatible with old subdivision code
are currently exposes.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3575
|
|
|
|
Committed by accident, is too early for this yet.
|
|
The idea is to create vertices along the coarse edges once, without
splitting coarse edges on separate ptex faces. This requires some
indexing magic, vertices within a patch are no longer sequential.
Not sure how to make it nicer without such a black magic looking
calculations (which are basically boiling down to mimicking order
of verts/edges creation).
In the current offsets calculation loose verts and edges are not
properly taken into account, but those are causing topology refiner
to fail anyway, so it needs a bit deeper change.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3570
|
|
|
|
The code is ifdef-ed for now, since there is more work needed
to be done before we can officially switch to it.
Uses new subdiv module.
|
|
|
|
This will allow modifiers to decide whether to copy or share caches between
ModifierData copies.
|
|
|
|
|
|
|
|
This is first commit in series of changes to get rid of md->scene.
|
|
|
|
|
|
|
|
This also changes signature of modifier copy callback, first (source)
parameter is now a const, which is saner anyway!
|
|
|
|
Should also fix T55000: Crash with hooks and curves in Cycles render.
|
|
The contents of the ModifierEvalContext struct are constant while iterating
over the modifier stack. The struct thus should be only created once, outside
any loop over the modifiers.
|
|
Makes the follow changes:
- Add new `deform*` and `apply*` function pointers to `ModifierTypeInfo` that take `Mesh`, and rename the old functions to indicate that they take `DerivedMesh`. These new functions are currently set to `NULL` for all modifiers.
- Add wrapper `modifier_deform*` and `modifier_apply*` functions in two variants: one that works with `Mesh` and the other which works with `DerivedMesh` that is named with `*_DM_depercated`. These functions check which type of data the modifier supports and converts if necessary
- Update the rest of Blender to be aware and make use of these new functions
The goal of these changes is to make it possible to port to using `Mesh` incrementally without ever needing to enter into a state where modifiers don't work. After everything has been ported over the old functions and wrappers could be removed.
Reviewers: campbellbarton, sergey, mont29
Subscribers: sybren
Tags: #bf_blender_2.8
Differential Revision: https://developer.blender.org/D3155
|
|
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 caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
|
|
|
|
|
|
|
|
2.8x branch added bContext arg in many places,
pass eval-context instead since its not simple to reason about what
what nested functions do when they can access and change almost anything.
Also use const to prevent unexpected modifications.
This fixes crash loading files with shadows,
since off-screen buffers use a NULL context for rendering.
|
|
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
|
|
This is a first step towards proper depsgraph "ownership", where
we would allow scene to be in multiple states dependent on active
workspace or scene layer.
This commit introduces a basic API to get proper dependency graph
for a given scene layer. It also renames scene->depsgraph to
depsgraph_legacy, so it's easier to search0-n-replace in the future.
|
|
There is no more point of keep those around. ES20 may need special case
when/if we dabble with it again. Meanwhile no point on polluting the
code with this.
(ghost still has reference for the PROFILE, but that's reasonable)
|
|
|
|
Nothing terribly exciting, just a hackish implementation of solid mode CDDM
drawing for cases when we are building with core profile.
The goal is to be able to see SOMETHING with new OpenGL for thew guys who
tests alembic and friends in blender2.8 branch. This is a temporary solution,
the whole drawing will be reworked. Limited to hardcoded material and lighting.
Selection outline color is also hardcoded because of lack of glColor() in the
core profile.
After this commit there is no big stoppers from stop worrying about legacy
OpenGL, so we can go core profile as the only way for Blender.
While some areas will become broken after that, we'd better just fix them
after that and for now just focus on more important design work.
|
|
|
|
|
|
|
|
It's a bit tricky to align vertex color data between Blender and OpenSubdiv
so for now we simply disable OpenSubdiv in the paint modes.
Safe for 2.78.
|
|
viewport mode
|
|
For now simply show warning in the interface and fallback to regular subsurf
code. Supporting OpenSubdiv in edit mode in possible but not high priority
currently.
|
|
|