Age | Commit message (Collapse) | Author |
|
Makes it so conversion is centralized in a single place.
We might consider removing any conversion, passing value as-is which
will be easier for I/O scripts to match crease. The downside of that
would be loose of control range in certain qualities and values of
crease.
There shouldn't be any functional changes in this commit.
|
|
|
|
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
This is something where there is no single correct behavior,
sometimes it's needed to ignore the crease to make mesh more
smooth. But sometimes crease is to be considered after first
subdivision surface: for example, when adding extra subdivisions
for render-time displacement.
Made it an option whether modifier needs to take crease into
account or not.
Existing files should be openable in the 2.7 compatible way,
to re-create an old behavior the options is to be manually
disabled in the modifier settings.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4652
|
|
Mostly functions wrapping args, not confirming to our style guide.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
This seems to be a bug in OpenSubdiv. For now simply use Catmark
subdivision scheme with infinitely sharp edges.
Later on it's either gets fixed in OpenSubdiv or we do bilinear
subdivision on our side.
|
|
|
|
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.
|
|
|
|
C-API is way smaller than the rest of the code which uses it.
So better to conditionally compile stub implementation than
to keep adding ifdef everywhere.
|
|
Enabled infinite sharp patches for topology refiner and evaluator,
which allows to have sharp edge at first subdivision level.
Also tweaked crease export from Blender to OpenSubdiv to have more
artistic control over the whole 0..1 range.
|
|
Before that it was only first UV layer which was properly evaluated,
the rest were ignored. Now all layers are being properly handled.
|
|
Currently unused, added for the future and API completeness.
|
|
|
|
The idea is simple: do not provide full topology to OpenSubdiv, leave
edges creation to OpenSubdiv itself. This solves issues with non-manifold
meshes which were known to fail, including the ones from T52059.
On a positive side we can simplify our side of converter, keeping code
shorter.
it is still possible that we'll need to ensure all loops has same
winding, but that is less things to worry about.
|
|
Applies to vertices and edges. Biggest annoyance here is that OpenSubdiv's
topology converter expects that there is no loose geometry, otherwise it
is getting confused.
For now solution is to create some sort of mapping from real Mesh vertex
and edge index to a non-loose-index. Now the annoying part is that this
is an extra step to calculate before we can compare topology, meaning FPS
will not be as great as if we knew for sure that topology didn't change.
Loose edges subdivision is different from what it used to be with old
subdivision code, but probably nice feature now is that endpoints of loose
edges are stay at the coarse vertex locations. This allows to have things
like plane with hair strands, without need to duplicate edge vertices at
endpoints.
All this required some re-work of topology refiner creation, which is now
only passing edges and vertices which are adjacent to face. This is how
topology refiner is supposed to be used, and this is how its validator
also works. Vertices which are adjacent to loose edges are marked as
infinite sharp. This seems to be good-enough approximation for now. In the
future we might tweaks things a bit and push such vertices in average
direction of loose edges, to match old subdivision code closer.
|
|
The idea is to use this as a replacement of old CCG, now it is
based on OpenSubdiv. The goal is to reduce any possible overhead
which was happening with OpenSubdiv used by CCG.
Currently implemented/supported:
- Creation from mesh, including topology on OpenSubdiv side,
its refinement.
- Evaluation of limit point, first order derivatives, normal,
and face-varying data for individual coarse position.
- Evaluation of whole patches.
Currently not optimized, uses evaluation of individual coarse
positions.
- Creation of Mesh from subdiv, with all geometry being real:
all mvert, medge, mloop, and mpoly.
This includes custom data interpolation, but all faces currently
are getting separated (they are converted to ptex patches, which
we need to weld back together).
Still need to support lighter weights grids and such, but this
is already a required part to have subsurf working in the middle
of modifier stack.
Annoying part is ifdef all over the place, to keep it compilable
when OpenSubdiv is disabled. More cleaner approach would be to
have stub API for OpenSubdiv, so everything gets ifdef-ed in a
much fewer places.
|