Age | Commit message (Collapse) | Author |
|
Currently in fractal_noise functions, each subsequent octave doubles the
frequency and reduces the amplitude by half. This patch introduces Roughness
input to Noise and Wave nodes. This multiplier determines how quickly the
amplitudes of the subsequent octaves decrease.
Value of 0.5 will be the default, generating identical noise we had before.
Values above 0.5 will increase influence of each octave resulting in more
"rough" noise, most interesting pattern changes happen there. Values below
0.5 will result in more "smooth" noise.
Differential Revision: https://developer.blender.org/D7065
|
|
|
|
Checkbox to invert rotation angle, suggested by @simonthommes
Differential Revision: https://developer.blender.org/D6932
|
|
Remove additional Euler modes for the time being, not working as intended, will add back if there is a need.
|
|
The node would render black in this case (but should use the
'active_render' layer choosen in the object data properties -- this is
now in line to how this is handled for e.g. UVs)
This introduces ATTR_STD_VERTEX_COLOR and uses this thoughout, if no
particular layer is specified in the node.
Maniphest Tasks: T73938
Differential Revision: https://developer.blender.org/D6887
|
|
|
|
This extends FindOpenShadingLanguage.cmake to also look for the location of
stdosl.h and adds the path to the invocation of oslc to deal with the headers
being in different locations a little better.
Differential Revision: https://developer.blender.org/D6865
Reviewers: brecht
|
|
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
|
|
|
|
There were to copies of stdosl.h one from stock OSL
and one in the cycles tree augmented with cycles
specific closures.
moved the cycles ones to stdcycles.h and copied
the stock stdosl.h and accompanying headers from
the OSL shader folder.
for further details see D6812.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6812
|
|
|
|
Lacunarity parameter determines scaling of subsequent octaves in fractal
noises. For example, Noise node have this scaling hardcoded to 2.0. Each
octave have twice bigger scale than previous one, resulting in finer details.
By design fractal noises that generate octaves with same seed should not
have Lacunarity set to 1.0, since then it just stacks up identical noises.
Differential Revision: https://developer.blender.org/D6742
|
|
This also fixes glsl version of fmod when both inputs are negative.
Differential Revision: https://developer.blender.org/D6704
|
|
Hash input values to a color.
Differential Revision: https://developer.blender.org/D6672
|
|
This patch suppress the OSL warnings resulted from ambiguous calls
to the normalize function. This is done by casting to the vector
type before normalizing.
Reviewed By: Brecht
Differential Revision: https://developer.blender.org/D6621
|
|
|
|
|
|
|
|
Previously Noise and Wave texture nodes would use noise functions within a [0,1]
range for distortion effects. We either add or subtract noise from coordinates,
never do both at same time. This led to the texture drastically shifting on the
diagonal axis of a plane / cube. This behavior makes the Distortion input hard
to control or animate. Capabilities of driving it with other texture are also
limited, diagonal shifting is very apparent.
This was fixed by offsetting the noise function to a signed range and making it
zero-centered. This way noise is uniformly added and subtracted from coordinates.
Texture pattern sticks to main coordinates which makes it way easier to control.
This change is not strictly backwards compatible, there is versioning to ensure
the scale of the distortion remains similar, but the particular pattern can be
a little different.
Differential Revision: https://developer.blender.org/D6177
|
|
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
|
|
The Random Per Island attribute is a random float associated with each
connected component (island) of the mesh. It is particularly useful
when artists want to add variations to meshes composed of separate
units. Like tree leaves created using particle systems, wood planks
created using array modifiers, or abstract splines created using AN.
Reviewed By: Sergey Sharybin, Jacques Lucke
Differential Revision: https://developer.blender.org/D6154
|
|
Differential Revision: https://developer.blender.org/D6058
Reviewers: brecht, fclem
|
|
|
|
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 object color property is added as an additional output in
the Object Info node.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5554
|
|
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
|
|
|
|
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 adds our own OSL texture handle, that has info for OIIO textures or our
own custom texture types. A filename to handle hash map is used for lookups.
This is efficient because it happens at OSL compile time, because the optimizer
can figure out constant strings and replace them with texture handles.
|
|
|
|
|
|
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
|
|
We should clamp the result after multiplication.
|
|
Values outside the 0..1 range produce negative colors, so now clamp to that
range everywhere. Also fixes improper handling of hue > 2.0 in some places.
|
|
Convention is to only have public domain code templates. Also fixes wrong
license header in Cycles.
|
|
|