Question on recommended file format for model and actor

Hello all. I need some help on my project which uses panda3d for animation. Initially when i started i used egg files only and it was very easy to export to egg from Blender 2.7 (1 year back).
My stack so far was: make model in Makehuman, export as mhx2, load in blender 2.7, apply BVH files, export as egg.

But now Blander is in 2.9, egg export is not possible. I can create gltf/ bam files just fine, but i could not find a way to load it in Panda3d (meaning documentation says: Actor(actor_model, {‘act’: animation_file}, but there is only single gltf/bam file getting generated in Blender 2.9). So how can i load an actor+action in gltf?

Also, i read from your all discussions that BAM is the preferred format for Panda3d. A follow up question is what is the recommended way of creation of egg/ BAM files? is it via Blander or some other way or tool?

Thanks in advance for response.

You’re probably best off using blend2bam. panda3d-blend2bam · PyPI

Here’s my currently working Actor exporting script:

blend2bam -m pbr --pipeline gltf --animations separate npc_1_animated.blend npc_1.bam

Note that this makes separate .bam files for the mesh and Armature Action. Only apply the .bam ‘ArmatureAction’ file resulting from the blend2bam command line converter program to it’s corresponding .bam mesh, using the Actor system.

A few of us are working on new exporters, including a proper .bam exporter, but these are for the most part experimental projects right now.

Here’s a recent thread with some details: Exporting from Blender: A Quick-Reference

1 Like

Thanks for help buddy. I tried and everything else looks OK except the textures are missing (skin/ shoes etc. are replaced by white). I tired with both -m legacy and pbr.
I used to see this issue in Blender 2.79 and then had to manually correct the “/.tex” folder mention in egg file, but this being bam not sure how to correct it. Please help me if you can guess what i am doing wrong. Here is the output from command exec:
Auto-detected Blender installed at C:\Program Files\Blender Foundation\Blender 2.92
Blender 2.92.0 (hash 02948a2cab44 built 2021-02-25 09:31:14)
Read prefs: C:\Users\pc\AppData\Roaming\Blender Foundation\Blender\2.92\config\userpref.blend
Loading MH community plug-in v 1.1.0
Loading sync plug-in
sync plug-in loaded
Loading kinect Sensor plug-in
kinect Sensor plug-in loaded
MH community plug-in load complete
C:\Users\pc\AppData\Roaming\Blender Foundation\Blender\2.92\makehuman.default.settings.json
Loading BVH Retargeter
BVH Retargeter loaded
srcroot: C:\ProgramData\Memeer
Exporting: [‘C:\ProgramData\Memeer\untitled.blend’]
Export to: C:\Users\pc\AppData\Local\Temp
Read blend: C:\ProgramData\Memeer\untitled.blend
Converting .blend file (C:\ProgramData\Memeer\untitled.blend) to .gltf (C:\Users\pc\AppData\Local\Temp\untitled.gltf)
{‘FINISHED’}
Info: Applied modifier was not first, result may not be as expected
Info: Applied modifier was not first, result may not be as expected
{‘FINISHED’}
Info: Applied modifier was not first, result may not be as expected
Info: Applied modifier was not first, result may not be as expected
{‘FINISHED’}
Info: Applied modifier was not first, result may not be as expected
Info: Applied modifier was not first, result may not be as expected
{‘FINISHED’}
‘C:\Program Files\Blender Foundation\Blender 2.92\2.92\python\lib\site-packages\extern_draco.dll’ exists, draco mesh compression is available
05:12:31 | INFO: Starting glTF 2.0 export
05:12:31 | INFO: Extracting primitive: humanBodyMesh
05:12:32 | INFO: Primitives created: 1
05:12:32 | WARNING: There are more than 4 joint vertex influences.The 4 with highest weight will be used (and normalized).
05:12:32 | INFO: Extracting primitive: human.HighPolyEyesMesh
05:12:32 | INFO: Primitives created: 1
05:12:34 | INFO: Finished glTF 2.0 export in 2.4853274822235107 s
is there some way to check the bam file (for correctness)?
EDIT: I tried the --textures options as embed, copy and ref, still same result

Pretty dumb of me :slight_smile:
It was my bad, new to Blender 2.92 and MH plugins. So the issue was that i have not yet added the separate skin to model and hence white skin. Now added shoes and all, and its looks OK now.
Thanks Simulan :slight_smile:

1 Like

Hello all, i think i will need some more help here.
I added some skin (special suite in makehuman), shoes and hairs etc. It was loaded in Blender 2.92, when clicking on “Shading” tab, i can see the skin is shown correctly. I closed and reopen the blend file and skin is there. Now when i save the blend file and run blend2bam, all else is shown properly (like shoes, hair, clothes), but the skin is still not shown. I tried all the options in blend2bam (like material mode, with and without no-srgb, texture options, but the actual skin is not there.
When i used bam2egg, the diffuse png for skin is not present. Any help will be highly appreciated, I just do not know why skin is getting missed between blend to bam? Here is the command output:
C:\ProgramData\Memeer>blend2bam -m pbr --pipeline gltf --animations skip --texture copy humans\test.blend humans\test.bam
Auto-detected Blender installed at C:\Program Files\Blender Foundation\Blender 2.92
Blender 2.92.0 (hash 02948a2cab44 built 2021-02-25 09:31:14)
Read prefs: C:\Users\pc\AppData\Roaming\Blender Foundation\Blender\2.92\config\userpref.blend
Loading MH community plug-in v 0.7.0
Loading sync plug-in
sync plug-in loaded
Loading kinect Sensor plug-in
kinect Sensor plug-in loaded
MH community plug-in load complete
C:\Users\pc\AppData\Roaming\Blender Foundation\Blender\2.92\makehuman.default.settings.json
Loading BVH Retargeter
BVH Retargeter loaded
srcroot: C:\ProgramData\Memeer\humans
Exporting: [‘C:\ProgramData\Memeer\humans\test.blend’]
Export to: C:\Users\pc\AppData\Local\Temp
Read blend: C:\ProgramData\Memeer\humans\test.blend
Converting .blend file (C:\ProgramData\Memeer\humans\test.blend) to .gltf (C:\Users\pc\AppData\Local\Temp\test.gltf)
‘C:\Program Files\Blender Foundation\Blender 2.92\2.92\python\lib\site-packages\extern_draco.dll’ exists, draco mesh compression is available
19:57:11 | INFO: Starting glTF 2.0 export
19:57:11 | INFO: Extracting primitive: eyebrow005Mesh
19:57:11 | INFO: Primitives created: 1
19:57:11 | WARNING: More than one shader node tex image used for a texture. The resulting glTF sampler will behave like the first shader node tex image.
19:57:11 | INFO: Extracting primitive: HeelSandalMesh
19:57:11 | INFO: Primitives created: 1
19:57:11 | WARNING: More than one shader node tex image used for a texture. The resulting glTF sampler will behave like the first shader node tex image.
19:57:11 | INFO: Extracting primitive: HighPolyEyesMesh
19:57:11 | INFO: Primitives created: 1
19:57:11 | WARNING: More than one shader node tex image used for a texture. The resulting glTF sampler will behave like the first shader node tex image.
19:57:11 | INFO: Extracting primitive: ponytail01Mesh
19:57:11 | INFO: Primitives created: 1
19:57:11 | WARNING: More than one shader node tex image used for a texture. The resulting glTF sampler will behave like the first shader node tex image.
19:57:12 | INFO: Extracting primitive: Teeth_BaseMesh
19:57:12 | INFO: Primitives created: 1
19:57:12 | WARNING: More than one shader node tex image used for a texture. The resulting glTF sampler will behave like the first shader node tex image.
19:57:12 | INFO: Extracting primitive: tongue01Mesh
19:57:12 | INFO: Primitives created: 1
19:57:12 | WARNING: More than one shader node tex image used for a texture. The resulting glTF sampler will behave like the first shader node tex image.
19:57:12 | INFO: Extracting primitive: ElisabethBodyMesh
19:57:12 | INFO: Primitives created: 5
19:57:12 | INFO: Finished glTF 2.0 export in 1.4194674491882324 s
Blender quit
C:\ProgramData\Memeer>

It says “Extracting primitive: ElisabethBodyMesh” but when i use the bam (either with double click or with a p3d code) it is missing!

So all the textures export okay, with only the skin texture missing?

Without other information, I’d say that it’s something to do with how the skin texture is set up in Blender. I understand this may not be much help though :slight_smile:

1 Like

Sorry i missed to add on this message yesterday, Actually yes you are right, only skin was missing while all the other textures (shoes hairs were fine) and it is indeed MH plugin to blame for this. I was planning to add my solution here just in case someone have this same issue, because it is weird the way it happens and seems to be a bug (or undocumented feature, or my general incompetency at reading documentation) in Blender-MH import functionality (I am planning to submit same in the plugin page also).
So here is what was the status:

  1. Create gltf from blender (normal export) and view it in Windows 3d viewer - skin is missing, rest all OK - the problem could not be blend2bam as gltf export is from Blender
  2. In Blender shading tab, the skin is shown, which means blender do have the skin, but could not pass it on.
  3. convert bam to egg (bam2egg) - no mention of skin texture image in egg file
  4. pview also shows missing skin

To make it work, i had to follow the following sequence:

  1. setup model in MakeHuman (1.2)
  2. In blender, control+n → general
  3. Delete cube, camera and lightning (else texture will be b/w cartoonish)
  4. in Blender’s MakeHuman tab, click on settings, under extras, uncheck “Enhanced skin material”, click on “Use makeskin” (install makeskin plugin if not already). make sure “what to import” is body parts and clothes.
  5. Under “various”, change unit to Decimeter (else model will be horzontally streched in animation).
  6. Under presets, first click Save then load (first clicking load and then save just do not help for some reason :slight_smile: )
  7. Now under “mesh” tab, import human and save it in blend.
  8. Do the standard conversion from blend2bam or export to gltf or go out to play (following covid guidelines) or anything you are interested in. But thou shall not “sync with HM”, load and save shall not be done, thou shall not change what to import, or just linger there any longer than required by the governing laws of physics and society.

Honestly, i was doing a lot of shotgun debugging, so could have changed a few things which i do not remember, but this is what i am doing now. Hope this helps someone!

Cheers.

3 Likes