New user troubles with transforming Copy to Points instances

   5267   7   1
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Hi, I'm just getting started with Houdini, so my apologies in advance, if this question seems stupid.
What I'm trying to accomplish, is to scatter instances of an object onto another object and retain control over parameters of the instances, like scale, transform and rotation. The first two are no problem, rotation gives me a headache though. As I read about the Copy Stamp node being deprecated and to rather not get used to using it, I'm trying to get the Copy to Points node to work, this one is missing the intuitive controls the old copy node had.

Documentation states, the Copy to Points node is to be used together with Point Attributes. What I managed to get to work is pscale, very rudimentary orientation of the instances using the N attribute, but rotation seems a little more difficult.
For starters, I'd like to gain control over the local Y rotation (the one pointing in the same direction as the normal of the source point) of the instances, so I can introduce some randomness, for example:

cars parked in a parking lot, that are placed onto parking spaces, randomly have a 180deg rotation assigned to them around the vertical axis, but the parking lot should be able to move in space with the cars stuck to it.

I'll be very thankful for any tips and pointers to relevant sources, as I have been unable to find any.

Ivan
User Avatar
Member
2536 posts
Joined: June 2008
Offline
Check out these two links.

http://forums.odforce.net/topic/23294-houdini-16-wishlist/?do=findComment&comment=143811 [forums.odforce.net]
http://forums.odforce.net/topic/27316-rotateorientalignmentquaternionsetc/?tab=comments#comment-156983 [forums.odforce.net]
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
648 posts
Joined: July 2005
Offline
see attached,
rotate upvector around normal.
if you initially set the upvectors using the neighbors it should behave on deforming surfaces.

Attachments:
rotate_upvec.hipnc (160.5 KB)

User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Thanks for the quick responses, it's finally working, thanks to your input, though I might need a few more hours of trying to fully grasp what's happening there. Another problem, I was unable to find a satisfying answer to on my own yet, is, how do you use polygon centers as a source for instancing, while retaining the attributes needed for controlling the instances (either V + up, or orient).
When I tried using a Facet node set to ‘unique points’, scaling primitives to 0 and fusing the resulting points, I ended up with no vectors to orient the copies with.
User Avatar
Member
648 posts
Joined: July 2005
Offline
try using carve instead of fuse.
also try deleting prims,rebuilding with add sop using an attribute.

Attachments:
rotate_upvec_primcentroids.hipnc (181.1 KB)

User Avatar
Member
8551 posts
Joined: July 2007
Online
here is a few alternative ways for point as well as face center instancing

just note that face center attributes are averaged from all vertices so it may not always return meaningful orientation
you cn of course just pick from first prim vertex or whatever you need
and at this point you should avoid averaging orient as houdini doesn't interpolate vector4 attribs as quaternions yet, therefore doing it on up and N and building orient afterwards

Attachments:
rotate_upvec_primcentroids_alt.hipnc (212.7 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Thanks for the quick replies and the example files. Using your example files, I put together my own version of the primitive centroid copy function, though it only works on quads, it's pretty much what I was after from the beginning. So thanks again, couldn't have done it without you.

Cheers,
Ivan

Attachments:
rotate_upvec_primcentroids_alt2.hipnc (209.8 KB)

User Avatar
Member
40 posts
Joined: Oct. 2018
Offline
this topic ended my 2 day search… thx you all!
  • Quick Links