Jump to content

3ds Max exporting three times the number of vertices


gamefan
 Share

Recommended Posts

Greetings,

 

This is my first post here but I have been using babylon.js for a while.

 

As the subject explains I am not sure if this is intended. My designer colleague creates a simple cube and exports the babylon file. When I open the file in the browser I get 24 vertices when the mesh is "optimized" and 36 when not.

 

A cube when created in blender and exported creates 8 vertices which is the expected number. The general idea is to reduce the number of vertices for performance. Can anyone throw some light on this?

 

Thanks In Advance

Link to comment
Share on other sites

Thank you for your reply.

 

So each vertex contains 3 vectors. But why the difference in blender and max? Could I be missing something on blender?

 

I have a mesh that is supposed to contain 10 position vertices.

 

Querying this returns array of 90 length:

App.scene.getMeshByName('roofing3').getVerticesData('position').length;

which explains 30 vectors[x,y,z](1position and 2 normals)

 

Querying this also returns array of 90 length:

App.scene.getMeshByName('roofing3').getVerticesData('normal').length;

 

Shouldn't they have returned different lengths?

 

Please master, enlighten me :)

Link to comment
Share on other sites

So each vertex contains 3 vectors.

What? The information you export for a vertices is variable, though position, normal and color are usual I guess... that's 3 vectors, is that what you are confirming?

If you are asking about the reason there are 24 verts... it's nothing to do with that. it's because normals are per vertex not per face. So for an object with flat shaded faces the normals for the edges of the faces can't be shared; and even though the vertices for the edges/corners of each face occupy the same position for as the vertices for neighbouring faces they must be duplicated for the adjacent faces because the normals point in different directions (if your still having trouble with this Google it for a pic or possibly ask your modeller to show you)

TLDR: creases/hard edges in models need duplicated vertices, as does any discontinuity in a property you are exporting (eg. could be a crease in UV wrapping in a textured model)

 

But why the difference in blender and max? Could I be missing something on blender?

There should be 24 verts from Blender too... sounds like you messed up smoothing or normals or merging verts or something (ie. the shading on a cube with only 8 verts will look quite wrong)

 

I have a mesh that is supposed to contain 10 position vertices.

What do you mean by a "position vertex"?
Link to comment
Share on other sites

Now I understand. Thanks a lot.

 

There should be 24 verts from Blender too... sounds like you messed up smoothing or normals or merging verts or something (ie. the shading on a cube with only 8 verts will look quite wrong)

I does look wrong. Never gave a thought to that, was too concerned with the numbers.

 

What do you mean by a "position vertex"?

 

I meant points.

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