polyscope icon indicating copy to clipboard operation
polyscope copied to clipboard

Issue with autoscaleStrucutre and relativeValue

Open dcoeurjo opened this issue 4 years ago • 3 comments

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 avatar Feb 27 '20 08:02 dcoeurjo

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

dcoeurjo avatar Feb 27 '20 09:02 dcoeurjo

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)

nmwsharp avatar Feb 28 '20 16:02 nmwsharp

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.

dcoeurjo avatar Mar 14 '20 16:03 dcoeurjo