Forum Replies Created
-
AuthorPosts
-
25 January 2021 at 03:18 in reply to: [SOLVED] SofaPython3 pygame rendering example not working #18383beichunBlocked
Hi, any updates on this?
I saw the pygame example is removed from SofaPython3 repo. I wonder if there is any workaround if I still want to use the same feature.beichunBlockedProblem solved 🙂
I managed to convert the mesh, by converting the finger.stl to finger.msh using gmsh (needed to use format version 2, the default version 4 doesn’t work).beichunBlockedHi,
I’m also having the same problem. Would like to hear any update! Is the mesh updated @epernod ?15 January 2021 at 07:18 in reply to: [SOLVED] SofaPython3 pygame rendering example not working #18234beichunBlockedHi @Hugo,
Thanks for your reply.
I’m using the master branch for both SOFA and SofaPython3.beichunBlockedIt works nicely. Thank you!
I want to ask another question, how do I set the up direction of camera? Although my orientation is correct, the rendered view is upside down.
beichunBlockedI found that I have to use the opengl viewer (Sofa.Gui.GUIManager.Init(“MyScene”, “qt)) in order to make the interactiveCamera work.
However, I still cannot set the right camera orientation. I received the following warning:
[WARNING] [InteractiveCamera(camera)] Could not read value for data field orientation: array([0.70710678, 0. , 0. , 0.70710678])
The code I used to set the camera is:
from scipy.spatial.transform import Rotation as R cam_lookAt = [0, 0, 0] cam_orientation = R.from_euler("x", np.pi/2).as_quat() self.root.addObject("InteractiveCamera", name="camera", orientation=cam_orientation, lookAt=cam_lookAt, distance=100, fieldOfView=66, zNear=-10, zFar=55.69)
Any advice?
beichunBlockedI would also like to know any suggestions on this (I’m using SofaPython3)!
-
AuthorPosts