Vousk-prod. Posted July 12, 2014 Share Posted July 12, 2014 Hello pretty community, What are the bu and bv properties in BABYLON.PickingInfo and BABYLON.IntersectionInfo ? I guess it's related to UV coordinates inside the picked mesh, but are these values relative to the whole object, to hit face, to UV maps of the object, other... ? I tried to know more about them, but - ready for a ride in deep mystery? - if I console.log(pickResult.bu, pickResult.bv) in the picking demo, the values printed are quite strange : left bottom corner is (0,0), OK, left up corner is (0,1), OK, right bottom corner is (1,0), OK, great, it looks like classical UV coordinates, so right up corner will be (1, ...... 0), whaaat ?!! (1,0) ?! Erm, let's pick everywhere to see... ew!, values are really strange in fact, no way finding any logic inside... Am I sick, or maybe it's my computer ? Quote Link to comment Share on other sites More sharing options...
Gugis Posted July 12, 2014 Share Posted July 12, 2014 I ran into the same issue too (created topic yesterday). I need to get UV coordinates of picked point. I thought too that bu and bv returns uv coordinates, but in result it returned wrong values. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 12, 2014 Author Share Posted July 12, 2014 Oops, I didn't see your topic before posting mine... sorry for the duplicate entry Quote Link to comment Share on other sites More sharing options...
Gugis Posted July 12, 2014 Share Posted July 12, 2014 Oops, I didn't see your topic before posting mine... sorry for the duplicate entry It's ok, it will draw more attention Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 13, 2014 Share Posted July 13, 2014 They are barycentric coordinates I've just added a function for you guys : pickingInfo.getTextureCoordinates. You can look at it to understand bu/bv Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 13, 2014 Author Share Posted July 13, 2014 Mmm... that's very kind of you to add this function to help us understand bu/bv, unfortunatly I didn't get what the heck you're doing in it... Sorry, my math knowledge is far behind me, I had a look at barycenter on wikipedia but this has not helped me so much to understand your code... Well, it's not a big deal, this question about bu/bv was just for my BJS general knowledge, I will just act as if I never need it 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.