kaitek666 Posted March 22, 2017 Share Posted March 22, 2017 Hey! I wanted to make a slope (using ribbon) and place texture on it. Unfortunately, when I do so, a texture is ascew. Is there any way to prevent it, or "straighten" my texture back to normal shape? To show what I mean, here's a playground demo of textured mesh. You can apply some other textures to understand it better, if you wish. http://www.babylonjs-playground.com/#165IV6#38 Thanks a lot! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 22, 2017 Share Posted March 22, 2017 Hiya @kaitek666, welcome to the forum. I'm not sure what you mean by askew, but, in this version... I added a loop with some texture uAng, vAng, and wAng testings (lines 65-67). The wAng is currently animated. Are any of those properties... helpful? I have a feeling that these will not satisfy the issue. Vertical stripes on one side of the ramp, horizontal stripes on the other side. I think there is a uv's issue, here, and thus... I started some uvw (xyz but for textures) -testing. (lines 45-50 area) Let's ping @jerome, a God of ribbons, just in case he wants to listen-in, and/or give advice. Ribbons might not use the same UV pattern as more-standard mesh. I don't know if there is an easy fix for this, except to set all 20 UV's yourself. You can view the UVs for the ramp... by activating line 49. Twenty UVs, each with two floats. Essentially, each UV (2 values) is an X and Y value between 0,0 (lower left corner of texture)... to 1,1 (upper right of texture). So, if you know how to "drive UVs", you can manipulate the values in the uvs array. (ideally, just before line 50) That's all I have at this time. I hope I didn't say anything incorrect. Others will likely comment, too. Welcome again. kaitek666 1 Quote Link to comment Share on other sites More sharing options...
jerome Posted March 22, 2017 Share Posted March 22, 2017 How do you expect your texture to be ? kaitek666 1 Quote Link to comment Share on other sites More sharing options...
kaitek666 Posted March 27, 2017 Author Share Posted March 27, 2017 Well, the problem was not in just a ribbon, but it's sequence. I connected point to wrong second point, which made the structure look good, but not texturing. I just connected a point to a opposite point instead of adjacent one. Thanks @Wingnut and @jerome! Wingnut 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.