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
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.
2014-05-28Add asserts to BKE_mesh_normals_loop_splitCampbell Barton
2014-05-19Correct ARRAY_SIZE macro and make doxy comments consistentCampbell Barton
2014-04-27Correct some errors in auto-cleanupCampbell Barton
2014-04-26Code cleanup: use 'const' for arrays (blenkernel)Campbell Barton
2014-04-16Fix related to new split normals draw code.Bastien Montagne
Tessellated split normals CDlayer had no swap func, hence ugly little test_index_face() could not rotate its values correctly when rotating tessellated faces... Extra-reported in T39735.
2014-04-15Math Lib: avoid having to pass a pre-calculated normal tot area_poly_v3Campbell Barton
add normal_poly_v3
2014-04-13Split Normals I (1/5): basis for split normals (nearly nothing user-visible ↵Bastien Montagne
here): * Add a new calcLoopNormals function to DerivedMesh struct, and implement it for CDDM and CCGDM (subsurf). EditDerivedBMesh (edit mode DM) only gets a dummy one in this commit. * Add a tessellated version of CD_LOOPNORMAL layer (CD_TESSLOOPNORMAL), with relevant code to handle it (tessellation, rna access, etc.). * Change auto_smooth options of Mesh (angle now in radian internaly, and toggle is now used to enable/disable split normals in DM creation process). Note BI render code is not touched here, hence its behavior regarding this option is now incoherent, will be addressed in a separate commit. Reviewers: campbellbarton CC: brecht Differential Revision: https://developer.blender.org/D365
2014-03-27Code cleanup: use consistent arg order for math api poly funcsCampbell Barton
2014-03-26Code cleanup: remove unused flagsCampbell Barton
2014-03-20Code cleanup: use boolsCampbell Barton
2014-03-15Code cleanup: use r_ prefix for return argsCampbell Barton
2014-01-23Fix T38328: GLSL display shows texture mapping completely messed up in some ↵Bastien Montagne
cases Own stupid typo in rB28ca299d4dfc...
2014-01-22Fix T38316: Half of a Face is Missing on Newly Created Cubes or Cylinders.Bastien Montagne
Own bug from rBc691551249f3. Now at least I understand why `test_index_face()` is needed for tessellated quads! Added a bunch of comments to explain the issue, as it's far from an obvious one... We loose some performances, but it's still much quicker than org code.
2014-01-21Code Cleanup: reduce sign conversionCampbell Barton
2014-01-21Optimize tessellation code (min 20% better, up to 300% with some CD layers ↵Bastien Montagne
to tessellate). The main idea is to store (during tessellation) or recreate (during tessdata update) a tessfaceverts-to-loops mapping, and then update all tessdata in one pass, instead of calling `BKE_mesh_loops_to_mface_corners` repeatedly for all tfaces! Differential Revision: https://developer.blender.org/D226 Reviewed by Campbell, thanks a lot!
2014-01-15Fix a bunch of UI string issues...Bastien Montagne
2014-01-11Add tangent space computation/access from RNA (i.e. python).Bastien Montagne
This simply mimics code used for loopnormals, to enable py scripts to generate and access (temporary) a tangent 3D vector and bitangent sign for each loop. Together with the split normals, this allow to recreate a complete tangent space for normal mapping (bitangent = bitangent_sign * cross(normal, tangent)). Expects all faces to be tri or quads. Reviewed By: Brecht, campbellbarton Differential Revision: https://developer.blender.org/D185
2013-12-12Code Cleanup: move mesh mapping functions into their own file/headerCampbell Barton
2013-12-02MemArena: use size_t instead of int for alloc args and internal storage.Campbell Barton
also add BLI_memarena_calloc to be used when calloc isnt enabled for the arena.
2013-11-30BMesh/Mesh: replace scanfill with polyfillCampbell Barton
2013-10-28move bmesh array lookup data and utility functions from editmesh into bmesh,Campbell Barton
since enough bmesh operations can also take advantage of direct index lookups on verts/edges/faces. developers note: - EDBM_index_arrays_init/ensure/free -> BM_mesh_elem_table_ensure/init/free - EDBM_vert/edge/face_at_index -> BM_vert/edge/face_at_index - EDBM_uv_element_map_create/free -> BM_uv_element_map_create/free - ED_uv_element_get -> BM_uv_element_get
2013-10-19Arg! Fix another bug in split normal core algorithm (some flat faces were ↵Bastien Montagne
ignored, depending on the order of evaluation)... :/
2013-10-09Fix [#37012] The new export split normal does nor produce correct results.Bastien Montagne
Was a silly error introduced in algo during optimization, vertices having sharp and smooth edges would only get the first poly's normal for each "smooth loop group". Also done a (minor) optimization, and some comment fixes.
2013-09-10misc minor changesCampbell Barton
- make cmake osx use of -ftemplate-depth match scons. - use array size within sizeof(), more compact. - replace AT with __func__ where the function is unique enough. - BLI_box_pack_2D -> 2d to match other functions. - rename new mesh normal calculation to mesh.calc_normals_split()
2013-09-10Core code for split normals computation. Many thanks to ideasman for is ↵Bastien Montagne
optimization guiding and code reviews! Note the API is not yet committed, as it may need a few more checks & tweaks. ;)
2013-09-09correct error in recent changes for building with openmp.Campbell Barton
rename DM_OMP_LIMIT to BKE_MESH_OMP_LIMIT and set to 0 when in debug mode, same for BM_OMP_LIMIT.
2013-09-09enable strict flags for mesh_evaluate.cCampbell Barton
2013-09-09remove use of BLI_array in BKE_mesh_mpoly_to_mface(). was over-allocating ↵Campbell Barton
anyway so just allocate the array once.
2013-09-09move mesh evaluation functions (normal, mapping, smooth group... etc, ↵Campbell Barton
calculations) into mesh_evaluate.c. mesh.c was over 4k lines and complex functions mixed in with general library management.