Age | Commit message (Collapse) | Author |
|
|
|
Depth buffer values are used by the viewport pan and zoom code to
adjust response scaling factors between mouse and viewport movement.
Letting smoke write to the buffer confuses it and causes the camera
to get stuck and move very slowly inside smoke domains, because it
thinks it is very close to an object.
|
|
This is a good point to change this as grease-pencil-v2 branch was just merged, so I hope merge conflicts with other branches are minimal.
|
|
Now all consistent and using term "properties region" instead of "properties panel". Ideally we had a more generic operator for all those.
Fixes T49006.
|
|
Improve current Grease Pencil in order to get a better 2D animation tool.
More info in WIKI pages: https://wiki.blender.org/index.php/User:Antoniov
Reviewed By: Severin, aligorith, campbellbarton
Patch by @antoniov, with edits by @Severin.
Differential Revision: https://developer.blender.org/D2115
|
|
Ignore that lights are not included in local view, always render them if they are on the correct layers. BI and Cycles do this as well.
|
|
This info is shown while dragging, so should stay where it was.
|
|
Enabled the Undo option for the operation "Add background Image". This is to treat adding a background image like opening an image. This behavior is useful when a background image is add using 'drag and drop'.
Reviewers: Severin
Reviewed By: Severin
Subscribers: brecht
Tags: #bf_blender
Maniphest Tasks: T47050
Differential Revision: https://developer.blender.org/D1725
|
|
The redundant terms were harmless but check an expression we already
know to be true (from earlier in the same conditional).
Found by PVS-Studio T48917
|
|
Didn't know slink->regionbase is removed when area is active. Don't see why this is done, but it's confusing :S
|
|
Happens because it was always using regionbase of active/visible area, not the correct one of the (possibly inactive) 3D view. Was pretty hidden because you had to be in local view to trigger it.
Could also remove ScrArea * argument from SpaceType.id_remap now, but leaving in there to avoid bigger changes (might also be useful for some case).
Steps to reproduce:
* Default startup.blend
* Enter local view with default cube (/-key)
* Render (or open a different editor where the 3D View is)
* Close Blender - should invoke crash
|
|
|
|
|
|
effects.
These things will now be possible using nodes.
|
|
|
|
The depsgraph now invalidates the strand shader when the nodes are changed.
As mentioned in the previous commit, this happens through an operation in
the object GEOMETRY component for each strand modifier. This is messy, only
useful until we have truly granular modifier integration in the depsgraph.
Invalidating the shader is currently done just by setting a flag. The actual
freeing and subsequent lazy-rebuild of the shader is done in the drawing
thread, because during the threaded depsgraph update we don't have a valid
OpenGL context. This needs to be sorted out for future viewport recode.
|
|
|
|
This is just a stub atm. The BVM system will use nodes to generate
a GLSL function, which can then be inserted into and compiled with
a framework shader. The deformation function itself is just a simple
expression (with autodiff for tangents), so it doesn't need to know
about the topology of index buffers and the like.
|
|
function.
This makes it easier to run preparation code outside the gpu module conditionally.
|
|
|
|
The debug shader shares most code with the regular shader. It uses a
geometry shader pass to create extra vector lines.
|
|
data.
This moves most of the data access logic for this data out of the GPU code and into
the respective BKE files. The concept is similar to how DerivedMesh is used in other
GPU code.
|
|
The two variants for object and edit mode are the same, except for
setting the edit data in the parameters.
|
|
The only real missing feature from this code is drawing points and
selection state, which can be reimplemented quite easily.
|
|
Currently lines and ribbons (triangle strips) are supported.
The ribbon width can be controlled with a parameter. Ribbons are
oriented toward the camera, similar to billboards, but shaded like lines
with the Kajiya shader imitating a reflective tube.
|
|
|
|
|
|
D1963 by @wisaac, re-worked to de-duplicate logic
|
|
|
|
NULL.
The NULL buffer pointer is expected, just needs a sanity check.
|
|
|
|
|
|
|
|
The snapping functions when performed in the perspective view,
have some problems in the threshold (a distortion) and in the clip plane (the normal is incorrect).
These problems can be only observed when making the snap to edges or to vertices (nearest to ray function).
This patch propose a totally different solution.
The idea is to project the edges of bvh nodes and test the 2d projection of the snap element.
For this it used the BLI_bvhtree_walk_dfs function.
It is important to pay particular attention also to the changes in `ED_transform_snap_object_project_view3d_ex`
|
|
D1875 by @lichtwerk
|
|
shader.
Geometry shaders easily become performance bottlenecks, for in-depth explanation see e.g.
http://gamedev.stackexchange.com/a/48434
http://rastergrid.com/blog/2010/09/history-of-hardware-tessellation/
The geometry shader was used so far for generating the fiber geometry (line strips)
from just the root vertices. Without a geometry shader every vertex has to be put into
a buffer and uploaded to the GPU (we could use a tesselation shader to cut down on size,
but that remains to be decided later if OpenGL 4.x is available).
To limit the size of this vertex buffer, the vertices contain only minimal necessary
information: an index for the fiber curve, and an interpolation curve parammeter in [0.0, 1.0].
The locations of vertices are interpolated in the vertex shader using texture lookups.
A range of textures encode all the necessary per-fiber attributes, in particular the
interpolation indices and weights wrt. control curves. These control curves are stored in
yet another texture (as is the case with the geometry shader too).
Initial performance seems to improve drastically without the geometry shader.
|
|
the shader.
These features will ultimately be implemented through nodes, but they are quite useful
for testing the shading itself and the performance.
|
|
Available choices are the "classic" particle shading (bogus, but useful
for comparison), Kajiya, and Marschner. The Marschner model is not yet
implemented.
|
|
|
|
|
|
Control strands are now drawn without subdivision. Control and fiber
strands get their own vertex buffers for this purpose.
The intermediate StrandData has been removed, because it is just
redundant storage of the draw data buffers. The results in StrandData
are not used for further editing, so there is really no point in
keeping them around.
|
|
|
|
|
|
The strand system contains 2 levels of curve geometry:
- "Strands" are the abstract control strands, editable by the user and thus few in number.
- "Fibers" are renderable curves, generated based on those strands.
"Roots" now is used exclusively for hair follicles, which are attached to
the scalp mesh, i.e. follow the mesh deformation.
|
|
|
|
Idea is to replace hard-to-track (id->lib != NULL) 'is linked datablock' check everywhere in Blender
by a macro doing the same thing. This will allow to easily spot those checks in future, and more importantly,
to easily change it (see work done in asset-engine branch).
Note: did not touch to readfile.c, since there most of the time 'id->lib' check actually concerns the pointer,
and not a check whether ID is linked or not. Will have a closer look at it later.
Reviewers: campbellbarton, brecht, sergey
Differential Revision: https://developer.blender.org/D2082
|
|
Now the object mode and edit mode for strands use the same drawing code.
Derived render strands are not yet supported (they may need re-scattering
during editing) and the tool settings have no effect yet.
|
|
|
|
Differential Revision: https://developer.blender.org/D712
|
|
|