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-01-11Subsurf: Use regular mutex instead of RW oneSergey Sharybin
Mutex is now local to particular CCGDM, and guarding edge hash which is only used by a single function only. There is no need to acquire read lock after edge hash was created.
2017-12-22Subsurf: Avoid global lock for loops and orig index layersSergey Sharybin
This is a bit annoying to have per-DM locking, but it's way better (as in, up to 4 times better) for playback speed when having lots of subsurf objects,
2017-11-19Fix T53347: Vertex paint crash on undo/exitCampbell Barton
2015-11-04OpenSubdiv: Use pool for delayed OpenGL buffers free when freeing from ↵Sergey Sharybin
non-main thread This is really similar to what GPU module was already doing. There are number of possible improvements still: - Re-use allocated VAOs when requesting new ones instead of going to the trouble of freeing VAO and then re-creating it again. - Move VAO handling to GPU module. Fixes T46589: OpenSubdiv crash with drivers
2015-08-05OpenSubdiv: Completely avoid possible access to non-existing CPU dataSergey Sharybin
Make it so CCGDM reports 0 number of geometry when it uses GPU backend for drawing. This screws up a bit statistics in info header and requires to have some special handle of CCGDM in the drawing code, but makes it so non of the areas will try to access non-existing geometry.
2015-07-20OpenSubdiv: Commit of OpenSubdiv integration into BlenderSergey Sharybin
This commit contains all the remained parts needed for initial integration of OpenSubdiv into Blender's subdivision surface code. Includes both GPU and CPU backends which works in the following way: - When SubSurf modifier is the last in the modifiers stack then GPU pipeline of OpenSubdiv is used, making viewport performance as fast as possible. This also requires graphscard with GLSL 1.5 support. If this requirement is not met, then no GPU pipeline is used at all. - If SubSurf is not a last modifier or if DerivesMesh is being evaluated for rendering then CPU limit evaluation API from OpenSubdiv is used. This only replaces the legacy evaluation code from CCGSubSurf_legacy, but keeps CCG structures exactly the same as they used to be for ages now. This integration is fully covered with ifdef and not enabled by default because there are several TODOs to be solved first: - Face varying data interpolation is not really cleanly implemented for GPU in OpenSubdiv 3.0. It is also not implemented for limit evaluation API. This basically means we'll have really hard time supporting UVs. - Limit evaluation only works with adaptivly subdivided meshes so far, which basically means all the points of CCG are pushed to the limit. This gives different result from old code. - There are some serious optimizations possible on the topology refiner creation, which would speed up initial OpenSubdiv mesh creation. - There are some hardcoded asumptions in the GPU and DerivedMesh areas which could be generalized. That's something where Antony and Campbell can help, making it so the code is structured in a way which is reusable by all planned viewport projects. - There are also some workarounds in the dependency graph to make sure OpenGL buffers are only freed from the main thread. Those who'll be wanting to make experiments with this code should grab dev branch (NOT master) from https://github.com/Nazg-Gul/OpenSubdiv/tree/dev There are some patches applied in there which we're working on on getting into upstream.
2015-05-27Fix T44745 non manifold edges of mesh do not work when smoothing inAntony Riakiotakis
multires. Code had special guards for such edges to stop this from happening. I don't see why this is needed though since code above assigns smoothed positions for all vertices in the grid. After removing the guards I saw that this in fact was the only place where grd adjacency was used, so I completely removed it.
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2014-03-15Code cleanup: use r_ prefix for return argsCampbell Barton
2013-10-01Mark some CCG funcrions as inlinedSergey Sharybin
This seems to be giving speedup up to 10% in own tests. -- svn merge -r60104:60105 ^/branches/soc-2013-depsgraph_mt
2012-11-03style cleanup: tabs & whitespaceCampbell Barton
2012-05-13code cleanup: header cleanup and remove some duplicate defines.Campbell Barton
2012-05-11style cleanup: mainly sculpt/whitespaceCampbell Barton
2012-05-11Copy GridPaintMask to vertex paint mask when applying multires.Nicholas Bishop
Adds new subsurf_copy_grid_paint_mask() function similar to subsurf_copy_grid_hidden().
2012-05-11Add mask support to CCGSubSurf and multires.Nicholas Bishop
* Add new CCG function ccgSubSurf_setAllocMask(). Similar to to ccgSubSurf_setCalcVertexNormals(), it sets whether the CCG elements have a mask layer and what that layer's offset is. Unlike normals however, it doesn't change any behavior during CCG calculation; it's there only to give CCGKey information on the mask. * Add a new flag to _getSubSurf(), CCG_ALLOC_MASK. If set, space for an extra layer is allocated, but the number of CCG layers is not set to include it. This is done because GridPaintMasks are absolute, rather than being relative to the subdivided output (as MDisp displacements are), so we skip subdividing paint masks here. * Add a new flag to subsurf_make_derived_from_derived(), SUBSURF_ALLOC_PAINT_MASK. This controls whether CCG_ALLOC_MASK is set for _getSubSurf(). Related, masks are never loaded in during ss_sync_from_derivedmesh(). After subdivision is finished, if the alloc mask flag is set, the number of CCG layers is increase to 4 with ccgSubSurf_setNumLayers(). * Add a new flag to multires_make_from_derived(), MULTIRES_ALLOC_PAINT_MASK. Not all multires functions need paint mask data (e.g. multiresModifier_base_apply.) This flag is always set in MOD_multires.c so that subdividing a mesh with a mask updates properly even when not in sculpt mode. * Update multiresModifier_disp_run() to apply, calculate, and add mask elements. It's almost the same as the existing operations with xyz coordinates, but treats masks as absolute rather than displacements relative to subdivided values. * Update multires_customdata_delete to free CD_GRID_PAINT_MASK in addition to CD_MDISPS. * Update multires_del_higher() to call the new function multires_grid_paint_mask_downsample(), which allocates a lower-resolution paint mask grid and copies values over from the high-resolution grid.
2012-05-11Replace hardcoded DMGridData structure with CCGElem/CCGKey.Nicholas Bishop
* Changes to DerivedMesh interface: DMGridData has been removed, getGridData() now returns an array of CCGElem pointers. Also added getGridKey() to initialize a CCGKey (implemented only by CCGDerivedMesh.) * PBVH: added BLI_pbvh_get_grid_key(). * A lot of code is affected, but mainly is just replacing DMGridData.co, DMGridData.no, and sizeof(DMGridData) with the CCG_*_elem functions, removing the reliance on grid elements of exactly six floats.
2012-05-11Code cleanup for parameters of subsurf_make_derived_from_derived.Nicholas Bishop
This is the first commit of the sculpt masking merge. Documentation: http://wiki.blender.org/index.php/User:Nicholasbishop/PaintMasks Thanks to Brecht for reviewing! Replaced four boolean parameters with a single flag and a new enum, SubsurfFlags.
2012-04-22style cleanup: commentsCampbell Barton
2012-03-17Reduce poly map memory usage (used by sculpt smooth brush.)Nicholas Bishop
Changed the create_vert_poly_map function to return a more compact structure. Memory saved will vary depending on the mesh, but typically it should be about one third of the old size.
2012-03-14Copy hidden flag to vertices when applying multires modifier.Nicholas Bishop
2012-03-14Skip hidden elements in PBVH iterator, raycast, and drawing.Nicholas Bishop
2012-03-14Add DerivedMesh.gridHidden and CCGDM implementation.Nicholas Bishop
2012-03-14Add new CCG accessor functions.Nicholas Bishop
ccg_gridsize() converts a level into gridsize, ccg_factor() is for converting coordinates between different multires levels.
2012-03-13Code cleanup: replace multires update function pointer with direct call.Nicholas Bishop
Renamed the multiresModifier_update() function to multires_modifier_update_mdisps() and made it visible to subsurf_ccg.c so it can be called directly. No functional change, just a bit simpler.
2012-03-06Draw individual face's material and shading correctly in the PBVH.Nicholas Bishop
Previously, the shading and material was set once per PBVHNode when drawing. This is still the case, but PBVHNodes are now built to contain only one material and shading mode. This is done with an extra partitioning step; once the number of primitives in the node falls below the PBVH leaf limit, it's primitives are checked for matching materials. If more than one material or shading mode is present in the node, it is split and partitioned (partitioned by material rather than 3D location.) Given a sufficiently 'annoying' input, like a dense mesh with thousands of materials randomly scattered across it, this could greatly increase PBVH build time (since nodes might end up containing a single primitive), but in general this shouldn't come up. In order to support materials for grids, the CCGDM is building another grid array (of DMFaceMat structs). This could be used to replace CCGDM.faceFlag for some small memory savings (TODO).
2012-03-06Bugfix and code cleanup: use better types for faceFlags in CCGDM.Nicholas Bishop
Previously this was just a character array that stored face/poly flags and mat_nr. Since mat_nr should be a short, this would have truncated for higher values. Replaced with a new DMFaceFlags struct.
2012-02-26Style cleanup: remove underscore prefix from CCG struct names.Nicholas Bishop
2012-02-20- remove some unused editmesh functions.Campbell Barton
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
2012-02-18svn merge ^/trunk/blender -r44189:44204Campbell Barton
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-05add function for getting a polygon map: dm->getPolyMap(ob, dm).Campbell Barton
polygon version of dm->getFaceMap(ob, dm) sculpt uses this for checking connectivity.
2011-10-24svn merge ^/trunk/blender -r41226:41227 .Campbell Barton
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-10-14svn merge ^/trunk/blender -r40890:40950Campbell Barton
2011-10-10header cleanup (no functional changes)Campbell Barton
2011-05-20svn merge -r36725:36801 https://svn.blender.org/svnroot/bf-blender/trunk/blenderCampbell Barton
2011-05-19Fix crash when accessing mesh from python while a mesh with a subsurf modifierBrecht Van Lommel
is in editmode.
2011-02-27merge with/from trunk at r35190Joseph Eagar
2011-02-18doxygen: blenkernel under core as module.Nathan Letwory
2011-01-31Todo issue: sculpting on deformed meshSergey Sharybin
Used a crazyspace approach (like in edit mode), but only modifiers with deformMatricies are allowed atm (currently shapekeys and armature modifiers only). All the rest modifiers had an warning message that they aren't applied because of sculpt mode. Deformation of multires is also unsupported. With all this restictions users will always see the actual "layer" (or maybe mesh state would be more correct word) they are sculpting on. Internal changes: - All modifiers could have deformMatricies callback (the same as deformMatriciesEM but for non-edit mode usage) - Added function to build crazyspace for sculpting (sculpt_get_deform_matrices), but it could be generalized for usage in other painting modes (particle edit mode, i.e) Todo: - Implement crazyspace correction to support all kinds of deformation modifiers - Maybe deformation of multires isn't so difficult? - And maybe we could avoid extra bad-level-stub for ED_sculpt_modifiers_changed without code duplicating?
2010-07-19part 1 of merge from trunk at r30358; it compiles, but doesn't link quite yet :)Joseph Eagar
2010-06-02Sculpt & modifiers: patch by Sergey Sharybin, with modifications by me.Brecht Van Lommel
Fixes various crashes and redraw problems, most noticeable new feature is that you can now sculpt on a multires mesh with deforming modifiers preceding it. I've left out support for sculpting on multires with enabled modifiers following it, in this case only the base mesh can be sculpted now. The code changes needed to do this are just too ugly in my opinion, would need a more torough redesign which I don't think we should try now. In my opinion this is also not really an important case, since it's going to be incredibly slow anyway to run a modifier on a high res mesh while sculpting. So, to summarize current state: * Fastest sculpting: base mesh with no modifiers or multires with only modifiers preceding it. * Slower sculpting: base mesh with modifiers, depends on the speed of the modifiers. * Not supported: multires mesh with modifiers following it.
2010-04-12- use more inline math funcitons where possibleCampbell Barton
- swapped in less verbose math functons - modifier include cleanup
2010-03-22Sculpt Mode Bugfixes:Brecht Van Lommel
* #20833: layer brush doesn't work with multires. * #20946: sculpt mode partially removes parts of the mesh in the viewport. * #20420: grab brush stops after moving some distance. * #20906: sculpt grab tool moves in wrong direction. * #21132 and #21272: undo on object with subdivision surface modifier crashes. * #21115: subsurf + multires + sculpting + undo causes crash. * #20683: sculpt + multires apply + undo crash. * #19094: wrong outline in solid mode.
2010-03-22spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)Campbell Barton
2010-03-09merge with trunk at r27259 and commit of a patch by anthony jones to fix ↵Joseph Eagar
msvc (though further work may be needed because changes made by the merge
2010-02-12correct fsf addressCampbell Barton
2010-01-06Merge with trunk/2.5 at r25563Joseph Eagar
Most likely will not compile for others, I'd appreciate any build errors and missing files reports (I can never seem to get everything committed and all the build systems working without help). Porting over the sculpt/multires tools was a breeze, thanks goes to brecht for a design that didn't exclude ngons and was easy to port. Note that I've not tested externally-backed multires file support yet. Also, I still need to write version patch code for some cases. Some notes: * Like trunk, topological changes don't update multires right, so e.g. subdivide will duplicate multires data on the new faces, instead of subdividing it. * If you set the debug value (ctrl-alt-d) to 1 it'll turn on my experiments in speeding up sculpting on higher-res multires meshes (but note it makes partial redraw not completely accurate). * There's a bug where you have to go through editmode to get out of sculpt mode, not sure if I inherited or created this myself.
2009-12-03Sculpt Branch:Brecht Van Lommel
* Multithread parts of multires and subsurf. Only loops working on face grid data and do no memory allocation have been multithreaded, others would be more complicated. * Force some CCGSubsurf functions to be inlined, gives a small overall speedup in subsurf code. * Fix sculpting not working correct with transformed objects. * Fix a few cases of "spikes" on lower level multires levels. There's still cases where it happens, usually on boundary cornders. The problem is that in such cases the limit surfaces can be very different from the low res surface, so the tangent space is very different too.. * Fix crash deleting multires higher levels with level set to 0. * Fix crashes that happened sometimes when adding faces in editmode.
2009-11-25Sculpt: SubsurfBrecht Van Lommel
* Now uses the CCG DerivedMesh also in object mode, used to be edit mode only. * Create CD_ORIGINDEX layer on demand, to save memory. * Removed ss_to_cdderivedmesh function, and instead create ccgdm and then convert that to cddm, to avoid code duplication. * Added and implement DerivedMesh interface functions to obtain face grids. * Store edge/face flags more memory efficient. * Export CCGDerivedMesh struct in BKE_subsurf.h