Age | Commit message (Collapse) | Author |
|
|
|
Actually, begin will do the entire initialization.
Refine will only refine if there is a topology refiner associated
with the Subdiv descriptor.
Allows to refine Subdiv to new coarse positions without touching
displacement evaluation. Will be needed to update SubdivCCG during
sculpt undo.
|
|
The normals of loose edges can be non uniform as they aren't normalized.
Checked with what happens with edit loose edges and synchronized the
implementation.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D7127
|
|
|
|
|
|
Deformation of subdivision surface modifier was using wrong coordinates
for the coarse mesh: as the modifier flow goes the coordinates are to be
taken from the input array of coordinates.
|
|
|
|
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
|
|
This reduce memory usage by about 25% in object mode for multires meshes.
|
|
Stupid typo in an original fix, need to operate in 3D, not in 2D.
|
|
They were always acting as a B-Spline subdivision.
|
|
Previously in 2.79 we were using a specialized drawing using derivedMesh.
Now the subsurf modifier tag each center vertex as facedot and let the
DRWManager pick it up.
Some modifiers (deforming ones) do not clear the tag so we can use this
technique even if there is deforming modifiers after subsurf modifiers.
|
|
|
|
|
|
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
|
|
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.
Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!
As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).
Reviewers: brecht, campbellbarton, sergey
Differential Revision: https://developer.blender.org/D4407
|
|
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.
|
|
|
|
|
|
Treat those vertices as infinitely sharp. This matches the way
how OpenSubdiv's topology is being created.
|
|
The issue was caused by the lack of averaging of normals for
vertices which are on the ptex face boundaries.
|
|
|
|
|
|
This is a part of T58609, but work is still needed to properly
support this flag in the draw manager.
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
|
|
|
|
|
|
Apparently, struct initialization can not be empty,
Reviewers: sergey
Reviewed By: sergey
Tags: #bf_blender_2.8
Differential Revision: https://developer.blender.org/D3636
|
|
This makes it more generic process to perform actions which
depend on ptex face + (u, v) and on subdivided vertex index.
Currently it is still just a subdivision calculation process,
but same foreach callbacks can easily be used to propagate
displacement from known vertex locations back to displacement
grids.
|
|
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
|
|
|
|
Can not copy data without freeing the previous storage.
|
|
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.
|
|
|
|
Before that it was only first UV layer which was properly evaluated,
the rest were ignored. Now all layers are being properly handled.
|
|
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 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
|
|
Only enforce origindex to NONE for a generated geometry. For the rest
of geometry rely on CustomData_copy() to set it to the proper value.
This will ensure origindex is set correct for cases when there is an
array modifier prior to subsurf.
|
|
|
|
Previously it was ptex faces which were subdividing to the same
resolution. This was looking like more details for non-quad faces,
but was also causing discontinuity in the edge where quad touches
non-quad polygon.
Now ptex faces which are coming from non-quad faces are subdivided
at a half of resolution, matching old behavior and solving
discontinuity problem.
|
|
|