Skip to content

Cycles : Simplify transform handling - #7136

Merged
murraystevenson merged 2 commits into
GafferHQ:1.7_maintenancefrom
johnhaddon:cyclesTransforms
Sep 4, 2026
Merged

Cycles : Simplify transform handling#7136
murraystevenson merged 2 commits into
GafferHQ:1.7_maintenancefrom
johnhaddon:cyclesTransforms

Conversation

@johnhaddon

Copy link
Copy Markdown
Member

I'm about to add PointInstancer support for Cycles, which will effectively mean making as many lightweight CyclesObjects as I can each with their own transform. Before doing that, let's simplify the transform handling in general, since it has a lot of cruft that doesn't seem necessary with modern Cycles.

History suggests that when I delete "redundant" code from GafferCycles I usually delete at least one thing that turned out to be necessary. But harking back to similar work for deformation blur, I've rendered a contact sheet showing various numbers of transform segments rendered across all devices and with both meshes and points - all seems to be well there :

new

- Remove unreachable code. CameraAlgo never sets `motion_position`, so we don't need to handle the different cases. It's not even clear that the different cases need different handling - I suspect not.
- Drop all the sample interpolation stuff. We learned we don't need it when refactoring the object deformation code.
- Do scaling and conversion once, instead of repeating for `set_tfm()` and `set_motion()`.
- Document weird scaling in Y, which I think should be removable in future.

@murraystevenson murraystevenson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks John, this looks like a great simplification overall. I've noted a pair of subdivision related wrinkles inline, one straightforward, the other a little vexing...

Comment thread src/GafferCycles/IECoreCyclesPreview/Renderer.cpp Outdated
Comment thread src/GafferCycles/IECoreCyclesPreview/Renderer.cpp Outdated
As with object deformation, none of this is necessary now - Cycles happily accepts any number of samples.
@murraystevenson
murraystevenson merged commit 1d0c18f into GafferHQ:1.7_maintenance Sep 4, 2026
6 of 7 checks passed
@github-project-automation github-project-automation Bot moved this from Pending Review to Pending release in Work in Progress Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending release

Development

Successfully merging this pull request may close these issues.

2 participants