Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
There was a bug due to non-aligned struct in the DNA that prevented us
to increase the size of the userdef light array.
Since the studio lights are now presets and stored in external files,
there is no need to keep backward compatibility with theses lights.
Remove the old array and create a new one.
Add blue tint light for specular.
|
|
|
|
This option is per viewport.
Having view space shading make sense when working on isolated objects like
if you were holding them in your hands. But for entire scene work, it is
better to have the lighting fixed to have a better spatial representation.
|
|
This changes a bit how the userprefs solid lights works. They are not
visible until enabling the "Edit Solid Light" checkbox. Once enabled the
current studiolight used for solid mode will be overwritten.
Once the lighting settings are tweaked, the user can click the
"Save as Studio light" button to save the current settings.
This makes it easy to create new lighting without messing the other
presets.
The studio lights are stored as ASCII files on the disk using a dead
simple custom format.
The UI/UX is not perfect and will be improved in other commits.
Also includes:
* Separate LookDev HDRI selection from Solid Lights
* Hide LookDev HDRIs from the Solid Lights selection list
|
|
|
|
This makes the lighting a bit more diffuse but don't produce negative
values.
Add a bias of 1.5f to make the lighting a bit more directionnal.
The implementation is based on:
https://github.com/kayru/Probulator/blob/master/Source/Probulator/SphericalHarmonics.h#L136
which is derived from:
http://www.geomerics.com/wp-content/uploads/2015/08/CEDEC_Geomerics_ReconstructingDiffuseLighting1.pdf
The shader implementation is optimized and has the same runtime cost
as previous method:
* no sh eval : 0.13ms
* prev sh eval : 0.14ms
* new sh eval : 0.22ms
* new sh eval opti : 0.14ms
|
|
* Less Lengthy enum/macro names.
* Optimize computation of Spherical Harmonics.
* Reduce radiance cubemap size a bit. Higher resolution is not necessary.
* Remove STUDIOLIGHT_LIGHT_DIRECTION_CALCULATED (was not used).
* Do windowing on each component separately instead of using luminance.
* Use ITER_PIXELS to iterate on each pixels, using pixel center coords.
* Remove gpu_matcap_3components as it is only needed when creating the gputex.
* Fix a lot of confusion in axis denomination/swizzle.
These changes should not affect functionallity.
|
|
Compile time option to reduce the level of the SH
|
|
Shadows uses the old location for light_direction. Maybe a merge
conflict.
|
|
- implemented Spherical Harmonics L2 for diffuse shading.
TODO: caching the precalculated harmonics so it won't take soo long to
open the popover
|
|
This was the last remaining problem with shadow volumes (that I know of).
Only extrude until we hit the far plane.
|
|
|
|
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.
|
|
|
|
The Studio lights are now loaded from disk. The location is
`datafiles/studiolights` they need to be JPG for now. JPG cannot store
HDRI color range but they are clamped inside the Workbench
engine for speed reason. I didn't select JP2K as it might not be
enabled.
Users can add upto 20 HDRI files. This limitation is inside the
RNA_space.c Currently the icons are calculated when you first open the
selection box for the HDRI's. We could add them to a background
rendering later.
I added 2 test files a sky texture rendered in Cycles and an HDRI from
cloud.blender.org.
|
|
|
|
|
|
|
|
|
|
|