opensim-org / opensim-gui

SimTK OpenSim graphical user interface and distribution.
Apache License 2.0
62 stars 33 forks source link

Holes and missing faces in muscle geometry #311

Closed tkuchida closed 6 years ago

tkuchida commented 7 years ago

I think similar issues have been closed, but it's still an issue on Windows at least (opensim4.0PreviewWin64_0717.zip). Here's a zoomed-in view of the ISB jumper: muscles

aymanhab commented 7 years ago

@aseth1 has a fix that has been committed to the repo but it was after the build was made. Keep an eye on the next build.

tkuchida commented 7 years ago

Keep an eye on the next build.

logo :eyes:

tkuchida commented 7 years ago

Improved, but still some issues in opensim4.0PreviewWin64_ISB.zip (see yellow circles added in Paint :art:):

muscles1 muscles2

tkuchida commented 7 years ago

Remains an issue in OpenSim-4.0.Beta_082917_Win64.zip. Here is Models\Gait10dof18musc\gait10dof18musc.osim:

musclegeometry

tkuchida commented 7 years ago

Related: Added a random path point (while testing #107) and the resulting geometry is not what I expected [OpenSim-4.0.Beta_082917_Win64.zip]:

musclepath

The issue is probably exaggerated here compared to what would be seen in a realistic model, but I think the cylinders should always touch every path point.

aymanhab commented 7 years ago

Thanks for reporting @tkuchida The cylinder not touching the pathpoint is a side-effect of blending where the weights of pathpoints are not set to 1.0. This tends to smooth out the kinks in the muscle path but at the expense of interpolation, causing the pathpoints to work as "control polygon" of an approximating spline or Bezier curve. We can discuss further here or with the group or expose a knob to tune/experiment. Let me know what you prefer.

aymanhab commented 7 years ago

Can't get the closeup with bad muscle rendering using off the shelf gait10dof18musc. Was that after some other path point editing? Thanks.

tkuchida commented 7 years ago

Can't get the closeup with bad muscle rendering using off the shelf gait10dof18musc.

I can. To reproduce:

muscles

aymanhab commented 7 years ago

I don't see missing faces or self intersecting muscles in this image. The red cubes on the caps are Pathpoints that I left visible (for debugging purposes), the rest is just natural occlusion between muscles and bones. Hiding the bones should make that clear. There's possibly an issue with editing but this specific capture seems ok to me, unless I'm looking at the wrong spot in the image. If the muscle has wrapping it's a different story though 🚑

tkuchida commented 7 years ago

I have drawn green circles around the areas that I think could be improved: muscle1

Here is the same model but after making the following changes:

tkuchida commented 7 years ago

Switching to wireframe, it looks like it might be an issue with inconsistent vertex numbering between the endcap and the last cylinder: muscle

aymanhab commented 7 years ago

I think it's an issue with the via point on this muscle (which has fixed, via, moving pathpoints) since changing the knee_angle to the range where the via point is inactive fixes the problem! Thank you for the find.

aymanhab commented 7 years ago

This boils down to degenerate/coincident points causing flipped quaternions due to singularity. How do we make sure the quaternions computed along path are consistent @aseth1 ?

aymanhab commented 7 years ago

Not in 0829 build

jenhicks commented 7 years ago

@aymanhab By "Not in 0829 build" does that mean this issue is not ready to be verified in the posted betas on simtk?

aymanhab commented 7 years ago

Yes Jen. I just moved it to reduce clutter. That's true for a handful of issues of the 60+ under needs verification.

On Thu, Sep 21, 2017 at 4:11 PM, Jen Hicks notifications@github.com wrote:

@aymanhab https://github.com/aymanhab By "Not in 0829 build" does that mean this issue is not ready to be verified in the posted betas on simtk?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opensim-org/opensim-gui/issues/311#issuecomment-331306462, or mute the thread https://github.com/notifications/unsubscribe-auth/ADyccIQVpUcn0nweqLoY6lgTkQ_9IGg0ks5sku0FgaJpZM4Ob_65 .

jenhicks commented 6 years ago

I am not able to produce the visualization issues that Tom noted in the latest build.

aymanhab commented 6 years ago

Yes, these were due to incorrect normals along the path of the muscle that were fixed. @tkuchida can verify if seen recently. Also at some point we had blending weights that didn't add up to 1 for perceived smoother display, but these caused other artifacts and were removed as well.

tkuchida commented 6 years ago

Yes, these were due to incorrect normals along the path of the muscle that were fixed. @tkuchida can verify if seen recently. Also at some point we had blending weights that didn't add up to 1 for perceived smoother display, but these caused other artifacts and were removed as well.

Verified that muscle cylinders (1) no longer have holes, and (2) pass through all path points. I've opened a separate Issue about adding endcaps (#581). AppVeyor artifact OpenSim-e7831221-2018-03-06.zip