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
2017-05-29Fix T51520: Broken vertex weights after two mesh joining.Bastien Montagne
Take Two, did not detect that dynapaint was also creating named vgroup cdlayer!
2017-03-11Cleanup: code style & cmakeCampbell Barton
2017-01-16Cleanup/refactor: Add new BLI_string_util.Bastien Montagne
Things like `BLI_uniquename` had nothing, but really nothing to do in BLI_path_util files! Also, got rid of length limitation in `BLI_uniquename_cb`, we can use alloca here to avoid overhead of malloc while keeping free size (within reasonable limits of course).
2017-01-12Dynamic Paint: recursively search for island border edges.Alexander Gavrilov
It is quite likely in a triangulated mesh that the actual island edge belongs to a different triangle than the current pixel; for example consider corners of a triangulated axis aligned rectangle face that have the additional edge: a pixel there will have to be assigned to one of the triangles, but one of the edges of the original rectangle can only be accessed through the other triangle. Thus for robust operation it is necessary to do a recursive search. The search is limited by requiring that it only goes through edges that bring it closer to the target point, and also by depth as a safeguard. Differential Revision: https://developer.blender.org/D2409
2017-01-12Dynamic Paint: provide margin of error for linking neighbors across seams.Alexander Gavrilov
The code requires the pixel on the other side of the seam to be assigned precisely to the expected triangle. This can cause false negatives around vertices, where a pixel is likely to touch multiple triangles and thus cannot be said to unambiguously belong to any one of them, so check distance to the intended triangle and accept the result if it's close.
2017-01-12Dynamic Paint: improve UV island border handling in effects.Alexander Gavrilov
1. Forcibly symmetrize the neighbor relations, so that if A is neighbor of B, B is neighbor of A. The existing code is guaranteed to violate this if texture resolution is different between the sides of a seam. 2. In texture mode dynamic paint adds a 1 pixel wide border around the islands. These pixels aren't really part of the dynamic paint domain and thus by design can't have symmetrical neighbor relations. This means they can't be treated by effects like normal pixels. The simplest way to handle it in a consistent way is to exclude them from effects, but add an additional pass that recomputes them as average of their non-border neighbors, located on both sides of the seam.
2017-01-11Split interp_weights_face_v3 into specific functions for tris and quadsLuca Rood
This splits `interp_weights_face_v3` into `interp_weights_tri_v3` and `interp_weights_quad_v3`, in order to properly handle three sided polygons without needing a useless extra index in your weight array. This also improves clarity and consistency with other math_geom functions, thus reducing potential future errors. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D2461
2017-01-04Dynamic Paint: Fix random pixel flooding by absolute brush with spread.Alexander Gavrilov
If a very low wetness absolute alpha brush is used with spread and drying effects enabled, some pixels will rapidly accumulate paint. This happens because paint drying code applies a minimal wetness threshold that causes the paint to instantly dry out. Specifically, every frame the brush adds paint at the specified absolute alpha and wetness set to the minimal threshold, spread drops it below threshold, and finally drying moves all paint to the dry layer. This drastically accelerates the rate of flow of paint into the affected pixels. Fortunately, the reason paint spread actually ends up decreasing wetness turns out to be a simple floating point precision problem, which can be easily fixed by restructuring the affected expression.
2016-11-15Atomics: Make naming more obvious about which value is being returnedSergey Sharybin
2016-09-27Dynamic Paint: Don't store duplicate adjacency links.Alexander Gavrilov
Duplicates can happen at UV seams in case of resolution mismatch or other complications. It's better not to store them in case it confuses some math later on. Reviewers: mont29 Differential Revision: https://developer.blender.org/D2261
2016-09-27Dynamic Paint: Fix adjacency computations at UV seams.Alexander Gavrilov
1. When adding one pixel border to UV islands prefer grid directions. This is more logical as it means neighbor pixels will commonly share a border, opposed to just corners. 2. Don't subtract 0.5 when converting float UVs to int in computing adjacency across a UV seam. Pixels cover a square with corners at int positions and adding/subtracting 0.5 is only for dealing with the center point of a pixel. 3. Use the neighbour_pixel field from the correct pixel, and check it's not back to the origin point. 4. In the connected UV case, ensure that the returned index actually refers to a valid active pixel. This fixes paint spread not traversing some UV seams, while at the same time spreading to random unrelated points on other seams. The first problem is primarily fixed by 2, while the second one is addressed by item 4. Differential Revision: https://developer.blender.org/D2261
2016-09-27Fix T49461: Dynamic paint wetmap flickers.Bastien Montagne
Regression from rBa4a968f, we would adjust current point's wetness without actually protecting it in new multi-threaded context, leading to concurrent access mess. Now delay applying wetness reduction to current point to end of function, allows us to avoid having to lock current point twice together with neighbor one (and reducing spinlock awainting too). To be backported to 2.78a.
2016-08-11Fix T49004 and motion blur of cloth, softbody, etc past the end frame.Alexander Gavrilov
Point cache read code contains checks designed to prevent it reading stale data when the relevant simulation code should instead compute the next frame from the previous one. However in some situations like motion blur subframes the simulation can't possibly do it and just exits. This causes completely incorrect motion blur at or after the last cached frame. To fix, add a parameter that tells the cache code whether it should apply the checks and exit, or read what it can even if stale (true means exactly same as old behavior). Doing this in cache rather than clamping the frame number better in the caller lets it handle the case of incomplete cache that stops before the official last frame. Reviewed By: mont29, lukastoenne Maniphest Tasks: T49004 Differential Revision: https://developer.blender.org/D2144
2016-07-21Cleanup: warningsCampbell Barton
2016-07-07Cleanup: spelling, styleCampbell Barton
2016-07-04Fix a few compiler warnings on OS X / clang.Brecht Van Lommel
Two were actual bugs, though they existed only in unused code: * In Freestyle it was unintentionally copying a scene rather than referencing it. * In BLI_array_store_is_valid there was use of uninitialized memory.
2016-06-23Fix T48658: Cycles render & render preview corrupts particlesCampbell Barton
Replaces `G.is_rendering` with `use_render_params` argument. This is needed for Cycles, which attempts to restore render-preview settings from particles, after it gets its own particle data, but fails to restore because `G.is_rendering` was being checked in psys_cache_paths (and other places).
2016-06-18Cleanup: style, whitespace, doxy filepathsCampbell Barton
2016-05-21Forgot to remove omp header include...Bastien Montagne
2016-05-21Dynamicpaint: fix (unreported) missing progress bar in early baking stage.Bastien Montagne
Nothing was shown in UI during pre-bake step, while it can take several minutes to complete with heavy geometry.
2016-05-21DynamicPaint: massive refactor, replace all OpenMP usage by BLI_task and ↵Bastien Montagne
other optimizations. This commit makes Dynamicpaint modifier evaluation (during playback) a few percents quicker. However, it makes dynapaint's 'image sequence' baking about 33% quicker (from 119 to 77 seconds in own heavy test), partly due to switch to BLI_task itself (about 20%), and partly due to optimizations (remaining ~13%). As usual, did a lot of tests here to ensure nothing is broken, but a lot more users' testing would definitively be welcome too! ;) Note that some quite meaningless omp forloops have been removed (parallelizing thousands of vec copy does make it two or three times quicker, but the few hundreds of microseconds gained do not make any difference in a hundreds millisecond process). Also, this code could still use a lot more cleanup (naming etc.), the way it (tries to) handle malloc faults is also totally flacky and makes the code horribly verbose and convoluted in some places - without actually catching all possible faults (memarena could make it more easy to handle here), etc.
2016-05-21Hopefully fix OMP/MSVC crap...Bastien Montagne
2016-05-21Dynapaint: Serious cleanup and optimization of dynamicPaint_createUVSurface ↵Bastien Montagne
(mostly). Gives 3-4% speedup in pre-bake step (from 112 to 108 seconds with own heavy test file). Note that here we have a huge potential performance boost if we replace the flat `Bounds2D *faceBB` array of UV tris bounding boxes by a real 2D AABB tree (right now, we can loop over all UV triangles times the number of pixels of the surface times 5...).
2016-05-19Cleanup: misleading indentationCampbell Barton
2016-05-19Dynapaint: parallelize drip effect.Bastien Montagne
Was not so far, because this effect is not modifying its 'own' PaintPoint, which means it's not threadsafe. Since a global lock (mutex or spinlock) would not be much efficient (we need to lock a given point pretty much all the computaion cycle), and since locking a same PaintPOint from different threads at the same time is *very* unlikely, solution here is to use an 'array of locks', one for each PaintPoint (same thing as BLI_bitmap, using atomic ops to set/clear bits). Here in own test (complex dynapaint over a huge sphere combining all dynapaint types), it gives 20% speedup of the whole dynapaint simulation! Note: maybe we'd want to move that kind of bitlock into BLI lib some day - not totally sure how, so let's keep it local for now...
2016-05-19Dynapaint: fix use of normal normalization in dynamicPaint_generateBakeData().Bastien Montagne
Vertex's normal is always normalized - and its conversion from short to float should not change that! On the other hand, linear interpolation of three normals **does not give a normalized vector** (unless all three inputs are exactly the same). Also, minor optimization, avoid recomputing that interpolated normal twice for each PaintUVPoint.
2016-05-13Cleanup: rna naming, indentationCampbell Barton
2016-05-13Cleanup: fix inconsitency in dynamicPaint_outputLayerExists()Bastien Montagne
Dyna WPaint indeed only uses first output layer, but better be consistent in those cases...
2016-05-13Dynapaint: cleanup of BKE code.Bastien Montagne
Line lengths, monolined 'if' statements, int -> bool, etc. Also, replaced some internal cooked stuff by BLI helpers (most notably, the 'is inside UV triangle' code in `dynamicPaint_createUVSurface()`), and some other minor optimizations.
2016-05-09Cleanup: header, styleCampbell Barton
2016-05-08Fix T48373: Crash when using dynamic paint with brush material.Bastien Montagne
`dynamicPaint_doMaterialTex` was called from inside an omp parallel section with brush->dm itself, and not the local dm copy. Generating looptri data is not thread safe at all...
2016-02-04Fix T47317: Dynamic paint crashes with no UV layerCampbell Barton
2016-01-26Cleanup: minmac -> minmax & RE_render_ext namingCampbell Barton
Use more conventional API word-ordering for RE_render_ext
2016-01-12Fix T47164: [Scene.raycast] - True result when it should be False.Bastien Montagne
We cannot use FLT_MAX as initi distance for raycast... Renamed TRANSFORM_DIST_MAX_RAY to BVH_RAYCAST_DIST_MAX, moved it into BLI_kdopbvh, and use in RNA raycast callbacks (and all other places using that API).
2016-01-09Smoke, Dynamic Paint: de-duplicate object subframe update function.Kévin Dietrich
As in the title. In the smoke version, there was also an extra 'for_render' parameter that wasn't used, and wasn't used by the callers either, so it was removed altogether. Reviewers: brecht Reviewed By: brecht Subscribers: brecht Differential Revision: https://developer.blender.org/D1718
2015-11-23Cleanup: shadowing (blenkernel)Campbell Barton
2015-09-22Cleanup: indentationCampbell Barton
2015-09-04Quiet warningsJulian Eisel
We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
2015-08-21BVH-raycast: ensure input direction is unit-lengthCampbell Barton
This was already the case for most users of ray-cast. Doing this avoids 2x normalize calls per ray-cast in many places.
2015-08-18Refactor translation code out of blenfontCampbell Barton
- Add blentranslation `BLT_*` module. - moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`). - moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
2015-07-27Use loop data instead of face dataCampbell Barton
Replace checks in various places
2015-07-27Error in looptri update, was checking wrong layer-typeCampbell Barton
2015-07-27Missed last commitCampbell Barton
2015-07-27Replace MFace with looptri for dynamicpaintCampbell Barton
D1429 by @lichtwerk, with edits
2015-07-22Use const for BVH mesh arraysCampbell Barton
2015-07-13 Imbuf types refactor.Antony Riakiotakis
ImBuf types were getting stored as bitflags in a 32bit integer which had already run out of space. Solved the problem by separating file type to an ftype enum, and file specific options to foptions. Reviewed by Campbell, thanks a lot!
2015-05-20doxygen: corrections/updatesCampbell Barton
Also add depsgraph & physics
2015-03-30Cleanup: use const for typeinfoCampbell Barton
2015-03-21Cleanup: constify scene/modifiersCampbell Barton
2015-01-27Fix T43427: Particle system children sometimes not generated on reloadSergey Sharybin
The issue was caused by the conflict between preview render which would set R_NO_IMAGE_LOAD flag on the renderer and texture samplers called outside of the render pipeline trying to use this flag. Now the sampler functions accepts extra argument so render pipeline can still skip image load, but calls outside of the pipeline will nicely load all the images. Not cleanest change in the world but good enough to unlock gooseberry team, and assuming we already had pool passed all over the place it should be all fine. Will need to reshuffle arguments into SamplerOptions structure later.