JeremyR
Trying to create custom expression inside the point position of the point node but getting error.
// Error: line 1: Cannot find procedure "position_POINT"

What do I need to do to make this work?

Code:

// POINT POSITION

float $dist = 3.0;
vector $myPoints[];
int $i=0;
for ($g = 1; $g < $PCOUNT; $g++) {
  $dist = $g*3;
  for ($r = 0; $r < 360; $r+=10) {
    float $rr = deg_to_rad($r);
    $myPoints[$i] = <<cos($rr)*$dist+gauss(0.2), 0.0, sin($rr)*$dist+gauss(0.2)>>;
    $X = $myPoints[$i].x;
    $Y = $myPoints[$i].y;
    $Z = $myPoints[$i].z;
    $i++;
  }
}

Quote 0 0
pshipkov
where you define $PCOUNT ?
Quote 0 0
JeremyR
I thought that was a pre-defined variable in the point node which returns the input mesh point count?
Quote 0 0
pshipkov
I am not sure what you are trying to achieve with this expression. here is something i *think* you may want to do.

float
 $dist = 3.0;
vector $myPoints;
  $dist = $g*3;
  for ($r = 0; $r < 360; $r+=10) {
    float $rr = deg_to_rad($r);
    $myPoints = <<cos($rr)*$dist+gauss(0.2), 0.0, sin($rr)*$dist+gauss(0.2)>>;
    $X += $myPoints.x;
    $Y += $myPoints.y;
    $Z += $myPoints.z;
}
Quote 0 0
JeremyR
I found the code online, this guy was creating point patterns like spirals as in the code I supplied. I made some alterations but I think I mucked it up. Copying and pasting your code in the Point nodes point position part throws the same error up too.
Im not sure if the point node has access to mel commands like deg_to_rad though.
Quote 0 0

Add a Website Forum to your website.