-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch off 3D rendering on out of memory #10535
Conversation
src/DynamoCore/Models/DynamoModel.cs
Outdated
} | ||
} | ||
|
||
public void Report3DPreviewOutage(string summary, string description) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be public?
@@ -2239,4 +2239,10 @@ Uninstall the following packages: {0}?</value> | |||
<data name="NodeTooltipOriginalName" xml:space="preserve"> | |||
<value>Original node name: </value> | |||
</data> | |||
<data name="RenderingMemoryOutageDescription" xml:space="preserve"> | |||
<value>Please check if the amount of generated geometry is correct. If it is, it might be necessary to disable preview for some nodes before reactivating the background 3D preview.</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about wording this as The amount of generated geometry might be too large. If it is necessary to create them, it might be necessary to disable .... or consider generating fewer geometry objects.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it kind of a contradiction to ask to consider generating fewer geometry objects
after saying If it is necessary to create them
? Also this message does not really mention the hint of switching off preview for some nodes, which should be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to leave the part about disabling preview from your original message, which is what the ...
(ellipses) indicates. I just thought that instead of geometry is not "correct" you should mention that the amount of geometry created is large.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. The message actually says amount of generated geometry is correct
. I meant to say that the amount may be large by accident. For instance, the user could have inadvertently enabled the repeat
parameter of List.Combinations
when it was not needed.
@@ -219,7 +221,7 @@ protected override void OnActiveStateChanged() | |||
} | |||
|
|||
public event Action<Model3D> RequestAttachToScene; | |||
protected void OnRequestAttachToScene(Model3D model3D) | |||
protected virtual void OnRequestAttachToScene(Model3D model3D) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately this method will likely be removed / unused in the helix-upgrade branch - it might be possible to retain it and redirect it to do something useful with the new helix api though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this affect us when we cherry pick this test into helix-upgrade now?
To build this as a unit test I just needed an overridable method called from AggregateRenderPackages
. I guess I could use another method with these characteristics in helix-upgrade if it exists, or I could add this one with no behaviour if not. Does that sound ok?
Hi @Amoursol . Could I ask you to take a look at the dialog shown in the attached screenshot and give your opinion about it? It's related to Dynamo switching of background 3D preview when the amount of geometry is too large. Thanks in advance :) |
Hello @mmisol - A couple of quick questions / clarifications.
|
Hi @Amoursol . Those are very relevant questions, here are some answers:
|
@mmisol - OK cool, thanks for that! We won't look to creep scope - just wanted to know how to message appropriately 😄 To dive deeper into #1: |
@Amoursol Sounds good :) About the questions: A) Yes, the current rendering breaks. It's a two-step process where we remove and then add render packages. In the case I tested, what the user sees is that the curves disappear and eventually the error occurs preventing further rendering. |
@mmisol If I'm reading this correctly then the error message above doesn't tell the user why their existing rendering has disappeared? Might be more appropriate to include something like: "Dynamo has ran out of memory trying to render your Geometry causing it to disappear. Please check if you intended to render this amount of Geometry and if you did, then consider turning off the preview of other nodes within your graph or lowering the amount of Geometry you wish to render. Dynamo will attempt to turn back on the 3D Background Preview and render your geometries when you next switch back from graph view navigation." Now that's a bit of a mouthful so please do feel free to reword, but it's also a bit more expressive of what's happening enabling the user to understand where they can make changes to help and why it's failing in the first place. |
@Amoursol You are right, it doesn't say why it disappeared, that's a good point. I think your message is great, I will copy it as is. Thank you! |
How about? Please check if you intended to render this amount of geometry, and consider turning off the preview of other nodes within your graph, lowering the amount of Geometry you wish to render, or turning down the render percision. Dynamo will attempt to turn the 3D Background Preview back on, and render the geometry when you next switch back from graph view navigation." Also is this last sentence actually true? |
I had the same question about this statement. Is it true that the background preview will turn back on on its own? I think the user might have to turn it back on. |
You guys are right. When the background 3D preview is disabled, the user cannot switch between graph and 3D preview anymore. Removed that last part to avoid confusion. Let me know if it looks good now. |
It was more of a query hence the "If I understand correctly" 😊 Your version LGTM @mjkkirschner and I'm happy either way, was just around clarity on how the user can avoid the problem or remedy it that I was concerned with. |
Purpose
Switch off 3D rendering on out of memory
When rendering too much geometry, an OutOfMemoryException can be
raised by Helix, which causes Dynamo to crash.
This addresses the problem by reacting to the error. The background
geometry preview is disabled and a message dialog is shown to the user
communicating the problem.
Screenshot of the message:
Declarations
Check these if you believe they are true
*.resx
filesReviewers
@mjkkirschner
FYIs
@QilongTang @aparajit-pratap