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
2013-03-20code cleanup: use booleans for mesh and selection code.Campbell Barton
2012-11-09style cleanup: indentationCampbell Barton
2012-10-09code cleanup: make header defines more consistent, JOYSENSOR header guard ↵Campbell Barton
had a typo too.
2012-06-25Fixes for modifier data in multi-user meshes.Nicholas Bishop
When removing a skin or multires modifier, it skips deletion of the associated CustomData layer if the object has any other modifiers of that type. This check has been extended to all objects that use the object's data. Similarly, deleting higher multires levels and multires subdivision will not update the maximum level of any other multires modifiers on objects that link to the same mesh. Note that modifier_apply_obdata() doesn't need any changes as it does not allow applying to multi-user data. Object joining has also been modified to synchronize multires levels objects that share a mesh. This is needed because joining can subdivide or delete levels in order to match the maximum level of the join-from object to the join-to object. Fixes bug [#31880] instance multiresolution modifier error. http://projects.blender.org/tracker/index.php?func=detail&aid=31880&group_id=9&atid=498 Reviewed by Sergey: http://codereview.appspot.com/6332047/
2012-05-11style cleanup: mainly sculpt/whitespaceCampbell Barton
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-11Code cleanup for multires_dm_create_from_derived().Nicholas Bishop
Changed name to multires_make_derived_from_derived() and parameter order to be more similar to subsurf_make_derived_from_derived(). Added MultiresFlags enum with flag values to replace the local_mmd and useRenderParams parameters.
2012-04-16Port multires_topology_changed to new bmesh apiSergey Sharybin
This call is still needed when loading editmesh because some operations are not creating CD layer for new loops (like crating new face) and to prevent loosing all sculpted data when running disps correct displacement maps should be allocated on loading edit mesh.
2012-03-19Add a multires function to delete MDisps.Nicholas Bishop
The code was duplicated in various places, replaced with calls to a new function, multires_customdata_delete().
2012-03-15Remove unused parameter from multires_dm_create_from_derived.Nicholas Bishop
2012-03-14Skip hidden elements in PBVH iterator, raycast, and drawing.Nicholas Bishop
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-08building without python works again, cleanup bmesh include paths (cmake and ↵Campbell Barton
scons).
2012-02-21Remove unused code left from old multires interpolation stuffSergey Sharybin
- Removed validate() callback for MDisps layer. It wouldn't actually work correct from CustomData layer and all needed data might be validated from BMesh interpolation level. Also this callback was never actually used in BMesh, so can't see why we'll want to have it in structures. - Removed layrInterp_mdisps callback. Interpolation now happens from another level (bmesh_interp) and this callback isn't needed anymore. - Removed all function from multires.c which were used by old interpolation stuff and seems to be useless for other usages. - multires_topology_changed is still marked as a TODO, Probably it's not needed anymore, buy better to keep for now until it'll be 100% clear this function isn't needed and all needed re-allocations happens in bmesh_interp. Otherwise, it'll be needed to be ported to new system.
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.
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-06-09svn merge -r37078:37335 https://svn.blender.org/svnroot/bf-blender/trunk/blenderCampbell Barton
2011-06-06Bake from multires meshSergey Sharybin
======================= Added option to baked named "Bake From Multires" which is avaliable for normals baking and displacement baking. If this option is enabled, then no additional hi-res meshes and render structures would be created . This saves plenty of memory and meshes with millions of faces could be successfully baked in few minutes. Baking happens from highest level against viewport subdivision level, so workflow is following: - Set viewport level to level at which texture would be applied during final rendering. - Choose Displacement/Normals baking. - Enable "Bake From Multires" option. - You're ready to bake. Displacement baker had aditional option named "Low Resolution Mesh". This option is used to set if you want texture for realtime (games) usage. Internally it does the following: - If it's disabled, displacement is calculated from subdivided viewport level, so texture looks "smooth" (it's how default baked works). - If it's enabled, dispalcement is calculated against unsubdivided viewport levels. This leads to "scales". This isn;t useful for offline renders much, but very useful for creating game textures. Special thanks to Morten Mikkelsen (aka sparky) for all mathematics and other work he've done fr this patch!
2011-03-29=bmesh=Joseph Eagar
Multires interpolation is considerably better now, though it still has a problem with occasionally producing little random tangent spikes. Still, it's far better then it was. Also fixed a bug in dissolve faces.
2011-02-18doxygen: blenkernel under core as module.Nathan Letwory
2011-02-12access past array bounds in layerInterp_mdisps, also make some vars const.Campbell Barton
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?
2011-01-30Total displacement levels should be set in multires_topology_changedSergey Sharybin
2011-01-08Fix for bug [#21534] Multires modifier strange deformationsNicholas Bishop
This adds the "Apply Base" feature from my gsoc2010 branch. Apply Base partially applies the modifier, in that the mesh is reshaped to more closely match the deformed mesh. The upper-level displacements are recalculated so that the highest multires level appears unchanged. Multires does not currently deal well with too large displacements. An easy-to-reproduce example: create any mesh type, add multires, subdivide a few times, then use the sculpt grab brush to drag the entire mesh over a few units. At the highest level, and at level 0, the mesh looks fine, but all of the intervening levels will have ugly spikes on them. This patch doesn't help with situations where you can't modify the base mesh, but otherwise works around the problem fairly well (albeit with a heuristic, not an exact solution.)
2011-01-02Splitting quad into triangles and merging triangles into quad shouldSergey Sharybin
work correct with sculpting data now. Joining two triangles could give incorrect sculpting result for special topologies, but it's that case that can't be nicely handled with our layers architecture.
2011-01-02Multires math function used for layer interpolation moved from customdata.c ↵Sergey Sharybin
to multires.c No functional changes
2010-12-14Initial implementation of mdisps layer interpolationSergey Sharybin
Sculpt data shouldn't be lost when making topology changes without quads<->tris face converison. General idea: - Go through all grid points of each corner and convert per-corner coordiante to per-face cooredinate - Apply weights and convert new point to per-corner coordinate - Use bilinear interpolation to get needed displacement vector Some additional work was necessery: - Two neighbour corners could have different displacements along common boundary. multires_mdisp_smooth_bounds() makes displacement "symmetrical" - Point could change it's corner, so displacement vector should be flipped in some way. In some cases it's not only flipping, because corner could be mapped with some rotation. It's not solved for triangular faces yet, so only z-axis displacement would be interpolated for tris. More limitations: - Interpolation will give incorrect result after quad<->triangle face conversion. - When face normal was fillped displacement would change it's direction too.
2010-11-10Removed unused code from multires moduleSergey Sharybin
2010-11-04Fix #24388: multires base meshSergey Sharybin
- MDisp should be re-allocated if face changed amount of vertices - Allocate disps array in layerSwap_mdisps to prevent loosing all highres data
2010-10-25Fix #24255: Multires object gets modified when joining it to another ↵Sergey Sharybin
multires object. Fix #22018: joining objects with different multires levels loses levesl from the higher multires object - Synchronyze mulires subdivision level when joining objects - Apply scale on MDISP layer when applying scale - Re-calculate MDISP when joining scaled objects
2010-09-09== Multires ==Nicholas Bishop
Fixed bug #23657, "Modifiers dosen't work when you select diffrent mesh for object" Multires modifier now adds empty mdisps if they're missing, rather than displaying a warning Switching an object's mesh will now check for a multires modifier; if found the modifier's total number of levels are reset to match the mesh's mdisps Switching the mesh also forces a multires update so that sculpted changes aren't lost
2010-07-05Fix #22213: applying deform modifier in front of multires modifier crashes,Brecht Van Lommel
should not do multires reshape in this case, but just regular apply.
2010-06-06- Added checking if modifier is active in find_multires_modifierSergey Sharybin
- Pass MultiresModifierData to reshape functions
2010-06-01Fix #22239: external btx won't load.Brecht Van Lommel
2010-05-21Removed unused argument mmd from multires reshape functions.Sergey Sharybin
2010-04-13Todo #21831: Deform modifier is applied to base mesh instead ofSergey Sharybin
multires modifier if both are in the stack (patch #21965) This patch also removes limitation of multires reshaping when destination object has got modifiers after multires modifier.
2010-02-12correct fsf addressCampbell Barton
2010-02-07Fix #20928: difference boolean modifier is not applied during rendering,Brecht Van Lommel
fixed by last depsgraph commit and this extra check to avoid unnecessary free of derivedmesh for sculpt/multires.
2009-12-10Sculpt Branch:Brecht Van Lommel
* Multires 2.50 -> Branch compatibility code converting to the new displacement format. 2.49 -> 2.50 is not functional yet.
2009-12-09Sculpt Branch:Brecht Van Lommel
* Smooth brush works again for multires. * Optimal Display option for multires modifier, same as subsurf.
2009-11-25Sculpt: MultiresBrecht Van Lommel
* Displacement coordinates are now stored differently, as a grid per face corner. This means there is duplication of coordinates, especially at low subdivision levels, but the simpler implementation justifies it I think. * ToDo: conversion of existing multires files (2.4x or 2.5x), loading them may even crash now. * Editmode preservation/interpolation code also has not been updated yet. * Multires now works on the CCGDerivedMesh grids instead of CDDerivedMesh, which should be more memory efficient. * There are still bad memory peaks (if you're using 32bit) when subdividing or propagating displacements. Though at least there should be no huge memory blocks allocated, which windows is now to have trouble with. * Still found some weird spike artifacts at lower multires levels, some also happening before this commit. Perhaps computation of tangents needs to be tweaked more. * Multires modifier now has viewport, sculpt and render levels. Also the levels have been made consistent with subsurf, previously the same level of subdivision was one less for multires. * Both multires and subsurf modifier now can have their subdivision level set to 0 for no subdivision.
2009-08-212.5/Multires:Nicholas Bishop
* Fixed multires subdivision of a sculpted object. Accidentally broke this when I fixed removing a multires modifier.
2009-08-202.5 Multires:Nicholas Bishop
* Fixed a memory corruption bug when deleting a multiresmodifier, was hanging on to a bad pointer. Reported on IRC by lusque
2009-06-07Multires/2.5:Nicholas Bishop
Attempt to make multires updating a little cleaner by assuming that no update needs to be performed, and only doing the update when the modified flag is set (either by sculpting or using some other tool that needs an update.)
2009-05-23Multires/2.5:Nicholas Bishop
Added subdivide operator and button for multires. Since this seems to be the only modifier with an operator defined, I'm not sure if I put it in a good place or not, someone can check on this?
2009-01-22Brought back sculpt smooth brush. Also added a new brush flag for setting ↵Nicholas Bishop
whether to use brush spacing.
2009-01-06Got rid of old multires code, brought in multires modifier from Nicholas Bishop
soc-2008-nicholasbishop branch. Note: any old code with multires_test() or multires_level1_test() can just be deleted, not needed by the multires modifier.
2009-01-042.5Ton Roosendaal
Think global, act local! The old favorite G.scene gone! Man... that took almost 2 days. Also removed G.curscreen and G.edbo. Not everything could get solved; here's some notes. - modifiers now store current scene in ModifierData. This is not meant for permanent, but it can probably stick there until we cleaned the anim system and depsgraph to cope better with timing issues. - Game engine G.scene should become an argument for staring it. Didn't solve this yet. - Texture nodes should get scene cfra, but the current implementation is too tightly wrapped to do it easily.