ComputationalBiomechanicsLab / opensim-creator

A UI for building OpenSim models
https://opensimcreator.com
Apache License 2.0
137 stars 16 forks source link

Toggle for turning off force arrow visualization #885

Closed VDB-Bram closed 3 weeks ago

VDB-Bram commented 4 weeks ago

Hi there!

Is it possible to turn off the force arrow (the green arrows when using a model with contact spheres) visualization? When displaying a motion, I am currenlty only interested in showing the motion, without the distraction of the force arrows. I might be looking over the toggle switch that does this.

I think it was implemented through issue #449? I that case, I see it was just an experimental implementation.

Thanks for all the work on OSC!

adamkewley commented 4 weeks ago

Hi @VDB-Bram ,

Just so I know exactly which arrows we're talking about, could you click the arrow and screenshot the scene (maybe, while hovering the arrow so I can see the component type)?

If it's the yellow arrows that are drawn during contact, then the toggle for it is available in the Visual Aids menu on each 3D viewer (the grid icon, top-left in each visualizer window). If it's the green arrows that are from SmoothSphereHalfSpaceForce (as mentioned in #449) then those are generated by the OpenSim backend and can't be toggled in OSC (yet). However, they can manually be toggled by:

<!--- rest of the osim file is above this -->
        </ComponentSet>
        <!--Visual preferences for this model.-->
        <ModelVisualPreferences name="modelvisualpreferences">
            <!--Model display preferences-->
            <ModelDisplayHints>
                <!--Flag to indicate whether or not to show markers, default to true.-->
                <show_forces>false</show_forces>
            </ModelDisplayHints>
        </ModelVisualPreferences>
    </Model>
</OpenSimDocument>

E.g. here is a link to a basic osim that showed the green arrows until I set show_forces to false:

VDB-Bram commented 4 weeks ago

Hi @adamkewley,

Here the screenshot you asked for, it indeed seems to be the ones related to SmootSphereHalfSpaceForce. image

I'll try it out with adding the block of code. Thanks for the help!

VDB-Bram commented 3 weeks ago

Solution with adding the block of code was succesful, thanks.