Jump to content

Askew texture on a ribbon slope


kaitek666
 Share

Recommended Posts

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! ;)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...