Calculating uv texture coords for a procedurally generated polygon

核能气质少年 提交于 2019-12-12 14:22:06

问题


I have a shape like this:

and the coordinates of the points are available (Vertices have x and y components)

My texture is:

A simple planar UV mapping gives me:

and what I desire is:

How to calculate vertex positions to get the desired mapping? Note that this is a math problem.

Also, I can tolerate stretching, as long as the vertices fall on the grassy side.

来源:https://stackoverflow.com/questions/26397115/calculating-uv-texture-coords-for-a-procedurally-generated-polygon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!