Skip to content
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

Issue with autoscaleStrucutre and relativeValue #46

Open
dcoeurjo opened this issue Feb 27, 2020 · 3 comments
Open

Issue with autoscaleStrucutre and relativeValue #46

dcoeurjo opened this issue Feb 27, 2020 · 3 comments
Assignees

Comments

@dcoeurjo
Copy link

dcoeurjo commented Feb 27, 2020

When using the autoscaleStrucutres option, there may be an issue with the relativeValue computations (state::lengthScale might not be updated properly). For instance, if you attach an ambient vector field to a structure, the length and radius slider limits are super small (when you scale down a huge object to the unit cube thx to the autoscale).

@dcoeurjo
Copy link
Author

state::lengthScale seems to be fine.. Looks like the issue is during the draw with absolute/relative conversions... strange..

@nmwsharp
Copy link
Owner

Ah, this makes sense. If state::lengthScale seems fine then it might just be a UI issue, I still haven't figured out how to expose absolute/relative values in sliders intuitively--it might just be a matter of using different limits for absolute values.

Also, this raises another problem: if a structure is being scaled drastically via its model transform (like what happens due to autoscaleStructures), should data like radii be set in the original units, or the scaled units? Right now I think these values get set in the original units, and that's probably the only sane thing to do, but I'm not even sure.

I'll have to dig in to improving this for a future version. Let me know if you spot any concrete bugs, or have any ideas about how things should work!

(FYI for others: remember that you can always manually set a value by ctrl-clicking on the UI sliders as a workaround)

@dcoeurjo
Copy link
Author

Sorry for the delay of my reply.. Thanks for the CTRL-click tip, I was not aware of this one:)

Concerning the autoscale and VF, switching the vector type using polyscope::VectorType::AMBIENT did the job for me (with thus relative length).

Actually, I don't see any use case of having scaled geometry but non-scaled vectors in a viewer.

thx again for the feedbacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants