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
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...
2016-06-07Fix (unreported) EditNormal modifier: broken 'flip poly' feature.Bastien Montagne
Newly computed custom normals were forgotten during poly flipping, leading to wrong custom normals being assigned to wrong loop... Dead simple, but was tough to track down this one!
2016-04-26Support multiple tangents for BI render & viewportAlexander Romanov
Normal Map node support for GLSL mode and the internal render (multiple tangents support). The Normal Map node is a useful node which is present in the Cycles render. It makes it possible to use normal mapping without additional material node in a node tree. This patch implements Normal Map node for GLSL mode and the internal render. Previously only the active UV layer was used to calculate tangents.
2016-04-01Cleanup: style/spellingCampbell Barton
2016-03-14Support mdisps for Mesh.flip_normals()Campbell Barton
2016-03-14Cleanup: move MDisps flipping to own functionCampbell Barton
2016-03-14Cleanup: style/spellingCampbell Barton
2016-02-28BKE_mesh: add polygon flipping tools.Bastien Montagne
Those new functions invert the winding of polygons, effectively inverting their normals. A helper was also added to allow swapping two items in customdata layers. Being able to invert normals outside of BMesh area is very important in several places, like IO scripts or customnormals modifiers... Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D1814
2016-01-28Cleanup: warnings & styleCampbell Barton
2016-01-28cleanup: spelling / typosMike Erwin
no functional changes
2016-01-26mesh_evaluate.c: OMP -> BLI_task, and some more parallelization.Bastien Montagne
Only concerns poly normals computing, have usual 10% speedup of affected code for OMP -> BLI_task switching. Also parallelized the 'weighted accum' part (used when computing both polys and vertices normals, when using modifiers e.g.), which gives nice 325% speedup (from 66ms to 20ms for a 500k poly monkey with simple deform modifier e.g.). ;)
2015-12-21Cleanup: warnings (msvc)Campbell Barton
Part of patch D1670 by @LazyDodo
2015-10-12Add functions to compute normals (verts, polys and loops ones) for a given ↵Bastien Montagne
shapekey. Title says pretty much everything, we now have BKE and RNA funcs to get vertex, poly and loop normals of a given shapekey. This will be used e.g. in FBX exporter (shapekeys need normal data too). Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1510
2015-09-15Cleanup: hide clnors warning prints behind G.debug, those can get annoyingly ↵Bastien Montagne
verbose...
2015-09-14Fix T46114: paint face-mask hide clears sharp flagCampbell Barton
2015-09-13Cleanup: spellingCampbell Barton
2015-09-04Fix T46015: normals_split_custom_set_from_vertices doesn't work with zero ↵Bastien Montagne
vectors This was simply broken for vertex case (indexing loop normals with vert indices...). Turns out to be rather verbose to replace on-the-fly zero normals by default ones correctly, and do not want to make a full copy of the given custom normals array, so now this one is editied in place (replacing zero vectors by correct default normals). Don't think this could be a serious issue anyway.
2015-09-03Fix T45984: Setting custom normals properly requires multiple calls to ↵Bastien Montagne
normals_split_custom_set() The detection of needed sharp edges (based on given loop normals) would not fully work on first run in case we started with a complete smooth cyclic loop fan (edge between first and last loop of the fan would not get checked).
2015-08-12Displace Modifier: add an option to displace along (averaged) custom ↵Bastien Montagne
normals, instead of vertex normals. User suggestion/request from 'boby'.
2015-08-05Remove redundant addition in BKE_mesh_calc_volumeCampbell Barton
2015-07-30Move tangents and baking to looptris:Antony Riakiotakis
Notes: * Code in rendering and in game engine will still convert tangents to a tessface representation. Added code that takes care of tangent layer only, might be removed when BGE and rendering goes full mlooptri mode. * Baking should work discovered some dead code while I was working on the patch, also tangents are broken when baking from multires (also in master), but those are separate issues that can be fixed later. This should fix T45491 as well
2015-07-19Cleanup: styleCampbell Barton
Also 'com' as abbreviation for center-of-mass is a bit confusing, rename to 'center'.
2015-07-19Convert rigidbody conversion to looptri.Antony Riakiotakis
Patch D1417 by Martin Felke, with minor edits thanks!
2015-07-17Let's use proper helpers for debug-only vars...Bastien Montagne
2015-07-17Make strict flags happy in release buildsSergey Sharybin
2015-07-16Add tessellation data to DerivedMesh (LoopTri)Campbell Barton
This stores loop indices into the loop array giving easier acess to data such as vertex-colors and UV's, removing the need to store an MFace duplicate of custom-data. This doesn't yet move all internal code from MFace to LoopTri just yet. Only applies to: - opengl drawing - sculpting (pbvh) - vertex/weight paint Thanks to @psy-fi for review, fixes and improvements to drawing!
2015-07-14Match face tessellation order in edimodeCampbell Barton
add a negated version of axis_dominant_v3_to_m3
2015-07-10Cleanup: use const for mesh functionsCampbell Barton
2015-07-07Fix for recent error, ngons now flipped correctlyCampbell Barton
2015-07-06Remove redundant face-flipping checkCampbell Barton
2015-06-03Fix error calculating bmesh normalsCampbell Barton
edge vector stack was left un-cleared.
2015-05-20doxygen: corrections/updatesCampbell Barton
Also add depsgraph & physics
2015-04-13Fix T44359: `mesh_normals_loop_custom_set()` would not behave correctly with ↵Bastien Montagne
zero-normals. Zero-normals here are used as a shortcut to say 'use auto-computed values'. So we have to do so in pre-process steps!
2015-03-26Fix T44138: Crash in DataTransfer modifier when selecting a source with no ↵Bastien Montagne
loops. Simply check and early return in case we have no source or destination items (verts/edges/loops/polys) available... Also, fix an assert in `BKE_mesh_calc_normals_poly()`, when called with no poly.
2015-03-16Fix an incorrect assert in lnor code.Bastien Montagne
There is one case where we do can have only two edges for two loops...
2015-02-08Some minor fixes from latest coverity scan, nothing crucial here.Bastien Montagne
2015-02-06Fix T43579: FBX Export shading issue (Broken normals?)Bastien Montagne
Error in custom split normals work, non-autosmooth normals != vertex normals! Loops from flat faces shall take normal of their face, not their vertex. Tsst...
2015-02-05Add Custom Loop Normals.Bastien Montagne
This is the core code for it, tools (datatransfer and modifier) will come in next commits). RNA api is already there, though. See the code for details, but basically, we define, for each 'smooth fan' (which is a set of adjacent loops around a same vertex that are smooth, i.e. have a single same normal), a 'loop normal space' (or lnor space), using auto-computed normal and relevant edges, and store custom normal as two angular factors inside that space. This allows to have custom normals 'following' deformations of the geometry, and to only save two shorts per loop in new clnor CDLayer. Normal manipulation (editing, mixing, interpolating, etc.) shall always happen with plain 3D vectors normals, and be converted back into storage format at the end. Clnor computation has also been threaded (at least for Mesh case, not for BMesh), since the process can be rather heavy with high poly meshes. Also, bumping subversion, and fix mess in 2.70 versioning code.
2015-02-02cleanup: style/spellingCampbell Barton
2015-01-19Make use/computation of lnors consistant.Bastien Montagne
Issue was, when requesting (building) lnors for a mesh that has autosmooth disabled, one would expect to simply get vnors as lnors. Until now, it wasn't the case, which was bad e.g. for normal projections of loops in recent remap code (projecting along split loop normals when you would expect projection along vertex normals...). Also, removed the 'angle' parameter from RNA's `mesh.calc_normals_split`. This should *always* use mesh settings (both autosmooth and smoothresh), otherwise once again we'd get inconsistencies in some cases. Will update fbx and obj addons too.
2015-01-13Math Lib: improve area calculationCampbell Barton
- area_quad_v3 now works correctly with concave quads. - add area_squared_*** functions, to use when comparing to avoid a sqrt().
2014-08-13Math Lib: rename barycentric_transform -> transform_point_by_tri_v3Campbell Barton
also add transform_point_by_seg_v3
2014-08-05Cleanup: indentationCampbell Barton
2014-07-12Replace BLI_SMALLSTACK_FREE with fake user (quiet warnings in msvc)Campbell Barton
2014-07-11Fix potential bug in loop normals code.Bastien Montagne
Even if we cannot use computed lnor, we still have to empty the fan stack of lnors!
2014-07-11Fix T41019: Calculate Mass does not calculate actual volume.Lukas Tönne
This was a ToDo item, for mesh-based rigid body shapes (trimesh, convex) the operator was simply using the bounding box volume, which can grossly overestimate the volume and mass. Calculating the actual volume of a mesh is not so difficult after all, see e.g. http://research.microsoft.com/en-us/um/people/chazhang/publications/icip01_ChaZhang.pdf This patch also allows calculating the center-of-mass in the same way. This is currently unused, because the rigid body system assumes the CoM to be the same as the geometric object center. This is fine most of the time, adding such user settings for "center-of-mass offset" would also add quite a bit of complexity in user space, but it could be necessary at some point. A number of other physical properties could be calculated using the same principle, e.g. the moment of inertia.
2014-06-14Polyfill2d: avoid calculating polygon winding (its known in all cases)Campbell Barton
2014-06-13BLI_bitmap: rename macrosCampbell Barton
- BLI_BITMAP_SET -> BLI_BITMAP_ENABLE - BLI_BITMAP_CLEAR -> BLI_BITMAP_DISABLE - BLI_BITMAP_GET -> BLI_BITMAP_TEST - BLI_BITMAP_MODIFY -> BLI_BITMAP_SET
2014-05-28Fix T40405: Blender crashes on FBX export instantly.Bastien Montagne
Better fix than rBbef5cb3aa2e5a: consider edges between faces with opposed normals as sharp. In fact, previous code was broken more deeply in this case (inconsistent normals across a 'smooth fan') - some loop normals would even never be computed! Fixing this is possible (even wrote it, actually), but this adds more complexity to a piece of code that is already awfully complicated, *and* normals in that kind of smooth fan do not make much sense anyway. So simpler and nicer results with assuming sharp edges between such 'opposed' faces! Note that there is some face (loop) ordering black magic at work here, added more comments to try to explain how and why all this works. As a bonus, we do not need to check for already computed loop normals anymore, since we know each 'smooth fan' will be walked once, and only once.
2014-05-28Fix T40405: Blender crashes on FBX export instantly.Bastien Montagne
This crash can only happen in case faces in same 'smooth fan' have reversed normals. To support this, we have to always keep a way to get real values in loop_to_poly, even when loop itself is tagged as done, it might be needed in computation of one of its neighbor's split normal later.