220 Commits

Author SHA1 Message Date
Omar Emara
383c8860a2 Compositor: Remove Texture node
This patch removes the Texture node from the compositor, which was based
on the legacy Internal Textures system in Blender. The main motivation
for removing this node is as follows:

- Procedural texturing nodes that previously existed in shading and
  geometry nodes are now supported in the compositor, which cover 95% of
  what is previously possible using and even adds new possibilities like
  Gabor, Bricks, and various improvements to existing texture types.
- The old texture system did not support GPU evaluation, so it was
  always computed and cached on the CPU, which causes bad performance
  especially for interactive use in the viewport compositor. While the
  new nodes are fully GPU accelerated and do not require any caching.
- The Texture node didn't support Texture nodes, so it was not fully
  supported and we so far had a warning about that.
- The general direction in Blender is to remove the old texture system,
  and the compositor was one of the last main users of it. 5.0 is thus
  the ideal time to remove such use.
- The Texture node was always and still is a source of bugs, since it
  relies on proper tagging for cache invalidation and updates, which is
  so far not perfect. It also suffers from UI/UX issues, since it needs
  to be adjusted from the properties panel, which can break if there are
  other texture nodes in the context.

This is a breaking change and no versioning was attempted since:

1. It is impossible to get the same results as before due to the use of
different random number generators, so any versioning would just give us
the general look.
2. The Texture node supports a lot of possible configurations. For
instance, each general texture can have many options for the basis type,
and each basis type might have multiple options. So versioning all of
that will take a lot of time, code, and effort.

Pull Request: https://projects.blender.org/blender/blender/pulls/140545
2025-06-24 11:54:39 +02:00
Sean Kim
bf483ae2eb Merge branch 'blender-v4.5-release' 2025-06-23 10:23:17 -07:00
Sean Kim
7274fdb377 Fix #140556: Mask filter operations behave incorrectly on dense meshes
Mistake in 57c4e9dd2c

Pull Request: https://projects.blender.org/blender/blender/pulls/140570
2025-06-23 19:22:33 +02:00
Jacques Lucke
f0c7e52ff2 Core: extract blendfile_header.py as common utility for parsing .blend files
This new file can parse the file header (first few bytes) as well as the block
headers.

Right now, this is used by two places:
* `blendfile.py` which is used by `blend2json.py`
* `blend_render_info.py`

This new module is shipped with Blender because it's needed for
`blend_render_info.py` which is shipped with Blender too. This makes using it in
`blendfile.py` (which is not shipped with Blender) a bit more annoying. However,
this is already not ideal, because e.g. `blend2json` also has to add to
`sys.path` already to be able to import `blendfile.py`.

This new file could also be used by blender-asset-tracer (BAT).

The new `BlendFileHeader` and `BlockHeader` types may be subclassed by code
using it, because it wants to store additional derived data (`blendfile.py` and
BAT need this).

New tests have been added that check that the file and block header is parsed
correctly for different kinds of .blend files.

Pull Request: https://projects.blender.org/blender/blender/pulls/140341
2025-06-23 12:53:55 +02:00
Aras Pranckevicius
11bf3dd71e VSE: Text Strip supports text longer than 512 bytes
Text strip had a fixed size buffer of 512 bytes to hold the displayed
text (this can be much fewer actual characters with non-English
languages). Switch to dynamically allocated buffer instead, which can
hold longer text.

In order to support forward/backward compatibility, TextVars continues
to hold the 512 byte buffer in memory. When writing out the .blend file,
dynamic text buffer is copied into the fixed one. If it is longer, the
text is truncated, so opening the .blend file in an older version
will contain the first 512 bytes of the longer text. When reading
existing files without the dynamic text buffer, it is created from the
static buffer. Conceptually this approach is similar to constraints
name length increase PR !137310.

The text strip editing code was switched to operate on the dynamic
buffer, resizing it as needed. seq::CharInfo internal struct was
switched to be more independent of the actual buffer address; now
each char entry just stores an index into the buffer instead of direct
pointer (side effect: makes the struct smaller as well).

Pull Request: https://projects.blender.org/blender/blender/pulls/140733
2025-06-20 21:27:12 +02:00
Brecht Van Lommel
17bda2cf3f Cycles: Enable multi-bounce random walk subsurface scattering
Multi-bounce was mainly disabled for disk sampling where the probability of
hitting something is relatively low even with high albedo, but this is not so
much an issue with random walk.

This reduces darkening artifacts at the cost of some extra render time. The
difference is mainly visible when using a high radius.

Pull Request: https://projects.blender.org/blender/blender/pulls/140665
2025-06-19 20:04:49 +02:00
Lukas Stockner
49ae867de4 Fix #139870: Cycles: Some objects with normal maps leak light
This was broken by !138632, the refactor of the microfacet code to no longer
check the "geometric normal", which in reality was the smoothed normal.

Since the logic is now the same for all closure types, it seemed weird that
the light leak only affects Microfacet closures, not Diffuse.

Turns out that for diffuse closures, the relevant paths were rejected by
the initial hemisphere check in the smooth bump terminator code, which also
incorporates the smoothed but non-bump/normal-mapped normal sd->N.

So, we can detect and prevent the new light leaks by extending this check to
all closure types for the eval case. Sampling already has stricter checks,
so this doesn't apply there.

With this change, we can revert the two test cases back to their pre-refactor
version. In hindsight it was a mistake to just shrug off these changes as okay,
I should have looked closer into the difference.

Pull Request: https://projects.blender.org/blender/blender/pulls/140415
2025-06-19 19:20:06 +02:00
Michal Krupa
fdaaea6328 Core: Increase MAX_ID_NAME length from 66 to 258 (Blender 5.0)
Change the maximum data-block name from 64 to 256 bytes by increasing MAX_ID_NAME value.

Also increase a few related non-ID data name max size, essentially the action slots identifiers, as these are the primary key used to match an Action's slot to an ID by name.

Other sub-data (bones, modifiers, etc.) lengths are not modified here, as these can be made actual dynamic strings in the future, while keeping (a reasonable level of) forward compatibility, during the course of Blender 5 release cycles.

Implements #137608.

Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/137196
2025-06-19 16:39:20 +02:00
Piotr Makal
870f75b790 Fix #79163: Bevel operation produces disconnected UVs #139595.
Fix #79163 bug related to the bevel operation producing disconnected UVs for
new bevel faces. This change replaces previous approach using scattered and
selective usage of functions: bev_merge_uvs, bev_merge_edge_uvs and
bev_merge_end_uvs with one coherent technique for all stages of the bevel operation.
It is utilizing a concept of loop (BMLoop) buckets to keep track of UV vertices
that should be merged at the end of bevel operation by a single call to
bevel_merge_uvs function. This approach doesn't touch initial UV position
calculation done by interpolation algorithm in bev_create_ngon function and
keeps the concept of representative faces (called frep, facerep or rep_face in
code) to help decide to which bucket specific loops should be assigned.

This is from PR https://projects.blender.org/blender/blender/pulls/139595,
which has more explanation and discussion.
2025-06-19 10:00:58 -04:00
Piotr Makal
8412c0b42d Fix #79163: Bevel operation produces disconnected UVs #139595.
Fix #79163 bug related to the bevel operation producing disconnected UVs for
new bevel faces. This change replaces previous approach using scattered and
selective usage of functions: bev_merge_uvs, bev_merge_edge_uvs and
bev_merge_end_uvs with one coherent technique for all stages of the bevel operation.
It is utilizing a concept of loop (BMLoop) buckets to keep track of UV vertices
that should be merged at the end of bevel operation by a single call to
bevel_merge_uvs function. This approach doesn't touch initial UV position
calculation done by interpolation algorithm in bev_create_ngon function and
keeps the concept of representative faces (called frep, facerep or rep_face in
code) to help decide to which bucket specific loops should be assigned.

This is from PR https://projects.blender.org/blender/blender/pulls/139595,
which has more explanation and discussion.
2025-06-19 09:50:14 -04:00
Jesse Yurkovich
fe45895064 Merge branch 'blender-v4.5-release' 2025-06-18 11:26:07 -07:00
Jesse Yurkovich
bcd5af34f9 Fix: USD: Traverse through UsdShadeNodeGraph nodes during material import
Follow connections through `UsdShadeNodeGraph` nodes when reading
materials rather than looking only for `UsdShadeShader` nodes.

Found while investigating the Intel Sponza research sample:
https://www.intel.com/content/www/us/en/developer/topic-technology/graphics-research/samples.html

Pull Request: https://projects.blender.org/blender/blender/pulls/140565
2025-06-18 20:25:29 +02:00
Jacques Lucke
1bb49edf7f Geometry Nodes: add structure type inferencing tests
The way these tests work is similar to the existing field inferencing tests.
There is a .blend file that is opened and then we check the inferred structure
types from Python. A new `NodeSocket.inferred_structure_type` property is added
to be able to access this information. Other then the field inferencing tests,
this patch does not directly check the socket shapes, which are not always
exactly determined by the inferred structure type.

This also fixes a few issues I found while adding the tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/140520
2025-06-18 08:39:01 +02:00
marcopavanello
ab21755aaf Shaders: Remove old Preetham and Hosek sky texture models
Remove old Preetham and Hosek-Wilkie sky models, which are less accurate.
The Nishita improved model has been available for long enough.

Pull Request: https://projects.blender.org/blender/blender/pulls/139923
2025-06-16 14:36:18 +02:00
Brecht Van Lommel
b920f6f1a7 Shaders: Remove point density texture node
This is replaced by geometry nodes, where volumes can now be generated from
point clouds and meshes with more control, and more efficient rendering as a
sparse volume.

No backwareds compatibility is provided, as this would be complicated, and
probably this feature was not used much in the past few years.

This node was supported in Cycles only, not by EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/140292
2025-06-16 12:06:02 +02:00
Aras Pranckevicius
d9ef240311 Merge branch 'blender-v4.5-release' 2025-06-14 22:15:36 +03:00
Aras Pranckevicius
074fcfe1a5 Fix #138834: FBX importer sets pivots incorrectly in some cases
Fix the rest of #138834, pivot adjustment was not done
when rotation pivot and scaling pivot inside FBX were not matching.

Pull Request: https://projects.blender.org/blender/blender/pulls/140411
2025-06-14 21:14:27 +02:00
Jesse Yurkovich
3fa1344dd7 Merge branch 'blender-v4.5-release' 2025-06-13 16:11:31 -07:00
Michael B Johnson
07342407d3 USD: Add support for Point Instancing during Export
Adds a Point Instancing exporter based on the existing
USDPointInstancerReader. Covers both round-trip and Blender-native
workflows. Exports 'Instance on Points' setups as USDGeomPointInstancer,
supporting objects, collections, and nested prototypes.

A warning is shown during export if invalid prototype references are
detected. These would occur if an instancer attempts to instance itself.

This feature is currently gated behind an off-by-default export option
(`use_instancing`) as there are still a few cases which can yield
incorrect results.

Further details in the PR.
Ref: #139758

Authored by Apple: Zili (Liz) Zhou

Pull Request: https://projects.blender.org/blender/blender/pulls/139760
2025-06-14 01:10:55 +02:00
Clément Foucault
4fe75da973 EEVEE: Remove all remaining reference of EEVEE next
This changes the engine identifier back to `BLENDER_EEVEE`.

We keep the `BLENDER_EEVEE_NEXT` identifier around for
versioning reasons (have to detect when it is the active
engine of a older file).

This also rename a bunch of pannels that were using `next`
in their name.

This is a breaking change for Addons compatibility.

Pull Request: https://projects.blender.org/blender/blender/pulls/140282
2025-06-13 12:36:14 +02:00
Aras Pranckevicius
68111db969 Nodes: Speedup Voronoi by changing the hash function
The 2D->2D, 3D->3D, 4D->4D hash functions used in Voronoi node were
using quite an expensive hash function. Switch these to dedicated
2D/3D/4D hash functions (pcg2d, pcg3d, pcg4d) -- these are still very
good quality, but the hash function itself is 3x-4x faster.
Which makes Voronoi node calculation overall be around 2x faster. In
some cases when using OSL, the speedup is even larger.

This visibly changes output of the Voronoi noise however. The actual
noise "behaves" the same, just if someone was depending on the noise
pattern being exactly like it was before, this will change the pattern.

Images, more performance results and details wrt OSL are in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/139520
2025-06-12 20:07:52 +02:00
Jesse Yurkovich
283666675c Merge branch 'blender-v4.5-release' 2025-06-12 10:33:38 -07:00
Jesse Yurkovich
37f8616bd5 Fix #140225: Always ensure mesh topology is up to date during USD import
It is possible for a mesh to change topology across frames but still be
detected as not needing a topology update.

Until we can make a finer-grained check against the before and after
topology, unconditionally ensure it's updated for now.

Adds a new test that checks a few frames of changing topology that is
similar, but not the same.

Pull Request: https://projects.blender.org/blender/blender/pulls/140253
2025-06-12 19:32:43 +02:00
Laurynas Duburas
3c407ebeaa Curves: Enhance tesselation of NURBS with corners
Current NURBS evaluation handles corners or sharp angles poorly. Sharp
edges appear when a knot vector value is repeated `order - 1` times.
Users can make sharp corners by creating NURBS curve with `Bezier` knot
mode or by setting `order` to 2 for legacy curves. The problem occurs
because current algorithm takes all the curve's definition interval,
divides it into equal parts and evaluates at those points, but corners
are exactly on repeated knot's. To hit those, the resolution has to be
increased higher than required for the rest of the curve.

The new algorithm divides non zero length intervals between two adjacent
knots into equal parts. This way corners are hit with a resolution of 1.
This does change the evaluated points of NURBS curves, which is why some
test results have to be updated in this commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/138565
2025-06-12 16:22:21 +02:00
Brecht Van Lommel
7f380e0644 Revert "Fix: Cycles: Do not count volume bounds bounce as transparent"
This reverts commit 23c762e388 in the
blender-v4.5-release branch to work around HIP compiler issues. It will
remain in the main branch.

Ref blender/blender#139836
2025-06-11 15:47:07 +02:00
Brecht Van Lommel
45b11a6619 Revert "Fix: Cycles: Inconsistency in transparent bounces for NEE and forward path"
This reverts commit 64dc9cc98c in the
blender-v4.5-release branch to work around HIP compiler issues. It will
remain in the main branch.

Ref blender/blender#139836
2025-06-11 15:47:07 +02:00
Brecht Van Lommel
34838a9531 Revert "Cycles: Fix inconsistency in Ng handling between Microfacets and other closures"
This reverts commit a6015e1411 in the
blender-v4.5-release branch to work around HIP compiler issues. It will
remain in the main branch.

Ref blender/blender#139836
2025-06-11 15:47:07 +02:00
Omar Emara
9bcb536c95 Fix #138009: Extend Bounds doesn't work with Fast Gaussian
The Extend Bounds input has no effect when the Fast Gaussian filter is
used. Similarly, it has no effect if the Bokeh Blur node is using
variable size. This is a known limitation and was just not implemented.

So to fix this, we implement a general solution that works globally
across the node by pre-padding the inputs of the blur. This uses more
memory but also speeds up the base case when Extend Bounds is disabled,
while also reducing the binary size due to fewer blur specializations.

The variable size Bokeh Blur test was updated since it Extend Bounds was
silently ignored.

Pull Request: https://projects.blender.org/blender/blender/pulls/140192
2025-06-11 11:41:00 +02:00
Mohamed Hassan
3883a88d4e Compositor: Maintain alpha in Lens Distortion node
The alpha channel value was previously hard codded to one in the lens
distortion node. This patch solves that by integrating the alpha as well
in the radial distortion mode and taking the average alpha in the
horizontal case.

This breaks backward compatibility, but is what users what in most
cases, so it is acceptable.

Fixes #134658.

Pull Request: https://projects.blender.org/blender/blender/pulls/137994
2025-06-10 07:42:35 +02:00
Falk David
f7a0003452 Grease Pencil: Motion Blur support
This adds motion blur support for Grease Pencil.

We follow the same principle form EEVEE and use the existing
`antialiasing_accumulate` (SSAA) function to accumulate the
frames in range of the motion blur over time.

There is a new `motion_blur_steps` setting in the Grease
Pencil render settings to control the accuracy of the motion
blur. This will increase the render time.

Limitations:
* When Grease Pencil is composited into the scene, we only do
  it for one the current frame and don't take the motion blur into
  account. This will lead to hard edges currently.
* There is no viewport motion blur. This would need an entirely
  new technique that can be computed in real-time.

Pull Request: https://projects.blender.org/blender/blender/pulls/139840
2025-06-09 15:44:53 +02:00
Weizhen Huang
ee578cc738 Fix #139753: Discontinuity in mesh tangent without UV map
when there is no uv, we call the function `map_to_sphere()` to create
temporary uv for computing the tangent. It could happen that a triangle
has vertices with the u coordinates going across the line where u wraps
from 1 to 0. In this case, just computing the difference of the u
coordinates results in the wrong triangle area.

To fix this problem, we compute distance in toroidal (wrap around)
space.

This is safe for coordinates generated by `map_to_sphere()` function,
because it is not supposed to map the positions of a triangle to u
coordinates that span larger than 0.5.

Pull Request: https://projects.blender.org/blender/blender/pulls/139880
2025-06-09 13:52:00 +02:00
Aras Pranckevicius
5ad6d42c83 IO: Remove Collada import/export
Removes Collada import/export (has been deprecated since 4.2).

Pull Request: https://projects.blender.org/blender/blender/pulls/139337
2025-06-06 08:38:57 +02:00
Jacques Lucke
513c0494ba Fix #118207: avoid floating point calculations when computing random integer
This changes the way random integers are computed so that there is no
intermediate conversion to float which looses accuracy.

This change breaks compatibility because it changes the generated random
numbers. Therefore this is done in Blender 5.0.

Performance seems to be about ~6% better than before.

Pull Request: https://projects.blender.org/blender/blender/pulls/118795
2025-06-05 17:52:23 +02:00
Omar Emara
6bf52d11f1 Fix #139327: Movie distortion result is cropped
The Movie distortion node crops its data if the movie size differs from
the input size. That's because boundary extensions do not take
calibration size into account. To fix this, we use the same coordinates
range as the distortion grid computation, which computes the distortion
in the space of the calibration size.

Pull Request: https://projects.blender.org/blender/blender/pulls/139822
2025-06-04 12:24:33 +02:00
Aras Pranckevicius
ba0b1acb4e Fix #139656: FBX importer does not set normalmap textures as "non-color"
Normal maps (and generally all other non-color textures) were not
marked as non-color in the new FBX importer.

Pull Request: https://projects.blender.org/blender/blender/pulls/139725
2025-06-02 15:15:05 +02:00
Maxime-Cots
efd871e9ef USD: Implement new DomeLight_1 Schema for Import
Handle the `DomeLight_1` schema for import and translate to a World
material like what was already done for the original `DomeLight` schema.

The primary difference is that the new schema provides a `poleAxis`
attribute that authoring applications can use to remove ambiguity for
the orientation of the HDRI texture. Some care was made to match
`usdview` with a set of hand-crafted files. However, after matching,
some real scenes ended up displaying differently. These were corrected
but this could mean there's still issues that will need investigation
and fixing in the future.

Co-authored-by: Nig3l <nig3lpro@gmail.com>
Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/137761
2025-05-31 01:15:19 +02:00
Pratik Borhade
2b0cc73ef6 Modifiers: Change softbody fuzzy default value
Set fuzzy=1 when softbody modifier is added. As of now, value is 0, this
raises concern of division by zero so bump it to 1.
Updated `softbody_test.blend` to fix the failing test.
Resolves #137849

Pull Request: https://projects.blender.org/blender/blender/pulls/137878
2025-05-30 06:32:08 +02:00
Jesse Yurkovich
1e18fab838 Fix #139162: Exclude invisible point instancers during USD import
It was intended that pointers instancers would be skipped if they were
marked as invisible. However, we didn't account for the case of an
instancer using the "inherits" visibility but one of its ancestors in
the hierarchy being invisible.

Now these instancers will also be excluded. This is done by checking for
purpose and visibility earlier and halting the recursive traversal as
soon as we find a prim which doesn't meet the criteria.

Pull Request: https://projects.blender.org/blender/blender/pulls/139241
2025-05-26 21:31:34 +02:00
Omar Emara
bab308bfa2 Compositor: Turn Blur node options to inputs
This patch turns the Blur node options to inputs.

Size is now a 2D vector and replaces the Size X and Y option. Bokeh was
renamed to Separable to reflect its actual function. Relative was
removed in favor of the newly added Relative To Pixel node workflow.

There is a slight difference in variable size blurring due to float vs
integer computations, so two tests were updated.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/139329
2025-05-26 16:18:48 +02:00
Aras Pranckevicius
4e7acc4be8 Fix #138834: FBX import improved pivot handling
This does not fully fix the issue (pivots are still not handled
correctly when an object contains negative scale -- filed upstream
ufbx issue https://github.com/ufbx/ufbx/issues/218), but for regular
cases the pivots are in much better places now.

Pull Request: https://projects.blender.org/blender/blender/pulls/139381
2025-05-24 15:22:19 +02:00
Campbell Barton
a0e1938021 Cleanup: remove spaces from filenames, unix line endings
Also rename "blender export import test suite description.txt" to
"readme.txt" as the filename was including information available
in the leading path.
2025-05-23 14:32:45 +10:00
Brecht Van Lommel
ee619713f9 Tests: Add test files for new light features
Ref #136958, #134303
2025-05-22 16:32:44 +02:00
Eqkoss / T1NT1N
bb9d5cdaad Lights: Add normalize property
When enabled, this normalize the strength by the light area, to keep
the total output the same regardless of shape or size. This is the
existing behavior.

This is supported in Cycles, EEVEE, Hydra, USD, COLLADA.

For add-ons, an API function to compute the area is added for conversion,
in case there is no native support for normalization.

area = light.area(matrix_world=ob.matrix_world)

Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/136958
2025-05-22 16:32:44 +02:00
Jesse Yurkovich
e84c60561c Cleanup: Remove Dots Stroke material from USD's empty.blend test file
This extra material in what should be an empty file often makes some
checks and text comparisons needlessly more confusing.

Pull Request: https://projects.blender.org/blender/blender/pulls/139228
2025-05-21 20:42:11 +02:00
Habib Gahbiche
289984d868 Tests: Compositor: add test with animated input
Pull Request: https://projects.blender.org/blender/blender/pulls/139227
2025-05-21 20:21:46 +02:00
Aras Pranckevicius
8119e4baa7 Fix: FBX importer was not skipping special MotionBuilder viewport cameras
Reported on devtalk: MotionBuilder produced FBX files contain
"cameras" that are not really user visible cameras, but rather map to
MotionBuilder viewports. They are at root, have no child elements,
and have special names. There is also a "camera switcher";
ignore that too.

Pull Request: https://projects.blender.org/blender/blender/pulls/139204
2025-05-21 11:15:20 +02:00
Aras Pranckevicius
389d770bf4 Fix #122256, #123862: OBJ import Clamp Size option issues
- #122256: Clamp Size option did not work at all, due to mesh
  bounding box still not being calculated (and was firing an assert
  in Debug build).
- #123862: Clamp Size option was rounding the resulting scale to
  powers of ten, which is not what anyone would expect.

This fixes both issues, and adds test coverage.

Co-authored-by: dshot92 <dshot92@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/139145
2025-05-20 11:57:42 +02:00
Jesse Yurkovich
46ec277713 USD: Add support for UsdPrimvarReader_TYPE in materials
Add support for the UsdPrimvarReader_TYPE templates for both import and
export. These are used by several USD test assets and support here
represents the last major piece of the UsdPreviewSurface spec to be
implemented.

On import these become `Attribute` nodes and on export the `Attribute`
nodes will become `UsdPrimvarReader_TYPE`'s accordingly.

Import:
- `UsdPrimvarReader_float` and `UsdPrimvarReader_int` will use the `Fac`
  output
- `UsdPrimvarReader_float3` and `UsdPrimvarReader_float4` will use the
  `Color` output
- `UsdPrimvarReader_vector`, `UsdPrimvarReader_normal`, and
  `UsdPrimvarReader_point` will use the `Vector` output

Export (only `Geometry` Attribute types are considered):
- `Fac` will use `UsdPrimvarReader_float`
- `Color` will use `UsdPrimvarReader_float3`
- `Vector` will use `UsdPrimvarReader_vector`
- `Alpha` is not considered

MaterialX note:
Hydra-native support is a bit more involved and will have to be done
separately. Hydra w/USD sync is trivial to implement but those changes
have been left out here.

Pull Request: https://projects.blender.org/blender/blender/pulls/135143
2025-05-19 19:47:22 +02:00
Jacques Lucke
e981345a73 Fix #139055: failing implicit conversion between different subtypes
There are separate `bNodeSocketType` for each subtype. Hence, comparing
their pointers is not enough to determine whether a conversion is necessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/139083
2025-05-19 15:39:09 +02:00
Brecht Van Lommel
59b4842117 Cycles: Adaptive subdivision triangular patches
There is a corner case where one side of a quad needs splitting and the other
side has only one segment. Previously this would produce either gaps or after
recent changes to stitch together geometry, uninitialized memory.

Now solve this by splitting into triangular patches, as suggested in the
DiagSplit paper. These triangular patches can be further subdivided themselves.
Dicing has special cases for 1 or 2 segments on edges. For more segments it
works the same as: quad dicing: A regular inner triangle grid stitched to the
outer edges.

Fix #136973: Inconsistent results with adaptive subdivision

Pull Request: https://projects.blender.org/blender/blender/pulls/139062
2025-05-19 12:04:11 +02:00