Jump to content

mesh.getTotalVertices()


pabitel
 Share

Recommended Posts

Hi,

 

I'm new to Babylon JS. I have a model that I would like to perform some vertex animation, but I have a problem. In both Blender and Lightwave the model has 9,856 vertices, but after loading the mesh from the Blender-generated .babylon file through ImportMesh(), getTotalVertices() returns 10,400 vertices.

Can anyone explain the discrepancy?

Thank you.

Link to comment
Share on other sites

  • 2 weeks later...

Oh, not only do we need to show you where the end of the rainbow is, but now you want us to haul your pot of gold, too?  ;)

heh.  Sounds like you need to investigate 'subMesh'.  Or meshMerge.  Or... just get back to using .parent like a nice young man.  :)

Find a class called 'vertexData'.  It is the "assembler" for all the mesh primitives.  There's TONS to be learned from that class.  It does all the work for Babylon.Mesh.Createxxx().  Notice there is Babylon.Mesh, and Babylon.MeshBuilder.  MeshBuilder does some nice stuff.

Are you still disassembling Node class?  Is your dog watching you?  Does it look like it thinks you are crazy?  :)

All in all, setVerts, getVerts, normals, uvs, colors (per vertex), indices... all are built via arrays on vertexData objects.  It's a nice factory.  :)  Remember to set your mesh updatable = true... if you are about to go mesh-morphing.

 

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...