Age | Commit message (Collapse) | Author |
|
|
|
|
|
- Remove 'rotate_m2', unlike 'rotate_m4' it created a new matrix
duplicating 'angle_to_mat2' - now used instead.
(better avoid matching functions having different behavior).
- Add 'axis_angle_to_mat4_single',
convenience wrapper for 'axis_angle_to_mat3_single'.
- Replace 'unit_m4(), rotate_m4()' with a single call to 'axis_angle_to_mat4_single'.
|
|
This should make it easier to sculpt in high resolutions, downside is that the new way to calculate maximum edge length is a bit less intuitive. Maximum edge length used to be calculated as blender_unit * percentage_value, now it's blender_unit / value.
Reused old DNA struct member, but had to bump subversion to ensure correct compatibility conversion. Also changed default value slightly (would have had to set to 3.333... otherwise).
Was Requested by @monio (see https://rightclickselect.com/p/sculpting/zpbbbc/dyntopo-better-scale-input-in-constant-detail-mode) and I think it's worth testing.
|
|
|
|
|
|
Auto-enabling dyntopo w/ mode switching leaked memory when undo was used.
|
|
This can be used to re-allocate bmesh data with/without tool flags.
Needed for Symmetrize since it uses bmesh operators from dyntopo.
|
|
|
|
When no triangulation runs we can skip re-calculating normals.
|
|
|
|
Saves 8 bytes per vert/edge/face.
Gives overall ~20-25% memory saving for dyntopo sculpting
and modifiers that use BMesh.
|
|
|
|
Now CD_SHAPEKEY_INDEX customdata is stored in edit-mode when hooks and vertex parents are used.
This also fixes a bug where undo would loose key-index data.
Move to structs for BM_mesh_bm_to/from_me to avoid passing many argument, which mostly aren't used.
|
|
Having to change this with the slider each time isn't so convenient
and invert in this case does nothing.
|
|
|
|
Previously the grab brush could only move ourwards when normal aligned.
|
|
This is an attempt to solve the issue by doing clip test on the original
side of the stroke. Some extra testing is required.
|
|
|
|
Basically, the 'fake undo' restoring orig coordinates in this case cannot work with dyntopo,
since it assumes nothing was added/removed.
For now, just prevent this 'restoration' when dyntopo is used, this is no ideal solution
from user PoV - but it's better than plain ugly crash!
Complete solution seems much more involved and outside of scope of bug handling, added a TODO note:
http://wiki.blender.org/index.php/Dev:Source/Development/Todo/Tools#Sculpting
|
|
Snake-hook tended to loose volume along the stroke,
now with pinch > 0.5 its possible to sculpt shapes without loosing volume.
|
|
This allows for dragging out shapes that rotate to follow the cursor motion.
Values over 1 can be set for 'interesting' artistic effects.
|
|
|
|
|
|
|
|
Based on usages so far:
- Split callback worker func in two, 'basic' and 'extended' versions. The former goes back
to the simplest verion, while the later keeps the 'userdata_chunk', and gets the thread_id too.
- Add use_threading to simple BLI_task_parallel_range(), turns out we need this pretty much systematically,
and allows to get rid of most usages of BLI_task_parallel_range_ex().
- Now BLI_task_parallel_range() expects 'basic' version of callback, while BLI_task_parallel_range_ex()
expectes 'extended' version of the callback.
All in all, this should make common usage of BLI_task_parallel_range simpler (less verbose), and add
access to advanced callback to thread id, which is mandatory in some (future) cases.
|
|
|
|
The remaining bits in editors' sculpt.c, which is now free from OMP.
All in all, changes in this file allow from below 2% to above %20 speedup per stroke, depending
on brush complexity, size, and definition of the mesh below it...
Note that this commit also unifies all 'threaded data' into a single struct, a few more
floats/pointers do not hurt here, and it makes code a bit simpler.
|
|
|
|
This time, all tools' code itself.
Not much to say, except that we can also get rid of that OMP caching pre-process ugly stuff
for multires smoothing.
Together with previous commit, we have about 5% average speedup on stroke execution
(though this vary a lot, up to 30% speedup in rare cases, and in even rarer cases some
odd massive slowdowns...).
Tech note: we may want to add 'guided'-similar feature to our BLI_task threaded loop,
I suspect this could explain random massive slowdowns of new code (very rare, but annoying...).
|
|
This gives usual nice boost in parallelized sections themselves, on global sculpting stroke
it's a bit hard to say, seems like we have an average 5% speedup, but it varies a lot...
Note that this area is only parallelized when you have a big brush over dense geometry, otherwise
there's no change at all.
As a side note, this commit also factorizes code here, three times nearly the same code, tst...
|
|
This fixes two issues:
* Normals were not being recalculated correctly when not using optimized
drawing for CDDerivedMesh (Multires actually handles that correctly).
* Loop normals (autosmooth option) were also not being calculated. Doing
this calculation is not desirable, since it can't be done correctly
without a severe performance hit. This is easy to test by doing a
dependency flush on the mesh after each scuplt stroke step. Instead they
are now disabled during sculpting.
|
|
Causes fewer degenerate quads.
|
|
Caused a crash in dyntopo.
|
|
|
|
|
|
painting.
Also system added a brush every time it found no paint brush in the
system which is not what we would want.
Solution:
* Brush panel stays visible always, regardless of whether there is a
brush or not.
* We search for first available brush when we find no brush in paint
struct instead of always generating a new one.
* Generating and searching for a brush take a mode argument now. Needed
some refactoring to users of BKE_paint_init as well.
* Did some style cleanups for paint mode enums.
Patch is big but it's mostly argument refactoring.
|
|
- 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`.
|
|
We check against loop data now, not tessface data
|
|
Patch by Tilman Blumhagen, thanks!
|
|
plane.
Make sure sculpt plane is recalculated for every tiled dab.
Note this is not the optimum thing to do, we could cache the original
sculpt plane and reuse that, but this would require us to rearrange the
logic of tiled sculpting somewhat. This can be a TODO, but for now this
will fix the issue.
|
|
|
|
We need to generate strokes up to a brush radius around the bounding
box.
|
|
Adds 3D-Tiling options to the sculpt tool. This is very similar to the
symmetry options in the sense that it replicates the strokes. For tiling
this replication happens with a linear offset to fill the whole object
along one or more axis.
This allows to create geometry that can be tiled seamless. One use case
is the creation of tileable textures by sculpting high resolution
geometry and then rendering it with an orthographic camera to create
maps for diffuse, normal, etc
Notes:
Patch by Tilman Blumhagen with minor changes (move tile flags to paint
symmetry flags).
After some feedback from artists, leaving tiling value to constant
offset, though I suspect that some method that uses the object
bounding box dynamically might be good to have too. It can
be added later though :)
Thanks a lot for the patch!
Patch: D1426
|
|
|
|
Since many callers only need a single triangle
|
|
|
|
|
|
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.
|
|
Also add depsgraph & physics
|