Dubtronics Posted June 17, 2019 Share Posted June 17, 2019 Hi I am doing the entagma tutorial where he is blending from low poly to high poly object. In their example they are using a single point from a sphere to create the blend as in the image below . I would like to use a piece of animated logo to reveal between the two. Using bit of vex I found on this site I think I am getting the distance from sphere to each point on the grid but when I visualise it as Cd. It only seems to be taking a few points into account. What I expect is black circle around the sphere. Thanks finddistanceB.hipnc Quote Link to comment Share on other sites More sharing options...
Dubtronics Posted June 19, 2019 Author Share Posted June 19, 2019 (edited) seems the file didnt upload correctly. finddistanceB.hipnc Edited June 20, 2019 by Dubtronics added file Quote Link to comment Share on other sites More sharing options...
Evan Peignet Posted June 21, 2019 Share Posted June 21, 2019 Hi, I checked your hip. In your wrangle you wrote: vector mypt = point(1, "P", 0); f@dist = distance(@P, mypt); The first expression stores the position of point 0 of all your scatter points. And if you put a blast under your scatter and delete all the points except pt0, you will see the your color is transfered form this point distance. To fix it, replace it by vector mypt = point(1, "P", @ptnum); It will calculate the distance from all the points of your scatter. I assume it then uses the closest one. If you want to make sure you can also isolate the lowest point of you scatter. There are plenty of ways to do that: - You can add a sort by Y after your scatter and then let this expression in your wrangle vector mypt = point(1, "P", 0); It will work because the point 0 will be the lowest on Y axis. - You can use the minpos() vex function to get the position of the closest point from the grid. - You can get the bbox min in vex or with and expression function and delete all the points higher than that limit. - etc etc I hope that helped. Have a good day! 1 Quote Link to comment Share on other sites More sharing options...
Dubtronics Posted June 22, 2019 Author Share Posted June 22, 2019 Thanks for pointing me in the right direction, after a bit of trial and error and copying of random bits of vex I have something working althought it dosent make sense to me 100%. i have attached the file in case some one find its it useful. finddistance_working.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Librarian Posted June 23, 2019 Share Posted June 23, 2019 @Dubtronics Thanx 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.