Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-10-01Fix subdivision surface wrong for non-limit surface and subdivision level 1Brecht Van Lommel
Remove the workaround for T59395 that increases the minimal refinement to 2 to work around an OpenSubdiv bug. This bug appears to be fixed in the latest OpenSubdiv version we are using. Problem found by Piotr Ostrowski. Ref D9076
2020-09-30Subdivision Surfaces: add boundary smooth option to modifiersPiotr Ostrowski
This adds the option to either smooth the entire boundary, or to keep corners sharp, for the Subdivision Surface and Multiresolution modifiers. This mainly helps with compatibility with other software. The default behavior remains to smooth the entire boundary. Differential Revision: https://developer.blender.org/D8485
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-05-18OpenSubdiv: Cleanup, Remove from legacy SubsurfCCG codeSergey Sharybin
The CPU side implementation is done on a new dedicate base ground. The GPU side must be redone anyway.
2020-03-29Cleanup: spelling, commentsCampbell Barton
2020-03-19Subdiv: Make Blender crease to OSD sharpness reusableSergey Sharybin
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.
2020-03-02Cleanup: make remaining blenkernel headers work in C++Jacques Lucke
2020-02-19Subdiv: Clarify Subdiv settingsSergey Sharybin
The actual naming might also be a subject to change, especially the one around `level`. Tricky part here is that at some point in the API there will be change from Blender modifier's Quality to OpenSubdiv's Level, but which API level is most suitable for this? At least now meaning of settings is better documented ans should be clear what's going on.
2019-09-30Cleanup: spellingCampbell Barton
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-06-17Cleanup: comment, RNA spellingCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
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
2019-04-05Fix T63283: Second subdivision modifier does not ignore creaseSergey Sharybin
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
2019-04-05Cleanup: SpellingSergey Sharybin
2019-02-22Multires: Support smooth shading when sculptingSergey Sharybin
On CCG side it is done similar to displacement, where we have a dedicated functor which evaluates displacement. Might be seemed as an overkill, but allows to decouple SubdivCCG from mesh entirely, and maybe even free up coarse mesh in order to save some memory. Some weak-looking aspect is the call to update normals from the draw manager. Ideally, the manager will only draw what is already evaluated. But it's a bit tricky to find a best place for this since we avoid dependency graph updates during sculpt as much as possible. The new code mimics the old code, this is how it was in 2.7. Fix shading part of T58307.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-02Cleanup: remove author/date info from doxy headersCampbell Barton
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
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.
2019-01-22Fix T59395: Subdivision modifier with quality 1 crashes blenderSergey Sharybin
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.
2019-01-18Multires: Correct averagingSergey Sharybin
Before that only normal component was averaged, which is not really correct. Unfortunately, the new code is somewhat slower due to more involved math to deal properly with non-quad faces, but the plan is to move averaging from runtime to edit time, This means, that mdisps will always be continuous around the edges and no averaging on every frame change of animated character will be needed.
2019-01-18Multires: Correct function name, to match behaviorSergey Sharybin
2019-01-18Multires: Cleanup, move utility function to a more public placeSergey Sharybin
2019-01-18Multires: Cleanup, more clear namingSergey Sharybin
2019-01-16Subdiv: Reset evaluator creation statisticsSergey Sharybin
Makes it more clear to see what was exactly happening at the last invocation of subsurf modifier.
2019-01-16Subdiv: Initial implementation of topology cacheSergey Sharybin
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.
2019-01-16Subdiv: Cleanup, pass mesh by const pointerSergey Sharybin
2019-01-16Subdiv: Cleanup, commentsSergey Sharybin
2019-01-10Cleanup: ensure header guards come firstCampbell Barton
Causes clang-format not to detect header guards, indenting all preprocessor lines in the header.
2019-01-04Fix T60124: Multires modifier not reading data from external filesSergey Sharybin
2018-11-01Subdiv: Cleanup, de-duplicate some codeSergey Sharybin
2018-11-01Subdiv: Cleanup, deduplicate some codeSergey Sharybin
2018-10-31OpenSubdiv: API, expose vertex boundary interpolation optionSergey Sharybin
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.
2018-09-11Subdiv: Initial implementation of CCGSergey Sharybin
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
2018-09-07Subdiv: Add ptex offsets to a subdiv structureSergey Sharybin
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.
2018-09-04Subdiv: Move mesh creation functionality to own headerSergey Sharybin
2018-09-04Subdiv: Move evaluation functionality to own headerSergey Sharybin
2018-09-04Subdiv: Move FOREACH functionality to own headerSergey Sharybin
2018-09-04Subsurf: Clarify what Subdiv structure is forSergey Sharybin
2018-08-24Multires: Fix wrong apply deform results when multires has sculpt alreadySergey Sharybin
2018-08-22Subsurf: Implement foreach traversal for subdivsion topologySergey Sharybin
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.
2018-08-22Cleanup: styleCampbell Barton
2018-08-15Multires: Initial groundwork to hook up displacement to new Subdiv objectSergey Sharybin
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
2018-08-14Multires: Begin hooking it up to the new subdiv codeSergey Sharybin
Currently behaves same as subsurf, support of displacement is the next task in the line to tackle!
2018-08-13Subsurf: Make uv boundaries easily extendibleSergey Sharybin
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
2018-08-13OpenSubdiv: Add stub implementation of C-APISergey Sharybin
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.
2018-08-01Subsurf: Evaluate all UV layersSergey Sharybin
Before that it was only first UV layer which was properly evaluated, the rest were ignored. Now all layers are being properly handled.
2018-07-31Subsurf: Rework in a way that patches boundaries are merged togetherSergey Sharybin
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
2018-07-23Subsurf: Subdivide polygons to the same resolutionSergey Sharybin
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.
2018-07-20Subsurf: Add basic statistics to help benchmarkingSergey Sharybin