NokiMo
Farmfield
Farmfield

patreon


Shortest line between objects

Just a simple setup for creating a line between the two closest points on two input objects. Special thanks to David Kahl - davidkahl-vfx.com - for some help getting the VEX correct. :D

Scene file: www.bit.ly/ff_shortest_line

Shortest line between objects

Comments

Hmm, both options would still snap over the "caves" in concave objects. I believe some position smoothing would be needed. I've no idea how to approach it though. No idea YET:)

Well, you could either scatter a shitload of points on the surface and connect those points or you could do a POP sim with a setup with two particles that has the chosen end points as goals, then just keep them on the surface with minpos().

Any idea of how to make it not jump and blend smoothly? :)

Yeah, in this case (for the original fracture I got and based the solution on) it felt like I wanted to simplify the shapes, then measure them - and it works great.

Actually, my plan was to use something like the gamedev measure curvature SOP or other means of using the mesh curvature to get those areas/points :) But nice idea, thanks :)

I suspect you want to use VEX to identify sharp edges, corners, but maybe this can give some inspiration - a trick I created for Jacys Lin for finding and fracturing sharp edges on fracture pieces. <a href="https://vimeo.com/262638659" rel="nofollow noopener" target="_blank">https://vimeo.com/262638659</a>

I originally thought about this for a "electric discharge between two objects" effect (which would have to be limited to or biased towards sharp edges for at least physically plausible results), so if someone is good enough to use it for something like this (or completely different), I'm really really interested in seeing what you come up with :) I'm still in SOP (and a bit of POP) world on my learning curve right now.


Related Creators