tham_kathy Posted September 8, 2018 Share Posted September 8, 2018 I need to apply a texture to the customMesh. But it's showing me an error message saying "Vertex buffer is not big enough for the draw call" The code I wrote is below. var wall_color = new BABYLON.StandardMaterial("wall_color", scene); wall_color.diffuseTexture = new BABYLON.Texture("http://i.imgur.com/Vw4fzwq.jpg", scene); build.material = wall_color; The code I apply the above lines is; http://www.babylonjs-playground.com/#4GBWI5 Need help to solve this problem. Appreciate your help. Quote Link to comment Share on other sites More sharing options...
Gijs Posted September 8, 2018 Share Posted September 8, 2018 You need to provide the uv data, it's empty in your code Quote Link to comment Share on other sites More sharing options...
tham_kathy Posted September 8, 2018 Author Share Posted September 8, 2018 I tried with different uv values but the texture is not appearing as it is. The way I calculated uv values is; var uvs = []; for(var p = 0; p < positions.length / 3; p++) { uvs.push((positions[3 * p] - (-4)) / 6, (positions[3 * p + 1] - (-4)) / 8); } Can you please suggest me a way to apply the texture as it is for both outer walls and inner walls separately? Quote Link to comment Share on other sites More sharing options...
JohnK Posted September 8, 2018 Share Posted September 8, 2018 This is one way http://www.babylonjs-playground.com/#4GBWI5#2 Gijs 1 Quote Link to comment Share on other sites More sharing options...
Jackmine11 Posted June 23, 2023 Share Posted June 23, 2023 (edited) Draw calls are an essential part of computer graphics rendering. They represent commands sent to the graphics hardware to render objects or meshes on the screen. Each draw call specifies the necessary information, such as vertices, textures, and shaders, for the graphics pipeline to process and display the object. Multiple draw calls are typically executed for each frame to render all the objects in a scene, making it possible to create complex and visually appealing 3D graphics, check help from alzheimer phone . Efficiently managing draw calls is crucial for optimizing performance in real-time rendering applications. Edited June 26, 2023 by Jackmine11 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.