- This topic has 5 replies, 2 voices, and was last updated 3 years, 8 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › [SOLVED] visualizing the difference between two models as a hot plot
Tagged: Linux_ubuntu, SOFA_other
Hi,
Is there any option in SOFA for visualizing the difference between two FEM models as a hot plot?
Best,
Zahra
Hi Zahra,
if I understand correctly your question, what you are looking for is similar to this scene: https://github.com/sofa-framework/sofa/blob/master/examples/Components/visualmodel/DataDisplay.scn
A combination of EvalPointsDistance, DataDisplay and OglColorMap components.
Does it make the trick?
Alex
Hi Alex,
Your comment saved me lots of time, thank you. This is exactly what I needed (Sorry for the delayed feedback).
Best,
Zahra
Dear Alex,
There is a problem with the scene you recommended: the surface of the grid is colorful on one side and black on the other side. This is problematic because When I apply the method on a 3D object like a liver, the color of the outer side of liver is black and its inside is colorful. I have investigated options of the DataDisplay and OglColorMap components to fix this but the problem persists. Do you have any suggestion for this?
Zahra
I did not find any component parameter to do what you want.
However, as an immediate workaround, I suggest you two options:
1. Re-order the indices of the faces of your liver, so that the triangle normals are the opposite of the current ones. Blender or MeshLab can help you to do that.
2. In DataDisplay.cpp, change all the glMaterialfv(GL_FRONT,…) to glMaterialfv(GL_FRONT_AND_BACK,…) and recompile.
I hope it helps
Alex
Hi Alex,
Your suggestions solved the issue, thank you very much.
Best,
Zahra
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.