Jump to content

how to check if mesh have uv?


DigiHz Data
 Share

Recommended Posts

When creating meshes from within BJS the uv's are created for that mesh, right.

But sometimes when getting meshes done with eg: blender, there might not be an uv's.

How to check if a mesh has uv's or not?

Edit!

I mean....can we check in the DOM if uv's exist for a particular mesh?

Link to comment
Share on other sites

Thank you DK.

That seams to work. (It returns true or false)

Just to clarify to others.....

if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.UVKind)){
       console.log('Mesh have uv');//true
}else{
       console.log('Mesh NOT have uv');//false
 }

Additional:

Am i right to asume that....If mesh not have uv's, then there can not be any texture applied to that mesh?

(A material can be applied of course). But if the material have texture(s) and the mesh NOT have uv's, then the texture is not applied/shown on that mesh?

 

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