Jump to content

Recommended Posts

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

 

image.thumb.png.8b69513c80291814cb461640669c948b.png

finddistanceB.hipnc

Share this post


Link to post
Share on other sites

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!

  • Like 1

Share this post


Link to post
Share on other sites

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

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×