Dado Posted August 7, 2018 Share Posted August 7, 2018 Hello everybody, At first,many thanks for all BJS devs and team behind this great framework! Q: How can be "irregular" ribbon textured,that texture is not stretched? (per example- simple leaf shape made of Quadratic bezier curves;texture is squashed on its tips..) Tried to find answer on my own; but had no luck till now, it could be cause of me and my capabilities; so,if one exist please do redirect me and I do apologize for asking it again.. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted August 7, 2018 Share Posted August 7, 2018 hi @Dado you r welcome and always feel free for ask any question about BJS here that help us to make it more powerful if you can make your sample in PG : https://www.babylonjs-playground.com/ ** notice for use texture i recommend imgur.com (https url ) we can help faster if you make your request with PG thanks Quote Link to comment Share on other sites More sharing options...
jerome Posted August 7, 2018 Share Posted August 7, 2018 When you use a ribbon, the UVs are computed by default to be stretched on it as if the ribbon were unwrapped. This is why they can differ from what you expect when you fold it to some specific geometry. That said, you can pass your own UVs as a flat array of Vector2 (each array element being the UVs of each ribbon vertex) with the optional parameter "uvs" : https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.meshBuilder.ts#L141 Quote Link to comment Share on other sites More sharing options...
Dado Posted August 7, 2018 Author Share Posted August 7, 2018 Thanks guys; @NasimiAsl here it is,some fast example https://www.babylonjs-playground.com/#TNUP7U @jerome I will try dig something from there; but as I am more enthusiast then programmer,some example would be really helpfull 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.