BABYLON.Texture coverage uScale,vScale

Recommended Posts

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?

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.

Screenshot from 2017-10-24 16-18-24.png

Share this post

Link to post
Share on other sites


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:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.