surface constraint question

   2630   7   1
User Avatar
Member
85 posts
Joined: May 2011
Offline
Hie everyone,

I'm using the surface CHOP constraint ,with mode set on Closest Distance , it works well but it only output xform SRT channels and i need the resulting uv position on the surface,

I' ve found a solution but too complicated to setup.(SOP + expr + ….).

Did someone know how to do it in CHOP ?

Thanks
— dedeks 3000 —
User Avatar
Member
7710 posts
Joined: July 2005
Offline
Why do you need it in CHOPs? For constraints, position is what you need most of the time anyways? Maybe you can use the Expression CHOP with https://www.sidefx.com/docs/houdini/expressions/primdist [sidefx.com]
User Avatar
Member
85 posts
Joined: May 2011
Offline
edward
Why do you need it in CHOPs? For constraints, position is what you need most of the time anyways? Maybe you can use the Expression CHOP with https://www.sidefx.com/docs/houdini/expressions/primdist [sidefx.com]

Thanks Edward for your reply,but i try to avoid expressions (too slow…),cause i need to work on multiple objects and chop is the dedicated context for that.
Position is indeed the most important constraint type but very limited in certain case (my situation).
— dedeks 3000 —
User Avatar
Member
402 posts
Joined: June 2014
Offline
Hi dedeks3000,

Any chance you could upload an example of what you're going for? Or maybe a bit more context? Would be interested to see what it is you're after…
Henry Dean
User Avatar
Member
85 posts
Joined: May 2011
Offline
Hey friedasparagus,
certainly , i hope it's not too confuse
Edited by dedeks2999 - April 23, 2017 08:23:31

Attachments:
surface_cnst_001.hipnc (169.9 KB)

— dedeks 3000 —
User Avatar
Member
85 posts
Joined: May 2011
Offline
Friedasparagus,
following your video tutorial(video 1) on vimeo,
it's more something like that :

Attachments:
surface_cnst_001_b.hipnc (228.0 KB)

— dedeks 3000 —
User Avatar
Member
402 posts
Joined: June 2014
Offline
Only had a chance to grab a quick look at your setup. One thing that was grinding the interactivity of your second example is that the fetch node in the obj/chopnet is creating 240 samples… I found switching this to ‘use current frame’ sped things up a LOT.

Unfortunately we're still left with the issue that we're trying to do calculations based on geometry attributes, which of course live in SOPs, and in order to do anything with channels using that SOP data we are going to have to make a round trip to SOP land and back. So generally if you're going to compute things like position based on uvs it can be much more straightforward to assemble the data in SOPs first, and then import it into CHOPs. Otherwise we can end up playing a big game of cat and mouse trying to position the data (from channel to parm to channel to geometry to channel… and so on).

If you have a single control object that you want to drive your multiple targets, then first grab that control objects position and get the closest point on the target geometry, then I would wager it makes life easier to create additional points at SOP level which you can offset in uv space. Once you have those points in your ‘driver’ you can fetch them using a ‘Geometry CHOP’ and use them to drive your targets. OR, you can stick with the constraints method and use a point constraint on each target object, and reference the relevant point in your geometry ‘driver’. The nice thing there is you can set your attributes in your driver SOP to make sure that your drive objects point in the right direction (N, up).

The original sticking point with applying the ‘non-uniform distribution’ thing here (SUPER happy to see someone pick that up by the way ), is that the original data to be distributed doesn't belong to a channel, hence the workaround you came up with that sets that to a parameter first, which adds that extra round of pass the parcel…

Christ what a lot of waffle… my apologies. Long story short is that each constrained point position needs a geometry surface to get it's data, so if we have to go into SOPs to get ONE point position, we might as well get the rest while we're there (that's my thinking).

I hope there's SOMETHING useful in there
Henry Dean
User Avatar
Member
85 posts
Joined: May 2011
Offline
Very useful infos thanks a lot
— dedeks 3000 —
  • Quick Links