mirror of
https://github.com/blender/blender
synced 2026-11-22 03:45:13 +03:00
The main goal is to bring a bit of structure to the use of quaternions in the Cycles kernel. Prior to this change there was no dedicated quaternion type and float4 was used instead, and quaternions are stored as (x, y, z, w) matching naming between the quaternion and float4 fields. However, Blender uses (w, x, y, z) quaternion order for attributes, which is different from what Cycles uses. Without dedicated type this either leads to different quaternion orders depending whether it comes from attribute, or makes it intrinsically not possible to use implicit sharing. This change introduces Cycles Quaternion type which is compatible with Blender attribute math::Quaternion in both layout and alignment, making it possible to benefit from implicit sharing and use a nice structure in the kernel. This change does not modify the existing quaternion usage in the kernel which is currently used for transform decomposition and interpolation. There is currently no SIMD for the Quaternion type, which allows to avoid any special alignment requirement and share attributes with Blender, but performance might not be ideal. This attribute type will be used for representing gaussian splat rotation. The attribute access and interpolation matches behavior prior to this change. Added some basic tests for quaternion attribute access for RGB and alpha, mesh and volume attributes. Ref #159470 Pull Request: https://projects.blender.org/blender/blender/pulls/163342 |
||
|---|---|---|
| .. | ||
| cycles_renders | ||
| eevee_renders | ||
| storm_hydra_renders | ||
| storm_renders | ||
| attribute_default_color.blend | ||
| attribute_pointcloud_color.blend | ||
| attribute_quaternion.blend | ||
| attribute_uniform.blend | ||
| attribute_view_layer.blend | ||
| attribute_volume_element_mesh.blend | ||
| attributes_long_property_path.blend | ||