Age | Commit message (Collapse) | Author |
|
|
|
- Use smooth normals to displace in Above Surface mode.
- Add an option to align an axis to the normal in the constraint.
I've seen people request the alignment feature, and it seems useful.
For the actual aligning I use the damped track logic.
In order to conveniently keep mesh data needed for normal
computation together, a new data structure is introduced.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D3762
|
|
Allow raycasting in two directions and culling front or back faces.
Also implement a new Invert Cull option in both constraint and
modifier that can be used to aim for faces aligned with the project
axis direction when raycasting both ways.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D3737
|
|
In addition to the original map to surface and Keep Above Surface,
add modes that only affect vertices that are inside or outside
the object. This is inspired by the Limit Distance constraint,
and can be useful for crude collision detection in rigs.
The inside/outside test works based on face normals and may not be
completely reliable near 90 degree or sharper angles in the target.
Reviewers: campbellbarton, mont29
Differential Revision: https://developer.blender.org/D3717
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
|
|
Still nbice to avoid such access to keep valgrind output more sane.
|
|
|
|
|
|
|
|
Modifiers stack only get COW/evaluated IDs, so no need to go auery again
DEG for those. Further more, now unified handling of EditBMesh case (was
done on case-by-case basis in a few modifiers, not all for some reason).
We are still missing the ability to get final and cage deformed meshes
when in Edit mode though, this is to be defined/implemented in depsgraph.
|
|
This fix applying the following modifiers:
* Boolean (working already)
* Array
* Mesh Deform
* Surface Deform
* Vertex Weight Proximity
This function was to return evaluated mesh. So it should get the evaluated
object at all times. So in this case it makes more sense to simply pass the
depsgraph (or in this case the ModifierEvalContext that contains both the
depsgraph and the flag.
Solution discussed with Bastien Montagne.
|
|
Now only subsurf still needs some DM...
|
|
Partial only, complete depends on BVHTree helper updates, and subsurf
updates.
|
|
bvhtree_from_mesh_get`.
The value of epsilon was never used to create this bvhtree because whenever we activate this constraint, a bvhtree with parameter epsilon 0.0 was created and cached.
|
|
|
|
This will allow greater control of the bvhtrees that are obtained, and helps identify problems.
It is also an additional step to unify the functions.
|
|
identifier type.
Reviewed By: @campbellbarton
Differential Revision: https://developer.blender.org/D3192
|
|
|
|
Those pointers are never to be aliased, so let's be explicit about this and hope
compiler does save some CPU ticks.
|
|
Now all the fine-tuning is happening using parallel range settings structure,
which avoid passing long lists of arguments, allows extend fine-tuning further,
avoid having lots of various functions which basically does the same thing.
|
|
Wrap all arguments into TLS type of argument. Avoids some branching and also
makes it easier to extend things in the future.
|
|
Shrinkwrap must check it does have valid target data.
Safe for 2.79 release.
|
|
object_get_derived_final shouldn't have been assuming mesh objects.
It's even valid to use a curve as a target for a shrink-wrap modifier.
|
|
|
|
a non-mesh target, you can still circumvent this... Causing Crash
|
|
0b5a0d84 caused regression since edit-mesh BVH wasn't cached,
each shrink-wrap modifier created its own BVH.
|
|
Error in 0b5a0d84
|
|
Gives little to no speedup (a few percents at best).
|
|
Separate the creation of trees from EditMesh from the creation of trees from DerivedMesh.
This was meant to simplify the API, but didn't work out so well.
`bvhtree_from_mesh_*` actually is working as `bvhtree_from_derivedmesh_*`.
This is inconsistent with the trees created from EditMesh. Since for create them does not use the DerivedMesh.
In such cases the dm is being used only to cache the tree in the struct DerivedMesh. What is immediately released once
bvhtree is being used in functions that change(tag) the DM cleaning the cache.
- Use a filter function so users of SnapObjectContext can define how edit-mesh elements are handled.
- Remove em_evil.
- bvhtree of EditMesh is now really cached in the snap functions.
- Code becomes organized and easier to maintain.
This is an important patch for future improvements in snapping functions.
|
|
|
|
D1839 from @Orgold
|
|
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).
|
|
Own regression caused by fix for T46067,
edit-mode bvh only contained unselected faces.
This commit adds support for an edit-mode bvh containing all faces.
|
|
Note that allocating DM arrays from an editmesh is currently not threadsafe,
however even if were resolved, its more efficient to avoid having to do it in the first place.
|
|
|
|
|
|
|
|
|
|
Note this func needs some love, but this will be for later (should never have been in shrinkwrap code!).
|
|
meshes with shaped keys
Same issue as revious one -- need to start OMP threads only
when there's enough data to crunch.
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
|
|
|
|
|
|
|
|
Summary:
Made objects update happening from multiple threads. It is a task-based
scheduling system which uses current dependency graph for spawning new
tasks. This means threading happens on object level, but the system is
flexible enough for higher granularity.
Technical details:
- Uses task scheduler which was recently committed to trunk
(that one which Brecht ported from Cycles).
- Added two utility functions to dependency graph:
* DAG_threaded_update_begin, which is called to initialize threaded
objects update. It will also schedule root DAG node to the queue,
hence starting evaluation process.
Initialization will calculate how much parents are to be evaluation
before current DAG node can be scheduled. This value is used by task
threads for faster detecting which nodes might be scheduled.
* DAG_threaded_update_handle_node_updated which is called from task
thread function when node was fully handled.
This function decreases num_pending_parents of node children and
schedules children with zero valency.
As it might have become clear, task thread receives DAG nodes and
decides which callback to call for it.
Currently only BKE_object_handle_update is called for object nodes.
In the future it'll call node->callback() from Ali's new DAG.
- This required adding some workarounds to the render pipeline.
Mainly to stop using get_object_dm() from modifiers' apply callback.
Such a call was only a workaround for dependency graph glitch when
rendering scene with, say, boolean modifiers before displaying
this scene.
Such change moves workaround from one place to another, so overall
hackentropy remains the same.
- Added paradigm of EvaluaitonContext. Currently it's more like just a
more reliable replacement for G.is_rendering which fails in some
circumstances.
Future idea of this context is to also store all the local data needed
for objects evaluation such as local time, Copy-on-Write data and so.
There're two types of EvaluationContext:
* Context used for viewport updated and owned by Main. In the future
this context might be easily moved to Window or Screen to allo
per-window/per-screen local time.
* Context used by render engines to evaluate objects for render purposes.
Render engine is an owner of this context.
This context is passed to all object update routines.
Reviewers: brecht, campbellbarton
Reviewed By: brecht
CC: lukastoenne
Differential Revision: https://developer.blender.org/D94
|