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-03-13Merge branch 'master' into blender2.8Campbell Barton
2018-03-13Cleanup: doxygen commentsCampbell Barton
2018-03-02Merge branch 'master' into blender2.8Campbell Barton
2018-03-01Refactor: Merge non-functional-change part of 'edit normals' 2017 GSoC.Bastien Montagne
This merges changes in internals, runtime-only of existing custom normals code, which make sense as of themselves, and will make diff of soc branch easier/lighter to review. In the details, it mostly changes two things: * Now, smooth fans (aka MLoopNorSpaceArray) can store either loop indices, or pointers to BMLoop themselves. This makes sense since in BMesh, it's relatively easy to get index from a BMElement, but nearly impracticable to go the other way around. * First change enforces another, now we cannot rely anymore on `loops` being NULL in MLoopNorSpace to detect single-loop fans, so we instead store that info in a new flag. Again, these are expected to be totally non-functional changes.
2018-02-22Merge branch 'master' into blender2.8Sergey Sharybin
2018-02-22Cleanup: Fix const pointers mess in previous commit.Bastien Montagne
2018-02-22Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/bmesh/intern/bmesh_mesh.c
2018-02-22Fix (unreported) meshes changing shading when creating empty clnors data.Bastien Montagne
When you were using autosmooth to generate some custom normals, and created empty custom loop normal data, you would go back to an 'all smooth' shading, cancelling some sharp edges generated by the mesh's smooth threshold. Now we will first tag such edges as sharp, such that shading remains the same. This is not crucial in current master, but it is for clnors editing gsoc branch!
2018-02-22Cleanup: clnor code: more 'do not use same varname for two different things'.Bastien Montagne
2018-02-21Merge branch 'master' into blender2.8Sergey Sharybin
2018-02-20Cleanup: split normals: use different varnames for angle and its cosine.Bastien Montagne
Using same name for two different things is not the best idea ever...
2018-02-18Merge branch 'master' into blender2.8Campbell Barton
2018-02-18Cleanup: add 2d suffix to BLI filesCampbell Barton
Some of these API's can have 3D versions, explicitly name them 2D.
2018-02-08Merge branch 'master' into blender2.8Campbell Barton
2018-02-08Mesh: concave quad supportCampbell Barton
Previously quads always split along first-third vertices. This is still the default, to avoid flickering with animated deformation however concave quads that would create two opposing triangles now use second-fourth split. Reported as T53999 although this issue has been known limitation for a long time.
2018-01-31Merge branch 'master' into blender2.8Sergey Sharybin
2018-01-31Fix possible concurency issue in mesh normals computation.Bastien Montagne
Failure in own code from last December, thanks @sergey for finding it. To be backported to 2.79a.
2018-01-18Merge branch 'master' into blender2.8Brecht Van Lommel
2018-01-18Fix buffer overflow vulnerabilities in mesh code.Brecht Van Lommel
Solves these security issues from T52924: CVE-2017-12081 CVE-2017-12082 CVE-2017-12086 CVE-2017-12099 CVE-2017-12100 CVE-2017-12101 CVE-2017-12105 While the specific overflow issue may be fixed, loading the repro .blend files may still crash because they are incomplete and corrupt. The way they crash may be impossible to exploit, but this is difficult to prove. Differential Revision: https://developer.blender.org/D3002
2018-01-11Merge branch 'master' into blender2.8Sergey Sharybin
2018-01-11Mesh evaluate: Tweak threadability criteriaSergey Sharybin
Gives measurable speedup on layout scenes from Spring. Actual value for chunk size is a subject for more scientific research.
2018-01-10Merge branch 'master' into blender2.8Sergey Sharybin
2018-01-10Task scheduler: Use restrict pointer qualifierSergey Sharybin
Those pointers are never to be aliased, so let's be explicit about this and hope compiler does save some CPU ticks.
2018-01-09Merge branch 'master' into blender2.8Sergey Sharybin
2018-01-09Task scheduler: Use single parallel range function with more flexible functionSergey Sharybin
Now all the fine-tuning is happening using parallel range settings structure, which avoid passing long lists of arguments, allows extend fine-tuning further, avoid having lots of various functions which basically does the same thing.
2018-01-09Task scheduler: Get rid of extended version of parallel range callbackSergey Sharybin
Wrap all arguments into TLS type of argument. Avoids some branching and also makes it easier to extend things in the future.
2018-01-03Merge branch 'master' into blender2.8Campbell Barton
2017-12-23Fix scalability issue in threaded code of Mesh normals computation.Bastien Montagne
We tried to do as much as possible in a single threaded callback, which lead to using some nasty tricks like fake atomic-based spinlocks to perform some operations (like float addition, which has no atomic intrinsics). While OK with 'standard' low number of working threads (8-16), because collision were rather rare and implied memory barrier not *that* much overhead, this performed poorly with more powerful systems reaching the 100 of threads and beyond (like workstations or render farm hardware). There, both memory barrier overhead and more frequent collisions would have significant impact on performances. This was addressed by splitting further the process, we now have three loops, one over polys, loops and vertices, and we added an intermediate storage for weighted loop normals. This allows to avoid completely any atomic operation in body of threaded loops, which should fix scalability issues. This costs us slightly higher temp memory usage (something like 50Mb per million of polygons on average), but looks like acceptable tradeoff. Further more, tests showed that we could gain an additional ~7% of speed in computing normals of heavy meshes, by also parallelizing the last two loops (might be 1 or 2% on overall mesh update at best...). Note that further tweaking in this code should be possible once Sergey adds the 'minimum batch size' option to threaded foreach API, since very light loops like the one on loops (mere v3 addition) require much bigger batches than heavier code (like the one on polys) to keep optimal performances.
2017-10-20Merge branch 'master' into blender2.8Campbell Barton
2017-10-20Cleanup: redundant castsCampbell Barton
2017-10-06Merge branch 'master' into blender28Campbell Barton
2017-10-06Cleanup: Math lib naming (use v3 suffix)Campbell Barton
2017-08-21Merge branch 'master' into blender2.8Campbell Barton
2017-08-21Fix T52434: Restore mesh center of mass calculationCampbell Barton
The new method while improved for solid objects doesn't work for non-manifold meshes, keep both.
2017-06-19Merge branch 'master' into blender2.8Campbell Barton
2017-06-19Cleanup: doxygen commentsCampbell Barton
Also remove duplicate & mismatching comments from grease-pencil header. Keep comments close to implementation to avoid getting out of sync.
2017-05-25TexFace removal part 3Campbell Barton
- MTexPoly structure & layer type. - The 'Mesh.uv_textures' layers. - DerivedMesh TexFace drawing. - Scripts & UI.
2017-05-24TexFace removal part 2Campbell Barton
- Derived-mesh drawing. - All non UV members of TexFace structs. MTexPoly is now redundant but keeping with a dummy member, will check on complete removal later.
2017-05-24Fix T51561: Normal maps fail w/ quad + eeveeCampbell Barton
Generalize derived-mesh tangent calculation so it can be used by Batch cache creation too.
2017-05-12Mesh Center: improved center-of-mass calculationBill Currie
Previous method was based on face-area, giving un-even results based on topology and gave issues with zero area faces. This method gives matching results for concave ngons and the same geometry triangulated.
2017-04-24Cleanup: styleCampbell Barton
2017-03-14CLNor: rework threaded computation.Bastien Montagne
Was using some threaded queue on top of task pool, tssk... Now using properly task pool directly to crunch chunks of smooth fans. No noticable changes in speed. Tried to completely get rid of the 'no threading with few loops' code, but even just creating/freeing the task pool, without actually pushing any task, is enough to make code 50% slower in worst case scenario (i.e. few thousands of simple cube objects).
2017-03-14CLNor code: use averaged debug timing.Bastien Montagne
2017-03-14Fix T50876: Cycles Crash - Cycles crashes before sampling when certain ↵Bastien Montagne
meshes have autosmooth enabled. The root of the issue was in custom normal code, so far it assumed that we could only have one cyclic smooth fan around each vertex, which is... blatantly wrong (again, the two cones sharing same vertex tip e.g.). This required a rather deep change in how smooth fans/clnor spaces are processed, took me some time to find a 'good' solution. Note that new code is slightly slower than previous one (maybe about 5%), not much to be done here, am afraid. Tested against all older report files I could find, seems OK.
2017-03-10Fix useless allocation of edge_vectors in threaded case of loop split ↵Bastien Montagne
generation.
2017-02-22Refactor Mesh split_faces() code to use loop normal spaces.Bastien Montagne
Finding which loop should share its vertex with which others is not easy with regular Mesh data (mostly due to lack of advanced topology info, as opposed with BMesh case). Custom loop normals computing already does that - and can return 'loop normal spaces', which among other things contain definitions of 'smooth fans' of loops around vertices. Using those makes it easy to find vertices (and then edges) that needs splitting. This commit also adds support of non-autosmooth meshes, where we want to split out flat faces from smooth ones.
2017-01-11Add mid_v3_v3_array function and remove redundant functionsLuca Rood
Other than implementing a `mid_v3_v3_array` function, this removes `cent_tri_v3` and `cent_quad_v3` in favor of `mid_v3_v3v3v3` and `mid_v3_v3v3v3v3` respectively. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D2459
2016-11-15Atomics: Make naming more obvious about which value is being returnedSergey Sharybin
2016-11-02Solve threading conflict when calculating smooth normalsSergey Sharybin
It was possible to have synchronization issues whe naccumulating smooth normal to a vertex, causing shading artifacts during playback. Bug found by Dalai, thanks!
2016-08-02Fix T48986: Incorrect normals or tangents when using custom split normals.Bastien Montagne
(Re)-setting custom normals could cause some unwanted splitting of some of them, leading to slightly different tangent space. Simply enlarged slightly the threshold detecting similar normals as identical ones for now, afarid this is the kind of issue that cannot get a full complete solution for until we drop floats...