Age | Commit message (Collapse) | Author |
|
The CPU side implementation is done on a new dedicate base ground.
The GPU side must be redone anyway.
|
|
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
|
|
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 is actually a workaround for the crash in OpenSubdiv.
Topology refiner will have a crash when special conditions
are met:
- Refiner is configured to use infinitely sharp patches.
- Refinement happens for the level 1 (which we call Quality 1 on
Blender side).
- Mesh has non-quad faces.
The workaround is to force refinement to happen to level 2 (or
quality 2 on Blender side) when those conditions are met.
Later on with the next OpenSubdiv update we can remove this
workaround, since there was work done on OpenSubdiv side to
deal better with such configurations.
The modifier will now be somewhat slower, but this will be
compensated with upcoming topology cache enabled by default.
The workaround is done when initializing settings, so the
comparison of topology refiner settings is happening without
any extra workarounds there.
|
|
This commit makes it so OpenSubdiv's topology refiner is kept
in memory and reused for until topology changes. There are the
following modifications which causes topology refiner to become
invalid:
- Change in a mesh topology (for example, vertices, edges, and
faces connectivity).
- Change in UV islands (adding new islands, merging them and
so on),
- Change in UV smoothing options.
- Change in creases.
- Change in Catmull-Clark / Simple subdivisions.
The following limitations are known:
- CPU evaluator is not yet cached.
- UV islands topology is not checked.
The UV limitation is currently a stopper for making this cache
enabled by default.
|
|
|
|
|
|
Was harmless, that code is never to be reached.
|
|
|
|
This is something what we need to know quite often from various places.
Added it as a cached value in Subdiv itself, so it can be queried easily
from any area.
Shouldn't be a problem from memory usage point of view, it's 4MB per
1M faces coarse mesh. This is very low percentage of mesh itself, and
even lower percentage of highres subdivided mesh.
|
|
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!
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
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.
|