PavolHejný Posted October 24, 2017 Share Posted October 24, 2017 Hi, I have some questions about BABYLON.Texture. I have a bricks texture, a big house and a small chimney. I want one brick to be the same size on a house and on a chimney. I can set size of the texture by uScale,vScale, but I would not like to create a special texture for every mesh as I suppose it would be very inefficient. Can a Babylon texture cover the area by size instead of percentage? http://www.babylonjs-playground.com/#2TJ5MI Best comparsion of my problem is comparing with css background-size: CSS background-size: 100% 100%; is like uScale=1 and vScale=1 in Babylon. Is there anything like background-size:100px 100px; in Babylon? Thanks a lot for your advice. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 24, 2017 Share Posted October 24, 2017 Hello! If you want to set different uScale per face then you should not use the texture uScale/vScale as it will be shared by all meshes. Instead, you can define the UVs of your meshes to accommodate your needs I think this doc could help you: http://doc.babylonjs.com/tutorials/createbox_per_face_textures_and_colors PavolHejný 1 Quote Link to comment Share on other sites More sharing options...
PavolHejný Posted October 24, 2017 Author Share Posted October 24, 2017 Thanks! That was exactly what I needed. And now I better understand how textures and meshes works. GameMonetize 1 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.