DigiHz Data Posted July 8, 2016 Share Posted July 8, 2016 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? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 8, 2016 Share Posted July 8, 2016 Yes you can mesh.isVerticesDataPresent(BABYLON.VertexBuffer.UVKind) Quote Link to comment Share on other sites More sharing options...
DigiHz Data Posted July 8, 2016 Author Share Posted July 8, 2016 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? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 10, 2016 Share Posted July 10, 2016 Correct (except for reflection and refraction textures which use self generated coordinates) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.