Skip to content

Quality presets and recommended preset - #1158

Closed
itspvty wants to merge 5 commits into
Autodesk:devfrom
itspvty:aries/1781/quality-presets
Closed

Quality presets and recommended preset#1158
itspvty wants to merge 5 commits into
Autodesk:devfrom
itspvty:aries/1781/quality-presets

Conversation

@itspvty

@itspvty itspvty commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

This PR adds quality presets to the graphics settings modal, and allows Synthesis to automatically select the low (or "fast") graphics preset based on certain parameters including whether the device is a mobile device, or the specs are low. Check the Recommended Settings section for help on testing the recommended settings functionality.


Presets

Fast Graphics (Low)
image

Balanced Graphics (Medium)
image

Fancy Graphics (High)
image

If any options are changed, the preset is automatically set to "Custom":
image


Recommended Settings

The recommended settings are only applied to a device once. We then save whether or not this optimization has been applied in localstorage. To tell the browser that we haven't run the optimization yet, run the following in dev tools:

let p=JSON.parse(localStorage.getItem("Preferences"));p.GraphicsOptimizationApplied=!1;localStorage.setItem("Preferences",JSON.stringify(p));

Then, you can emulate mobile device headers by using device mode in dev tools:
image

Finally, reload the page.

@itspvty itspvty self-assigned this Jun 24, 2025
@itspvty
itspvty requested review from a team and HunterBarclay as code owners June 24, 2025 18:13
@itspvty
itspvty changed the base branch from prod to dev June 24, 2025 18:14
@itspvty
itspvty requested a review from a team as a code owner June 24, 2025 18:14
@itspvty
itspvty requested a review from PepperLola June 24, 2025 18:14
@BrandonPacewic BrandonPacewic added the rendering Relating to the rendering engine or how something is rendered label Jun 24, 2025

@BrandonPacewic BrandonPacewic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Running into a few issues related to the checkboxes for both fancy shadows and anti-aliasing. It seems that they don't always apply the visual changes related to the option being selected/deselected.

Also running into some weird things with the browser refresh being forced when the state of anti-aliasing has not been changed. Not 100% sure if its related to this pr or not.

@itspvty

itspvty commented Jun 24, 2025

Copy link
Copy Markdown
Contributor Author

Running into a few issues related to the checkboxes for both fancy shadows and anti-aliasing. It seems that they don't always apply the visual changes related to the option being selected/deselected.

Also running into some weird things with the browser refresh being forced when the state of anti-aliasing has not been changed. Not 100% sure if its related to this pr or not.

I can't seem to figure out how to directly toggle a checkbox in-code; do you have any insight on this?

AntiA being double toggled and force reloading is a result of @Dhruv-0-Arora's PR.

@BrandonPacewic

Copy link
Copy Markdown
Member

I can't seem to figure out how to directly toggle a checkbox in-code; do you have any insight on this?

AntiA being double toggled and force reloading is a result of @Dhruv-0-Arora's PR.

It seems like both of these issues are being caused by the state of the checkbox sometimes not matching the state of the setting when the preset gets applied. See if you can find a way to update the display state of the checkboxes when applying the presets. If it does not appear reasonable, we can wait to make this change till after the UI refactor is done.

@itspvty
itspvty requested a review from BrandonPacewic June 24, 2025 21:54
@itspvty

itspvty commented Jun 24, 2025

Copy link
Copy Markdown
Contributor Author

I can't seem to figure out how to directly toggle a checkbox in-code; do you have any insight on this?
AntiA being double toggled and force reloading is a result of @Dhruv-0-Arora's PR.

It seems like both of these issues are being caused by the state of the checkbox sometimes not matching the state of the setting when the preset gets applied. See if you can find a way to update the display state of the checkboxes when applying the presets. If it does not appear reasonable, we can wait to make this change till after the UI refactor is done.

Let's fix checkboxes after refactor :D

@Dhruv-0-Arora

Copy link
Copy Markdown
Collaborator

the state of the checkbox sometimes not matching the state of the setting when the preset gets applied. See if you can find a way to update the display state of the checkboxes when applying the presets. If it does not appear reasonable, we can wait to make this change till after the UI ref

For AntiA, there are two different anti-alias settings that are being set and in order to actually change these settings, there are some weird re-render things you need to do

@Dhruv-0-Arora Dhruv-0-Arora left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Depends on UI Refactor

@Dhruv-0-Arora
Dhruv-0-Arora marked this pull request as draft June 26, 2025 16:43
@itspvty
itspvty marked this pull request as ready for review July 17, 2025 17:11
@itspvty
itspvty requested a review from Dhruv-0-Arora July 17, 2025 17:12
Comment thread fission/src/Synthesis.tsx
Comment on lines +105 to +106
applyInitialGraphicsSettings()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

not a huge fan of calling a function from a Panel in Synthesis.tsx. If anything, this function should be in a helper .ts file, not .tsx

setAntiAliasing(checked)
setReload(true)
updatePresetFromSettings(lightIntensity, fancyShadows, maxFar, cascades, shadowMapSize, checked)
globalAddToast?.("info", "Refresh Required", "Please refresh the page to see the anti-aliasing changes.")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This was fixed in one of Zach's PRs right

Suggested change
globalAddToast?.("info", "Refresh Required", "Please refresh the page to see the anti-aliasing changes.")
globalAddToast.("info", "Refresh Required", "Please refresh the page to see the anti-aliasing changes.")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Assuming you mean

Suggested change
globalAddToast?.("info", "Refresh Required", "Please refresh the page to see the anti-aliasing changes.")
globalAddToast("info", "Refresh Required", "Please refresh the page to see the anti-aliasing changes.")

Can you link the PR you are mentioning?

@rutmanz rutmanz Jul 22, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#1204, the optional chaining is no longer required

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This would probably all be better off in Scenerenderer to apply the initial settings

@itspvty itspvty closed this by deleting the head repository Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rendering Relating to the rendering engine or how something is rendered

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants