Sorry if this is a stupid question (and sorry for my english, its not my native tongue). My approach to learning houdini is “try stuff until you hit a brick wall”. Well, I hit it.
I'm trying to do the following: A number of Points (generated from an sphere via scatter) move because of a spring node with some turbulence. A custom operator with some python code type runs trough all the points and checks for the nearest neighbor. A new poly is then created to connect every point to its nearest neighbour (if this neighbour is inside a certain distance). This works.
But now I'm trying to stop all the points that have been connected from moving. To accomplish that I did the following: Created an attribute “attrMove” with default value of 1, in the python script I set this attribute to 0 if the point has been connected, then I create a group (filtered by the expression @attrMove so only the points that should still move are in the group). This group is used in the spring node, so it moves only unconnected points.
The problem: As soon as the point stops, it jumps back to it's initial position. But of course I need it to stop where it was a moment ago, not where it started.
I'm afraid I am too much of a beginner to solve this on my own, help is greatly appreciated.
Beginner Problem with Points and Attributes
1590 2 0- qsc99
- Member
- 5 posts
- Joined: Nov. 2015
- Offline
- tamte
- Member
- 8525 posts
- Joined: July 2007
- Offline
- qsc99
- Member
- 5 posts
- Joined: Nov. 2015
- Offline
Looks good, but when I try to move the points slightly after they have been “frozen” (with a node below the solver) I experience strange behaviour: The Points don't move from their frozen origin but some other location.
I was not very precise with what I'm trying to accomplish: The Points should move randomly before they are “captured”, but afterwards they move also, just slower and in a smaller area.
I was not very precise with what I'm trying to accomplish: The Points should move randomly before they are “captured”, but afterwards they move also, just slower and in a smaller area.
-
- Quick Links