fence: large beams intersects with smaller beams

   482   7   0
User Avatar
Member
320 posts
Joined: April 2017
Offline
Hi!

I'm creating a fence where I take the original points on my curve and copy large beams to those. I resample to have more inbetween lines where I copy smaller beams.

My problem is that small beams appears where large beams are. I think I would need to use VEX and use pcfind within a foreach so I can find all points after the resample that are close to the points on the non-resampled curve.

I'm not good enough in VEX to understand how to do this. Any help?

Thanks.

-Olivier

Attachments:
fence_resample_problem.jpg (175.8 KB)

User Avatar
Staff
3159 posts
Joined: July 2005
Offline
break your curve into segments
resample
make a group of the first and last point (group by range - start:1, End:1, invert range)
Michael Goldfarb | www.odforce.net
Senior Technical Director
SideFX
www.sidefx.com
User Avatar
Member
3547 posts
Joined: July 2007
Offline
or group all points on the first curve (let's name group A)
then after resample use Group Transfer SOP (Point Groups: A, Group Name Conflicts: Owerwrite, Distance Thresnold:0.00001) to transfer group A from original points

then you can Copy To Points large beams onto this curve with Target points set to: A
and another Copy To Points small beams with Target Points set to: !A
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
320 posts
Joined: April 2017
Offline
arctor: Thanks for your help but I'm working with a geo not a curve.

tamte: I'm trying the Group Transfer SOP but I can't get it to work.

Attachments:
groupTransfer_problem.jpg (230.1 KB)

User Avatar
Member
132 posts
Joined: July 2005
Online
Hi,

here is another solution, but I think the way Tomas has described it, is more general. I've used the angle between the neighbours to determine the corner points and a connectivity node to distinguish between the inputs (but I think this could be done easier for sure).

Attachments:
prefence.hipnc (76.7 KB)

User Avatar
Member
142 posts
Joined: Feb. 2017
Offline
your threshold is ginormous…note the threshold from Tomas..
User Avatar
Member
3547 posts
Joined: July 2007
Offline
here is a simple scene just to illustrate grouptransfer, overall it doesn't matter what you use to separate points into separate groups, just note that yo have an option to specify group on Copy To Points which can as well be adhoc group

you can as well just use attributes to determine what get's copied to each point, but for that I'd suggest to watch some masterclasses about the new for loops and copy nodes

Attachments:
grouptransfer.hip (96.4 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
320 posts
Joined: April 2017
Offline
Ahhh!!

My problem was that I placed a group expression SOP just before the Copy SOP (to group points below the ground) and it was overwriting all previous groups.

Thanks for helping me figure it out!

-Olivier
  • Quick Links