Age | Commit message (Collapse) | Author |
|
|
|
Scene lights are rendered when
- v3d is not available
- or shading type is other then OB_MATERIAL
- or shading type is OB_MATERIAL and use_scene_light is true
|
|
The mirror ball and diffuse ball are only rendered when overlays are
turned on and the lookdev overlay is turned on.
|
|
|
|
I think we should rename the DNA as well, and break the 0.01 files using this feature.
But I will leave this decision to Clement.
|
|
|
|
|
|
|
|
|
|
Test if all nearplane points are not in front of the shadow BBox.
|
|
If the object is manifold and the camera is in the shadow side, we can
use the depth fail method to fix the inverted shadow glitch.
Unfortunately this does not really work for non-manifold.
Implementation details:
We try to be as efficient as we can, we precompute camera near plane
projected into 2D shadow space so we can test for intersection with the
shadow boundbox easily.
As the intersection test is done in 2D it's pretty fast.
Unfortunately, this means the shadow bounds are all aligned to the same
space and are not the smallest bound we could extract.
|
|
|
|
Totally Manifold objects only require a single increment/decrement of the
stencil value. This result in less geometry generated and less overdraw.
|
|
Since this method have no failure case for manifold objects, use it.
|
|
|
|
This was no longer working since 15c2801aac33.
|
|
|
|
The implementation is pretty straightforward.
In Cycles, sampling the shapes is currently done w.r.t. area instead of solid angle.
There is a paper on solid angle sampling for disks [1], but the described algorithm is based on
simply sampling the enclosing square and rejecting samples outside of the disk, which is not exactly
great for Cycles' RNG (we'd need to setup a LCG for the repeated sampling) and for GPU divergence.
Even worse, the algorithm is only defined for disks. For ellipses, the basic idea still works, but a
way to analytically calculate the solid angle is required. This is technically possible [2], but the
calculation is extremely complex and still requires a lookup table for the Heuman Lambda function.
Therefore, I've decided to not implement that for now, we could still look into it later on.
In Eevee, the code uses the existing ltc_evaluate_disk to implement the lighting calculations.
[1]: "Solid Angle Sampling of Disk and Cylinder Lights"
[2]: "Analytical solution for the solid angle subtended at any point by an ellipse via a point source radiation vector potential"
Reviewers: sergey, brecht, fclem
Differential Revision: https://developer.blender.org/D3171
|
|
|
|
|
|
|
|
in EDIT MODE
|
|
Unmultiplied the final color during compositing. Same as the revealage
buffer would do
Also use the DRW_STATE_ADDITION_FULL as it is aware of premultiplied
colors
|
|
added a fresnel effect
TODO: solve memory leak
|
|
Option to see through all meshes (transparency)
Works for OB_SOLID and OB_TEXTURED. Does not work for
V3D_SHADING_SHADOW.
TODO: Fresnel effect
|
|
|
|
Use 'ob' prefix for objects, 'eval' suffix for evaluated data.
|
|
If a mesh is known to be manifold, then it's not necessary to increment the
stencil buffer 2 times anymore. But we still need to account properly for
degenerate triangles.
In this case, only generate a quad if the tri is facing the lamp. If there
is a degenerate loop, the other edge will either cancel the increment (if
it is also facing the light) or not produce a quad (if not facing).
This will always give the correct count.
|
|
|
|
Also add new debug visualisation.
Depth fail method is not used for the moment but has nice benefits. It will
be used efficiently in the future.
|
|
Avoid 2 matrix multiplication in the shader.
|
|
This give a very slight perf boost. (2ms gain over 67ms total in my test)
|
|
Seems that degenerate tris are somewhat widely used in modeling. So we need
to fix this. Test the edges in the geom shader since the adjacency info is
only dependant on topology, not actual vertex placement.
This fixes most of the remaining noise issues. Only a few artifacts appear
on really weird models. So if you want to get rid of the artifacts, fix
your model!
|
|
This makes the shadows ~10 times faster in the general case.
This only create extrusion geometry on the outline edges. Also we increment
or decrement the stencil buffer by 2 for each manifold edge and only by 1
for non manifold. This make the algorithm robust yet less heavy than creating
one prism for each triangles.
|
|
|
|
OVERVIEW
* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
for each. For many workflows one view layer can be used, these are more of an
advanced feature now.
OUTLINER
* The outliner now has a "View Layer" display mode instead of "Collections",
which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
text gives different results, we'll unify this later.
LINKING AND OVERRIDES
* Collections can now be linked into the scene without creating an instance,
with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
into collections with overrides directly in the scene.
PERFORMANCE
* We tried to make performance not worse than before and improve it in some
cases. The main thing that's still a bit slower is multiple scenes, we have to
change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
lookups internally and in API functions like visible_get().
VERSIONING
* Compatibility with 2.7 files should be improved due to the new visibility
controls. Of course users may not want to set up their scenes differently
now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
files. There's a few things which are know to be not quite compatible, like
nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
#ifdef so it can be removed at the end of the release cycle.
KNOWN ISSUES
* The G-key group operators in the 3D viewport were left mostly as is, they
need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
be done later, we'll have to see how important this is as all objects within
the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.
Differential Revision: https://developer.blender.org/D3383
https://code.blender.org/2018/05/collections-and-groups/
|
|
Get current frame from depsgraph, not scene.
|
|
|
|
Per collection overrides are gone now.
|
|
We handle doversion for the scene properties, but not for the
view layer overrides.
Overrides will be implemented in a different way via dynamic overrides.
For now this data is completely lost.
|
|
This means more accurate SSR with less faceted artifacts.
|
|
Patch D3205 by Kanzaki Wataru
Only implemented in Eevee for now. Collapse a closure to RGBA so we can
do NPR stuff on the resulting color.
Use an emission shader to convert the color back to a closure.
Doing this will break PBR and will kill any SSR and SSS effects the shader
the shader rely on. That said screen space refraction and ambient occlusion
are supported due to the way they are implemented.
|
|
Disabled shadows for now as the calculation of the light direction is
still to bogus.
|
|
Currently unused, but is required for an upcoming work.
|
|
This way we can see other particle systems while combing another one.
|
|
Outline is reserved for the Overlap Overlay
|
|
|
|
|
|
Constructed UV out of BMesh data layers.
|
|
|