Jump to content

Babylon Exporter Issue for Blender


AshishS321
 Share

Recommended Posts

The exporter requires that all armatures of an exported mesh be on a Blender Layer that is currently visible.  Your armature is on Layer 11.  Though I ran this on the JS exporter, first pass results are nearly identical.  With layers 1 & 11 selected (since this is not your .blend, I would select them all & delete any unwanted stuff), I get this log file below.  Notice it is now processing a skeleton.  With the skeleton now being included, you now encounter a problem with the mesh named 'BezierCurve.005'.  You will also need to apply tranforms on that mesh, since it is using the skeleton.

========= Conversion from Blender to Babylon.js =========
Scene settings used:
selected layers only:  false
flat shading entire scene:  false
inline textures:  false
texture directory:  C:\Users\JEFFPA~1\AppData\Local\Temp\
Python World class constructor completed
processing begun of skeleton:  Armature, id:  0
processing begun of bone:  ik.L, index:  0
processing begun of bone:  sigue_ik.L, index:  1
processing begun of bone:  rot.L, index:  2
processing begun of bone:  Bone.001, index:  3
processing begun of bone:  Bone.002, index:  4
processing begun of bone:  mueve_guia, index:  5
processing begun of bone:  ik_pozo, index:  6
processing begun of bone:  soga1, index:  7
processing begun of bone:  soga2, index:  8
processing begun of bone:  soga3, index:  9
processing begun of bone:  soga4, index:  10
processing begun of bone:  soga5, index:  11
processing begun of bone:  soga_ik, index:  12
processing action Action:  in[0 - 1], out[0 - 1]
processing action Action.044:  in[0 - 1], out[10 - 11]
processing action ArmatureAction:  in[0 - 100], out[20 - 120]
processing action Cylinder.042Action:  in[0 - 100], out[130 - 230]
processing action Cylinder.043Action:  in[0 - 100], out[240 - 340]
processing begun of mesh:  Plane.015
processing begun of Standard material:  Material
num positions      :  81
num normals        :  81
num uvs            :  0
num uvs2           :  0
num colors         :  0
num indices        :  384
WARNING: The following object (type - CURVE) is not currently exportable thus ignored: BezierCurve.006
processing begun of mesh:  Cylinder.095
processing begun of baked material:  Cylinder.095
Smart Projection time: 0.06
Cycles baking texture, type: NORMAL, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
num positions      :  1185
num normals        :  1185
num uvs            :  2370
num uvs2           :  0
num colors         :  0
num indices        :  3816
processing begun of mesh:  Plane.008
processing begun of baked material:  Plane.008
Smart Projection time: 0.00
Cycles baking texture, type: NORMAL, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
num positions      :  2049
num normals        :  2049
num uvs            :  4098
num uvs2           :  0
num colors         :  0
num indices        :  4788
processing begun of mesh:  Cube.012
processing begun of Standard material:  naraja
num positions      :  96
num normals        :  96
num uvs            :  0
num uvs2           :  0
num colors         :  0
num indices        :  528
processing begun of mesh:  Cube.011
processing begun of baked material:  Cube.011
Smart Projection time: 0.00
Cycles baking texture, type: NORMAL, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
num positions      :  2546
num normals        :  2546
num uvs            :  5092
num uvs2           :  0
num colors         :  0
num indices        :  7296
processing begun of mesh:  Cube.010
registered as also a user of material:  naraja
num positions      :  8636
num normals        :  8636
num uvs            :  0
num uvs2           :  0
num colors         :  0
num indices        :  51840
processing begun of mesh:  Cube.018
processing begun of baked material:  Cube.018
Smart Projection time: 0.00
Cycles baking texture, type: NORMAL, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
num positions      :  380
num normals        :  380
num uvs            :  760
num uvs2           :  0
num colors         :  0
num indices        :  552
processing begun of mesh:  Cube.017
processing begun of baked material:  Cube.017
Smart Projection time: 0.00
Cycles baking texture, type: NORMAL, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
num positions      :  278
num normals        :  278
num uvs            :  556
num uvs2           :  0
num colors         :  0
num indices        :  684
processing begun of mesh:  Cube.016
processing begun of baked material:  Cube.016
Smart Projection time: 0.00
Cycles baking texture, type: NORMAL, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
num positions      :  978
num normals        :  978
num uvs            :  1956
num uvs2           :  0
num colors         :  0
num indices        :  1788
processing begun of mesh:  Cube.015
mesh is an instance of :  Cube.017.  Processing halted.
processing begun of mesh:  Plane.002
processing begun of baked material:  Plane.002
Smart Projection time: 0.00
Cycles baking texture, type: NORMAL, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
num positions      :  307
num normals        :  307
num uvs            :  614
num uvs2           :  0
num colors         :  0
num indices        :  552
processing begun of mesh:  Plane.001
mesh is an instance of :  Plane.002.  Processing halted.
processing begun of mesh:  Cylinder.061
processing begun of baked material:  Cylinder.061
Smart Projection time: 0.02
Cycles baking texture, type: NORMAL, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
num positions      :  890
num normals        :  890
num uvs            :  1780
num uvs2           :  0
num colors         :  0
num indices        :  2496
processing begun of mesh:  Cylinder.057
mesh is an instance of :  Cylinder.061.  Processing halted.
processing begun of mesh:  Cylinder.102
processing begun of baked material:  Cylinder.102
Smart Projection time: 0.01
Cycles baking texture, type: NORMAL, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
num positions      :  620
num normals        :  620
num uvs            :  1240
num uvs2           :  0
num colors         :  0
num indices        :  1536
processing begun of mesh:  Cylinder.104
processing begun of Standard material:  Base Node VU
num positions      :  161
num normals        :  161
num uvs            :  0
num uvs2           :  0
num colors         :  0
num indices        :  480
processing begun of mesh:  Cylinder.103
processing begun of baked material:  Cylinder.103
Smart Projection time: 0.00
Cycles baking texture, type: NORMAL, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
num positions      :  332
num normals        :  332
num uvs            :  664
num uvs2           :  0
num colors         :  0
num indices        :  912
processing begun of mesh:  BezierCurve.005
registered as also a user of material:  Base Node VU
num positions      :  1400
num normals        :  1400
num uvs            :  0
num uvs2           :  0
num colors         :  0
num indices        :  8232
Skeleton stats:
Total Influencers:  7392
Avg # of influencers per vertex:  5.28
Highest # of influencers observed:  7, num vertices with this:  196
exported as 7 influencers
num skeletonWeights and skeletonIndices:  11200
Mesh: BezierCurve.005 has un-applied transformations.  This will never work for a mesh with an armature.  Export cancelled
========= end of processing =========
elapsed time:  0 min, 11.1391 secs

 

Link to comment
Share on other sites

For apply transforms, in Blender, it is good to get into the habit (before every export) of selecting Armature and Mesh then going to the menu Object -> Apply -> Location & Rotation & Scale.

RTS (rotation, translation, scale) apply, taught by JCP. Thx.  If that is not done, the symptom is:  bones are not in the same position as the mesh, etc. :)

 

Link to comment
Share on other sites

13 minutes ago, aFalcon said:

For apply transforms, in Blender, it is good to get into the habit (before every export) of selecting Armature and Mesh then going to the menu Object -> Apply -> Location & Rotation & Scale.

RTS (rotation, translation, scale) apply, taught by JCP. Thx.  If that is not done, the symptom is:  bones are not in the same position as the mesh, etc. :)

 

Actually for the .JS & .BABYLON exporters, I got tired of dealing with the same symptoms. I now just flat out say what the problem is an cancel the export.  Too much time was being wasted.

Link to comment
Share on other sites

Ah, that is the message in Blender: "This would never work! Export Canceled." Saw that a time or two working on another thread... thanks for that. :)

 

@JCPalmer - if I wasn't mistaken -> an IK bone has no children on .babylon import (ver 5.4.2)?

Reason being, animating a child bone of an IK bone, works in blender, but then does nothing after export/import!

Amazingly, solution was -> attach to Kinesthetic bone... child animation exports.

Can only deduce that .babylon export does not export IK children / or animations not picked up on IK bones?

Any insights? Curious...

Thx.

 

Link to comment
Share on other sites

There is a custom switch in the scene level properties to ignore the bones on export.  The trigger I use to detect is finding either '.ik' or 'ik.' in the name of the bone.  IK bones themselves do not, probably should not, deform vertices.  Cannot use the 'Deforms' checkbox property to detect however.  Many rigs have root bones which do not have any verts they deform.

The purpose of this is to reduce overhead in the BJS environment ditching unneeded bone during export (critical for iOS).  All the tutorials I have seen is where people add bones to otherwise complete rigs.  For arms / legs they add a bone to steer the knee / elbow.  The IK constraint is put on the lower arm / leg bone, but the sub-target bone gets the IK name, so it does not come through.  See below. 

FYI, @adam the reason I had so much problem with pole target in the BJS implementation (beyond bendaxis) is as long as the 2 bones in the chain are not completely straight with each other, there is no need for a pole target.  Blender just figures it out.  The sub-target just gives a little more control.

ikArm.jpg.0c4da299a72fdff3ad2c8137ea64d374.jpg

The problem you may be having sounds like foot / wrist.  For that another bone is added, with IK name, which is connected to lower arm.  In b-bone appearance it surrounds the original foot / wrist bone.  You move this bone around, and put a copy rotation constraint on the foot wrist.  Cannot remember what this fixes, other than the real wrist has location locked.

ikHand.jpg.3036072597f21a94bde7ebe07721ce1b.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...