xrfeitoria icon indicating copy to clipboard operation
xrfeitoria copied to clipboard

blank image and mask using sample 05_skeletalmesh_render

Open chuanfushen opened this issue 1 year ago • 9 comments

Thanks for the great render tool. I meet two issues when I use this repo.

  1. Blender 4 is not functioning with CLI, CLI works after downgrade to Blender 3.6.
  2. 05_skeletalmesh_render output blank image and mask, I guess it cause by camera position.

Have any idea to swap camera position correctly?

chuanfushen avatar Oct 12 '24 04:10 chuanfushen

https://github.com/user-attachments/assets/9fc95cad-13a0-45a4-98d3-5372647d582a

chuanfushen avatar Oct 12 '24 04:10 chuanfushen

Thanks for the great render tool. I meet two issues when I use this repo.

  1. Blender 4 is not functioning with CLI, CLI works after downgrade to Blender 3.6.
  2. 05_skeletalmesh_render output blank image and mask, I guess it cause by camera position.

Have any idea to swap camera position correctly?

For Q1, sorry we haven't adapted to Blender 4. Will do in future updates. For Q2, it seems like the size of the mesh went wrong? Did you delete the armature, or the scale of armature/mesh was changed?

HaiyiMei avatar Oct 12 '24 04:10 HaiyiMei

Thanks for the great render tool. I meet two issues when I use this repo.

  1. Blender 4 is not functioning with CLI, CLI works after downgrade to Blender 3.6.
  2. 05_skeletalmesh_render output blank image and mask, I guess it cause by camera position.

Have any idea to swap camera position correctly?

For Q1, sorry we haven't adapted to Blender 4. Will do in future updates. For Q2, it seems like the size of the mesh went wrong? Did you delete the armature, or the scale of armature/mesh was changed?

Thanks for the quick reply. I did not change any thing in 05_skeletalmesh_render.py

chuanfushen avatar Oct 12 '24 04:10 chuanfushen

The log is here:

2024-10-12 12:29:13 |   INFO   | >>>> Created sequence "Sequence_skeletal_mesh" >>>>
2024-10-12 12:29:15 |   INFO   | Imported actor "XF-actor-001" in sequence "Sequence_skeletal_mesh"
2024-10-12 12:29:16 |   INFO   | Imported animation from "/home/noah/.tmp/XRFeitoria/assets/motion_2/motion-stand_to_walk_back.fbx" and setup for actor "XF-actor-001"
2024-10-12 12:29:16 |   INFO   | Frame 0: (0.36699867248535156, -1.4538993835449219, 81.80113515257835), [90.00000250447816, -0.0, 0.0]
2024-10-12 12:29:17 |   INFO   | Frame 1: (0.36699867248535156, -1.4538993835449219, 81.80113515257835), [90.00000250447816, -0.0, 0.0]
2024-10-12 12:29:17 |   INFO   | Frame 2: (0.36699867248535156, -1.4538993835449219, 81.80113515257835), [90.00000250447816, -0.0, 0.0]
2024-10-12 12:29:18 |   INFO   | Frame 3: (5.156768798828125, -3.808049201965332, 81.21185827255249), [90.00000250447816, -0.0, 0.0]
2024-10-12 12:29:18 |   INFO   | Frame 4: (5.186122894287109, -3.861363410949707, 81.19388544559479), [90.00000250447816, -0.0, 0.0]
2024-10-12 12:29:18 |   INFO   | Frame 5: (5.138500213623047, -3.907505989074707, 81.19095873832703), [90.00000250447816, -0.0, 0.0]
2024-10-12 12:29:19 |   INFO   | Frame 6: (5.141101837158203, -3.953634262084961, 81.17642498016357), [90.00000250447816, -0.0, 0.0]
2024-10-12 12:29:19 |   INFO   | Frame 7: (5.232082366943359, -3.998143196105957, 81.15795302391052), [90.00000250447816, -0.0, 0.0]
2024-10-12 12:29:20 |   INFO   | Frame 8: (5.246793746948242, -4.026642799377441, 81.15489113330841), [90.00000250447816, -0.0, 0.0]
2024-10-12 12:29:20 |   INFO   | Frame 9: (5.318752288818359, -4.0278425216674805, 81.15383088588715), [90.00000250447816, -0.0, 0.0]
2024-10-12 12:29:20 |   INFO   | Frame 10: (5.417795181274414, -4.03562068939209, 81.14349436759949), [90.00000250447816, -0.0, 0.0]

chuanfushen avatar Oct 12 '24 04:10 chuanfushen

By comment the below line: https://github.com/openxrlab/xrfeitoria/blob/a06a9fab9237d4287c09790ad3d8c76dbcdf8a99/samples/blender/05_skeletalmesh_render.py#L44

Then I can obtain image and mask correctly. The log is:

2024-10-12 13:09:32 |   INFO   | Frame 0: (4.172325134277344e-07, -1.9833360016345978, 0.8465720536187291), [90.00000250447816, -0.0, 0.0]
2024-10-12 13:09:32 |   INFO   | Frame 1: (4.172325134277344e-07, -1.9833360016345978, 0.8465720536187291), [90.00000250447816, -0.0, 0.0]
2024-10-12 13:09:33 |   INFO   | Frame 2: (4.172325134277344e-07, -1.9833360016345978, 0.8465720536187291), [90.00000250447816, -0.0, 0.0]
2024-10-12 13:09:33 |   INFO   | Frame 3: (4.172325134277344e-07, -1.9833360016345978, 0.8465720536187291), [90.00000250447816, -0.0, 0.0]
2024-10-12 13:09:34 |   INFO   | Frame 4: (4.172325134277344e-07, -1.9833360016345978, 0.8465720536187291), [90.00000250447816, -0.0, 0.0]
2024-10-12 13:09:34 |   INFO   | Frame 5: (4.172325134277344e-07, -1.9833360016345978, 0.8465720536187291), [90.00000250447816, -0.0, 0.0]
2024-10-12 13:09:35 |   INFO   | Frame 6: (4.172325134277344e-07, -1.9833360016345978, 0.8465720536187291), [90.00000250447816, -0.0, 0.0]
2024-10-12 13:09:35 |   INFO   | Frame 7: (4.172325134277344e-07, -1.9833360016345978, 0.8465720536187291), [90.00000250447816, -0.0, 0.0]
2024-10-12 13:09:36 |   INFO   | Frame 8: (4.172325134277344e-07, -1.9833360016345978, 0.8465720536187291), [90.00000250447816, -0.0, 0.0]
2024-10-12 13:09:36 |   INFO   | Frame 9: (4.172325134277344e-07, -1.9833360016345978, 0.8465720536187291), [90.00000250447816, -0.0, 0.0]
2024-10-12 13:09:37 |   INFO   | Frame 10: (4.172325134277344e-07, -1.9833360016345978, 0.8465720536187291), [90.00000250447816, -0.0, 0.0]

chuanfushen avatar Oct 12 '24 05:10 chuanfushen

I note the actor dimensions are changed after apply animation on actor. Before setup_animation, actor dimension: [1.7016124725341797, 0.4657714068889618, 1.7434768434613943] After setup_animation, actor dimension: [58.944583892822266, 53.11455154418945, 165.30269795656204]

chuanfushen avatar Oct 12 '24 05:10 chuanfushen

That's Great. Help me a lot!

ChangYuance avatar Sep 12 '25 07:09 ChangYuance

But, in my view, in the code "-2" should be "-2*100", because of the 100 times relation. And the actor will walk normally.

ChangYuance avatar Sep 12 '25 09:09 ChangYuance

lIke this: camera_location = (actor_location[0], actor_location[1] - 2*100, actor_location[2])

ChangYuance avatar Sep 12 '25 10:09 ChangYuance