Age | Commit message (Collapse) | Author |
|
Rather than passing around void pointers, various Blender image sources now
subclass this. OIIO is also just another type of image loader.
Also fixes T67718: Cycles viewport render crash editing point density settings
|
|
|
|
Checkbox to invert rotation angle, suggested by @simonthommes
Differential Revision: https://developer.blender.org/D6932
|
|
|
|
This node provides the ability to rotate a vector around a `center` point using either `Axis Angle` , `Single Axis` or `Euler` methods.
Reviewed By: #cycles, brecht
Differential Revision: https://developer.blender.org/D3789
|
|
* Direction mode X, Y and Z to align with axes rather than diagonal or
spherical as previously. X is the new default, existing files will
use diagonal or spherical for compatibility.
* Phase offset to offset the wave along its direction, for purposes like
animation and distortion.
https://developer.blender.org/D6382
|
|
This adds some extra functions recently added to the float Maths Node.
Not all functions have been ported over in this patch.
Also:
+ Tidy up menu
+ Change node color to match other vector nodes, this helps distinguish vector and float nodes in the tree
+ Move shared OSL functions to new header node_math.h
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6713
|
|
|
|
The code checked for the presence of more than one tile before
substituting the tile number into the filename, so if a one-tile
UDIM was used (or all but one tile were culled), the substitution
was skipped and as a result the file was not found.
With this change, the code explicitly tracks whether substitution
is required, avoiding this problem.
This also fixes another problem: The Environment texture never
does substitution since it doesn't support UDIMs, but before the
syncing code still inserted the placeholder into the filename if the
user selected a tiled background image.
|
|
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender.
With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser.
Therefore, code that is not yet aware of tiles will just access the default tile as usual.
The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9.
Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator.
The following features are supported so far:
- Automatic detection and loading of all tiles when opening the first tile (1001)
- Saving all tiles
- Adding and removing tiles
- Filling tiles with generated images
- Drawing all tiles in the Image Editor
- Viewing a tiled grid even if no image is selected
- Rendering tiled images in Eevee
- Rendering tiled images in Cycles (in SVM mode)
- Automatically skipping loading of unused tiles in Cycles
- 2D texture painting (also across tiles)
- 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders)
- Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID)
- Different resolutions between tiles
There still are some missing features that will be added later (see T72390):
- Workbench engine support
- Packing/Unpacking support
- Baking support
- Cycles OSL support
- many other Blender features that rely on images
Thanks to Brecht for the review and to all who tested the intermediate versions!
Differential Revision: https://developer.blender.org/D3509
|
|
Custom render passes are added in the Shader AOVs panel in the view layer
settings, with a name and data type. In shader nodes, an AOV Output node
is then used to output either a value or color to the pass.
Arbitrary names can be used for these passes, as long as they don't conflict
with built-in passes that are enabled. The AOV Output node can be used in both
material and world shader nodes.
Implemented by Lukas, with tweaks by Brecht.
Differential Revision: https://developer.blender.org/D4837
|
|
Modes: Linear interpolation (default), stepped linear, smoothstep and smootherstep.
This also includes an additional option for the **Clamp node** to switch between **Min Max** (default) and **Range** mode.
This was needed to allow clamping when **To Max** is less than **To Min**.
Reviewed By: JacquesLucke, brecht
Differential Revision: https://developer.blender.org/D5827
|
|
When creating shaders and using maths functions it is expected that Blender should match functions in other DCC applications, game engines and shading languages such as GLSL and OSL.
This patch adds missing functions to the Blender maths node.
Ideally, it would be nice to have these functions available to vectors too but that is not part of this patch.
This patch adds the following functions trunc, snap, wrap, compare, pingpong, sign, radians, degrees, cosh, sinh, tanh, exp, smoothmin and inversesqrt.
Sign function is based on GLSL and OSL functions and returns zero when x == 0.
Differential Revision: https://developer.blender.org/D5957
|
|
When using OpenCL with Cycles the rendering time increased substantial.
After doing some tests the bottleneck was found in 4d voronoi and 2d and
3d smooth voronoi.
This change will hide these behind a specific compile directive so the
speed will improve.
AMD RX480 + BMW scene
2.80 (3:10)
2.81 (5:48)
2.81 excluding 4d voronoi+2d/3d smooth (3:50)
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D6231
|
|
This patch adds a new Vertex Color node. The node also returns the alpha
of the vertex color layer as an output.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5767
|
|
This patch allows the Voronoi node to operate in 1D, 2D, and 4D space.
It also adds a Randomness input to control the randomness of the texture.
Additionally, it adds three new modes of operation:
- Smooth F1: A smooth version of F1 Voronoi with no discontinuities.
- Distance To Edge: Returns the distance to the edges of the cells.
- N-Sphere Radius: Returns the radius of the n-sphere inscribed in
the cells. In other words, it is half the distance between the
closest feature point and the feature point closest to it.
And it removes the following three modes of operation:
- F3.
- F4.
- Cracks.
The Distance metric is now called Euclidean, and it computes the actual
euclidean distance as opposed to the old method of computing the squared
euclidean distance.
This breaks backward compatibility in many ways, including the base case.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5743
|
|
This patch extends Musgrave noise to operate in 1D, 2D, 3D, and 4D
space. The Color output was also removed because it was identical
to the Fac output.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5566
|
|
This patch rewrites the Mapping node to support dynamic inputs. The
Max and Min options have been removed. They can be added as Min and
Max Vector Math nodes manually.
Texture nodes still use the old matrix-based mapping. A new SVM node
`NODE_TEXTURE_MAPPING` has been added to preserve this functionality.
Similarly, in GLSL, a `mapping_mat4` function has been added.
Reviewers: brecht, JacquesLucke
|
|
This patch extends perlin noise to operate in 1D, 2D, 3D, and 4D
space. The noise code has also been refactored to be more readable.
The Color output and distortion patterns changed, so this patch
breaks backward compatibility. This is due to the fact that we
now use random offsets as noise seeds, as opposed to swizzling
and constants offsets.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5560
|
|
The Volume Info node provides the Color, Desnity, Flame, and Temperature
of smoke domains.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5551
|
|
The White Noise node hashes the input and returns a random number in the
range [0, 1]. The input can be a 1D, 2D, 3D, or a 4D vector.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5550
|
|
Add Multiply, Divide, Project, Reflect, Distance, Length, Scale, Snap,
Floor, Ceil, Modulo, Fraction, Absolute, Minimum, and Maximum operators
to the Vector Math node. The Value output has been removed from operators
whose output is a vector, and the other way around. All of those removals
has been handled properly in versioning code.
The patch doesn't include tests for the new operators. Tests will be added
in a later patch.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5523
|
|
- Implement dynamic inputs. The second input is now unavailable in single
operand math operators.
- Reimplemenet the clamp option using graph expansion for Cycles.
- Clean up code and unify naming between Blender and Cycles.
- Remove unused code.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5481
|
|
If the option is enabled, the output is clamped to the target range.
The target range is [To Min, To Max]. The option is enabled by default.
The clamp option is implemented in EEVEE by linking to the `clamp_value`
GLSL function. And it is implemented in Cycles using a graph expand
function.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5477
|
|
This patch adds a new node that clamps a value between a maximum and
a minimum values.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5476
|
|
This patch adds a new Map Range node that linearly remaps an input
value from a range to another. This node is similar to the compositor's
Map Range node.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5471
|
|
This also replaces the Use Alpha setting. We now have these alpha modes:
* Straight: store RGB and alpha channels separately with alpha acting as a
mask, also known as unassociated alpha.
* Premultiplied: transparent RGB pixels are multiplied by the alpha channel.
The natural format for renders.
* Channel Packed: different images are packed in the RGB and alpha channels,
and they should not influence each other. Channel packing is commonly used
by game engines to save memory.
* None: ignore alpha channel from the file and make image fully opaque.
Cycles OSL does not correctly support Channel Packed and None yet, we are
missing fine control over the OpenImageIO texture cache to do that.
Fixes T53672
|
|
This makes it easier to set up materials with emission and transparency.
Importers/exporters and add-ons are recommended to now use these rather than
creating separate transparent BSDF and emission nodes.
|
|
These are the internal changes to Cycles, for Blender integration there are no
functional changes in this commit.
Images are converted to scene linear color space on file load, and on reading
from the OpenImageIO texture cache. 8-bit images are compressed with the sRGB
transfer function to avoid precision loss while keeping memory usages low. This
also means that for common cases of 8-bit sRGB images no conversion happens at
all on image loading.
Initial patch by Lukas, completed by Brecht.
Differential Revision: https://developer.blender.org/D3491
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
The NODE_GROUP_LEVEL of the Geometry node should be bumped to 1
when Backface is connected. Backface uses `NODE_LIGHT_PATH` that
is part of NODE_GROUP_LEVEL1, the rest of the geometry ndoe is
NODE_GROUP_LEVEL_0.
|
|
|
|
|
|
|
|
Those are similar but different types, no reason to keep
their definitions in a single file.
|
|
It is supposed to be two spaces before comment stating which if
else/endif statements corresponds to. Was mainly violated in the
header guards.
|
|
|
|
This is a physically-based, easy-to-use shader for rendering hair and fur,
with controls for melanin, roughness and randomization.
Based on the paper "A Practical and Controllable Hair and Fur Model for
Production Path Tracing".
Implemented by Leonardo E. Segovia and Lukas Stockner, part of Google
Summer of Code 2018.
|
|
|
|
Features to get the 2nd, 3rd, 4th closest point instead of the closest, and
various distance metrics. No viewport/Eevee support yet.
Patch by Michel Anders, Charlie Jolly and Brecht Van Lommel.
Differential Revision: https://developer.blender.org/D3503
|
|
|
|
|
|
The Eevee AO node supports the new Normal socket, but ignores Distance,
Samples, Inside and Only Local settings.
|
|
This means the shader can now be used for procedural texturing. New
settings on the node are Samples, Inside, Local Only and Distance.
Original patch by Lukas with further changes by Brecht.
Differential Revision: https://developer.blender.org/D3479
|
|
With copy-on-write we can no longer assumes the point density data is
available after Cycles synchronization with Blender data is done. So
force it to be loaded earlier, even if it's not great for interactivity.
|
|
This patch adds support for IES files, a file format that is commonly used to store the directional intensity distribution of light sources.
The new IES node is supposed to be plugged into the Strength input of the Emission node of the lamp.
Since people generating IES files do not really seem to care about the standard, the parser is flexible enough to accept all test files I have tried.
Some common weirdnesses are distributing values over multiple lines that should go into one line, using commas instead of spaces as delimiters and adding various useless stuff at the end of the file.
The user interface of the node is similar to the script node, the user can either select an internal Text or load a file.
Internally, IES files are handled similar to Image textures: They are stored in slots by the LightManager and each unique IES is assigned to one slot.
The local coordinate system of the lamp is used, so that the direction of the light can be changed. For UI reasons, it's usually best to add an area light,
rotate it and then change its type, since especially the point light does not immediately show its local coordinate system in the viewport.
Reviewers: #cycles, dingto, sergey, brecht
Reviewed By: #cycles, dingto, brecht
Subscribers: OgDEV, crazyrobinhood, secundar, cardboard, pisuke, intrah, swerner, micah_denn, harvester, gottfried, disnel, campbellbarton, duarteframos, Lapineige, brecht, juicyfruit, dingto, marek, rickyblender, bliblubli, lockal, sergey
Differential Revision: https://developer.blender.org/D1543
|
|
|
|
Similar to the Principled BSDF, this should make it easier to set up volume
materials. Smoke and fire can be rendererd with just a single principled
volume node, the appropriate attributes will be used when available. The node
also works for simpler homogeneous volumes like water or mist.
Differential Revision: https://developer.blender.org/D3033
|
|
A volume shader should be able to request attributes, and still be rendered
as homogeneous if no volume attributes are available for the object.
|