Jump to content

Creep Pop Popping At Birth Problem


pclaes

Recommended Posts

Hi,

I am birthing some particles on a grid, randomly over the surface.

I then attached a creep pop to make the particles flow over the surface, this all works fine except for the frame on which the particle is born. See the attached file ( The popping at birth is the problem, not when they die).

In maya this is where you would have to control over your expressions at "creation" (creation expression) and at "runtime" (runtime expression).

What I would need is acces to the point position at creation/birth.

I have checked out the example files, but they just mask the problem. (if you set the impulse activation in the example files to 1, then you'll see that the particles are stuck on the location of the location pop at their birthing frames and only then start flowing over the surface), I checked several other posts on the forum but could not find a solution.

Or... how do I make use of the $POSUVU and $POSUVV attributes? Does the object need uv coordinates? It seems my $POSUVU and $POSUVV are always at -1.

creep_popping_problem_01.hip

Edited by pclaes
Link to comment
Share on other sites

i encountered this problem too..

is it possible to get the birth UV position when the particles are born?

For now, i use expression function - xyzdist to obtain the information;

and then assign this info to the creep node.

Though it works pretty well..i think there should be other better ways to do that?

xyzdist(x, y, z, surface_node, prim_num, return_type)

- return_type = 1 returns the u parametric value at the point of minimum distance.

- return_type = 2 returns the v parametric value at the point of minimum distance.

Edited by zoxlu
Link to comment
Share on other sites

  • 3 weeks later...

If you want to fetch the position of the points then yes use xyzdist() to do the work. It is quite easy to set up.

Also as zoxlu stated you have to do this on the birth frame for each particle. Easy to do in any of the generator SOPs as they all support a birth group. Just don't make it persistent.

If you want to reference the first context geometry or the first input:

Prim Number: xyzdist($TX, $TY, $TZ, "../../"+opinput("../", 0), $PT, 3)

PrimU: xyzdist($TX, $TY, $TZ, "../../"+opinput("../", 0), $PT, 1)

PrimV: xyzdist($TX, $TY, $TZ, "../../"+opinput("../", 0), $PT, 2)

That will stick or slide your particles to the surface. the opinput() automates things so you can make this in to an asset, shelf item or better yet a preset for the creep POP.

You also need a bit of a downward force to keep the particles on the surface and add a cling attribute with a property POP to keep them on the deforming surface.

Now you can apply wind and other forces to move the particles around.

creep_popping_problem_01a.hip

Link to comment
Share on other sites

  • 2 weeks later...

Thank you for the help!

Much appreciated!

After going through your file and the expression I noticed:

Prim Number: xyzdist($TX, $TY, $TZ, "../../"+opinput("../", 0), $PT, 3)

I understand it with the exception of $PT in the prim_num field.

Your expression works, but I do not really understand why.

Why is it not:

xyzdist($TX, $TY, $TZ, "../../"+opinput("../", 0), -1, 3)

I understand that the final outcome is the primitve number that is returned because of the return index 3. Is it a convention or habbit to put in $PT in the prim_num field?

Edited by pclaes
Link to comment
Share on other sites

I know $PT is the index of the current point, what I am wondering about is why $PT is fed into the prim_num argument of the xyzdist expression.

$PT is not the same as the primitive number as far as I understood. To me it makes more sense to input -1 rather than the point index number ( from the help on the xyzdist: If the <prim_num> is -1, finds the closest distance to any primitive in the surface node. ) . I do not see the relationship between the point index number and the required primitive.

Maybe it is the case that if you input the point number houdini knows which primitive it belongs to automatically?

Edited by pclaes
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...