Repository navigation
Renderer: camera roll turns the right way and applies to every pass - #4
Open
DennisHerrm wants to merge 2 commits into
Open
DennisHerrm wants to merge 2 commits into
DennisHerrm wants to merge 2 commits into
Conversation
ComputeUpFromLookDirection added roll·right while ComputeUpFromAngles (and 3ds Max's LookAt roll) subtract it, so an MDX camera's KCRL rolled the view the opposite way. Measured in Max 2027: roll +30° gives up = cos·upBase − sin·right. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ViewRH built its look-at with world Z as up, so the SD geosets, particles and ribbons stayed level while the grid and HD passes (ViewLH) rolled: a rolled Max camera synced into the preview turned the teapot against its own grid. Both now use the same up vector. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
DennisHerrm
force-pushed
the
pr/camera-roll-sign
branch
2 times, most recently
from
November 10, 2026 06:49
393440b to
2fb6675
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes for camera roll, found with a rolled target camera synced from 3ds Max (Sync Camera) and with MDX camera presets (KCRL):
Camera::ComputeUpFromLookDirection(Direct mode, used bySetDirectPose) addedroll·right, whileComputeUpFromAngles(Orbital mode) subtracts it. 3ds Max's LookAt roll measured in Max 2027: roll +30° givesup = cos·upBase − sin·right, the orbital convention. Direct mode now subtracts too, so an MDX camera's KCRL rolls the same way as in Max.ViewRH()built its look-at with world Z as up, so the SD geosets, particles and ribbons (drawn withGetViewMatrix()=ViewRH()) stayed level while the grid, HD geosets and shadows (ViewLH()) rolled: the model seemed to turn against its own grid.ViewRH()now uses the same up vector asViewLH().The WhiteoutDex side (its viewport sync recovers the roll with the matching sign) is in FernandoS27/WhiteoutDex#14, which needs this change.
🤖 Generated with Claude Code