Asor Posted January 17, 2016 Share Posted January 17, 2016 I am trying to make a prism generator using BABYLON.CreatePolyhedron. Everything seemed ok until I applied a texture to it.http://www.babylonjs-playground.com/#AVCC8#6 Babylon is splitting the mesh into triangles like you would expect, but then it is failing to map the new UV points in a sane way. I was able to manually set the new UV values to make it work, and can just automate the process, but It is a bit of a hack. Is there an easier fix to this? Thanks in advance for any help Quote Link to comment Share on other sites More sharing options...
jerome Posted January 17, 2016 Share Posted January 17, 2016 short answer : I'm afraid no for now How to set the UV on a surface is always a choice. The provided polyhedrons are built from sets of pre-computed data and we haven't any pre-computed (of any choice) UVs. So the less worst solution we found was to set the UV by applying a rotation from the first vertex of a polyhedron face onto the texture image and to give from this rotation start the next vertices 2D coordinates as UV (not sure I'm very clear : in short, we choose a computionnal way working in every case). This can lead to some results you woudn't have to get. They aren't false, they're different from what you expected. So, manually setting the UV to your expectation still remains the best way to get what you want. Maybe might I add a parameter in the polyhedron constructor method to give the ability to the user to pass his own UV set ? 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.