Hi All , I have an irregular sized polygon tube. I am looking for a solution to create a line down the centre of the tube.My initial idea was to turn the tube into a SDF > with some scattered points throughout the volume. Then in Vops move the points to the boundary of the volume being zero.The some how invert a value or use N to move the point to the centre of the volume along the gradient N vector.
I am not even sure if you can do this as I have the feeling any point inside a volume has a value of -1 in the volume and the gradient only can tell you how far away from the surface you are. Maybe I cannot see the wood for the trees and there's a simpler solution to create a line along the centre of a tube,and no you cannot use the curve sop in the example file.
any ideas on this brain teaser ?
transform P and volume gradient
3448 5 1- circusmonkey
- Member
- 2624 posts
- Joined: 8月 2006
- Offline
- anon_user_40689665
- Member
- 648 posts
- Joined: 7月 2005
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: 8月 2006
- Offline
- Solitude
- Member
- 373 posts
- Joined: 3月 2009
- Offline
If the polygon tube has a nice topology, ie: the same number of points around each row, you can separate it out by rows (convert sop), get the center of each row, and use that. Otherwise, you can scatter points on the outside of your geo, and then raymarch inwards until the sign of the gradient flips then tell it to stop moving and you will have your center. If you're tying to create a curve from this, you should start with an edge loop on your poly tube or something so you have a good point order to create the new curve.
Ian Farnsworth
- circusmonkey
- Member
- 2624 posts
- Joined: 8月 2006
- Offline
Solitude
If the polygon tube has a nice topology, ie: the same number of points around each row, you can separate it out by rows (convert sop), get the center of each row, and use that. Otherwise, you can scatter points on the outside of your geo, and then raymarch inwards until the sign of the gradient flips then tell it to stop moving and you will have your center. If you're tying to create a curve from this, you should start with an edge loop on your poly tube or something so you have a good point order to create the new curve.
Thanks for the reply Ian, the tube topology is bad. I did think I could do what your saying by slicing up the tube into thin sections to make it more manageable.Your idea sounds interesting,to wait for the gradient to flip.
Rob
Gone fishing
- galagast
- Member
- 252 posts
- Joined:
- Offline
Hi, I took a spin on this. But I'm not entirely sure if this usable on your scene.
I used a Tetrahedralize SOP followed by a Findshortestpath SOP to get a base poly line crawling from a start point, towards an end point. Then I tried detecting the tunnel centers nearest to the points.. It's still a bit raw on some parts, but hopefully it can be further refined
H15.5.607 Indie
I used a Tetrahedralize SOP followed by a Findshortestpath SOP to get a base poly line crawling from a start point, towards an end point. Then I tried detecting the tunnel centers nearest to the points.. It's still a bit raw on some parts, but hopefully it can be further refined
H15.5.607 Indie
-
- Quick Links