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
2018-04-12Fix second issue introduced in refactoring/cleanup of weighted normals.soc-2017-normal-toolsBastien Montagne
'degenerated too short normals' check was probably a bit too aggressive, moved it back to more common 1e-6 value.
2018-04-11Fix weighted normals modifier sometimes affecting actual mesh.Bastien Montagne
Same issue & same fix as with edit normals modifier some times ago...
2018-03-13Cleanup some leftover after recent refactor.Bastien Montagne
2018-03-12Heavy refactor of weighted normals code, especially 'keep sharp' part.Bastien Montagne
Before, 'keep sharp' was bsically: * Overwriting everything just computed by 'single nor per vertex' code, leading to a nice share of computations being tossed to nowhere. * Re-implementing most of core clnor computaion code, only skipping all 'sharp edge' cases but the one defined by shapr edge tags. This was not only bad for code maintenance and (reasonable) simplicity, it was also introducing inconsistencies in how we define sharp edges, since everwhere else in code we take into account sharp edge tag, flat face tag, and 'smooth threshold' value (aka split angle) of mesh. At first I though 'keep sharp' would need its own totally separated code path, but thanks to some data structure tricks, it was possible to merge most of both cases into single code. So this commit: * Heavily factorizes and simplifies code, especially the 'keep sharp' case. * Makes use of clnor spaces as generated by core BKE code to define 'smooth fans' that should have the same weighted normals, just like anywhere else in Blender. Note that since code is now using same functions in all cases, it also naturally brings back vgroup support in keep_sharp case. Also, this has been a fairly involved change, basic testing seems to be OK, but more would be welcomed here. :)
2018-03-11Partially revert "Fixed vertex groups not respected with keep sharp in ↵Bastien Montagne
modifier." This reverts some changes from commit a7a4beecb208d12a00d550e3ebf4e2a37730fa6b.
2018-03-11Fixed vertex groups not respected with keep sharp in modifier.Rohan Rathi
Also fixed some other trivial issues.
2018-03-09Change 'face strength' values.Bastien Montagne
WARNING! this will break files saved with this branch and using face strength feature (no crash or data corruption, but face strength values will become invalid and will produce weird results)! Rationals for this change are: * Having strength values in natural order simplifies existing code already, not to mention any future potential addition to strengthes. * Now, code will work as-is, even if we decide to add more stength values in the future.
2018-03-09Cleanup: use MEM_[cm]alloc_arrayN as needed, instead of MEM_[cm]allocN.Bastien Montagne
New memory allocator was added a few months ago as an attempt to make our memory management more secure, still have to go over rest of this patch's code for same thing. ;)
2018-03-09Serious refactor, adding common data struct, some factorizing...Bastien Montagne
We now pass most common parameters to processing functions using a single struct, this is much cleaner. Also, factorized code aggregating poly nors into vertex nors in new aggregate_vertex_normal function, and optimized expensive powf calls (exponential inverse weight...) by computing once and caching most common values (since weight is static all-over processing, and nearly all vertices will only have a few faces or loops using them...). Note that am still very unhapy with 'keep sharp edges' case, that one seems to copy a lot of code we already have in BKE_mesh_evaluate, and (if I followed code correctly) recompute everything, essentially ditching the whole first computations of weighted normals!
2018-03-09Fix broken 'is vertex in vgroup' check.Bastien Montagne
Also, better to avoid binary XOR on booleans, you never know how those are actually stored internally (or how they were generated), and may get surprising results depending on compiler etc., though with modern compilers I’d expect this to be safe now?
2018-03-09More cleanup and optimizations.Bastien Montagne
Style and naming, arg positons (all loops data together, etc.), const values and args, and so on... Also, avoid allocating unused memory, avoid extra loops when possible, etc.
2018-03-09Minor cleanup and silplification/optimizations...Bastien Montagne
2018-03-06Minor cleanup & fixes in seightednormals modifier code.Bastien Montagne
Did not check code itself in deep yet...
2018-03-06Fix critical issue with usage of unamed CD_PROP_INT layer.Bastien Montagne
Those types are generic, specific usages should always use named layers with a specific 'id name'. Also, make weightednormals modifier to show edited normals in 3DView in edit mode.
2017-11-08More style cleanup, renaming some now-public functions.Bastien Montagne
2017-10-12Fix some build warnings in new weighted normals modifier code.Bastien Montagne
2017-10-12Cleanup (no functional change expected).Bastien Montagne
Mostly styling, and some minor/harmless errors.
2017-10-03Fixed error in mod with many loops sharing edge.Rohan Rathi
Also removed redundant function and replaced its definition to BKE_mesh.h
2017-09-02Added 3 level weighting to modifier. Also did minor cleanup of codeRohan Rathi
2017-08-29Changed T_CLNOR_INVALIDATE flag as it conflicted with prop edit. Fixed ↵Rohan Rathi
mistake with weighting in modifier making it work differently from average.
2017-08-15Fixed bugs in copy and made UI changesRohan Rathi
2017-08-12changed weight calculation in modifierRohan Rathi
2017-08-07Fix memleak in Weighted Normals modifier when autosmooth is disabled.Bastien Montagne
2017-08-07Fix error in build by including limits.hRohan Rathi
2017-08-06Rewrote the code for sharp edges on weighted modifier.Rohan Rathi
2017-08-04Fixed potential memory leak in modifierRohan Rathi
2017-08-04Fixed issues with modifier: Adding vertgroups now does not overwrite data. ↵Rohan Rathi
Also added proper weights to sharp edges
2017-08-04Fixed vgroups editing all loop data in modifierRohan Rathi
2017-08-03Fixed the following for weighted modifier:Rohan Rathi
1) Now correctly splits loop normal according to sharp edges 2) Modifier now only acts on active vertex group 3) Added a check to use smooth/sharp flags as boolean weights
2017-07-30Added the following to weighted modifier:Rohan Rathi
1) Modifier now respects sharp edges, requires bool value to be checked. 2) Can now use vertex groups to apply modifier to only selected vgroup 3) Added boolean (0-1) weights in the form of Smooth/Sharp flags. Smooth flag means the face will hold 0 weight.
2017-07-28Fixed issues with set_normal_from_facesRohan Rathi
2017-07-22Added weighted normal modifier.Rohan Rathi
Has a weight int which specifies the weights with which face area/corner angle will be exponentially divided. Threshold provides the limit in values which will be weighted equally.