3__ Posted November 4, 2013 Share Posted November 4, 2013 What would be the best way to emulate SOP attribute lookup in the new POP DOPs? example: using a point() to release particles with an animated attribute from the emitter: $STOPPED = 1 - point("../../EMISSION", $ID, "release", 0) Quote Link to comment Share on other sites More sharing options...
foam Posted November 4, 2013 Share Posted November 4, 2013 Local variables like $PT can't be used in a pop source. A workaround for emitting based on a sop attribute is to delete the point / primitive that's not emitting. I've attached a file, hope it helps! pop_sop_attrib_emit.hip Quote Link to comment Share on other sites More sharing options...
3__ Posted November 5, 2013 Author Share Posted November 5, 2013 Thanks for the file Sujil, this works for the emission example. I'm concerned I can't lookup any animated attribute via point() and $ID. Another example would be locking particle positions to corresponting points on deforming geometry, then releasing when an animated per-point attribute on the geometry passes a certain threshold... Quote Link to comment Share on other sites More sharing options...
foam Posted November 5, 2013 Share Posted November 5, 2013 $ID doesn't exist because it has to be created by the source. Looks like point() still might work if you give a specific point number. $P (for emitter point) doesn't look like it's there in h13. Quote Link to comment Share on other sites More sharing options...
Zach Posted November 5, 2013 Share Posted November 5, 2013 I do believe you can still do all that stuff with, say, a POP Wrangle. For example, if I wanted to use a deforming piece of geo with a (float) point attribute "released" that governs whether or not the particles stick to the deforming position of the incoming geometry or is released to the rest of the particle system while inheriting velocity... In the classic POP paradigm, I'd create a source node, set the impulse active value to $FF==1 and the impulse rate to $NPT; set up a "releasedgrp" group whose membership is determined by point("../../TO_POPS", $ID-1, "released",0) == 0.0 (and likewise, a "stuckgrp" group, != "releasedgrp"); and for just the "stuckgrp" particles, I'd use a Position POP and a Velocity POP to again look up component values for each particle's corresponding point with more point expressions. So, only particles in the stuckgrp continue to follow the source geometry's deforming points. A way to do something similar in POP-DOPs might be to point to your source geometry in the actual Pop Object (in lieu of using $NPT etc in a Pop Source DOP), and set up a "stuck" stream for non-released points (ingroup = (@released == 0.0). Underneath, you can create a POP Wrangle, with the first input context pointing to your deforming geo, you can do something like @P = point(@OpInput1,"P",@ptnum), and same thing with a trailed velocity attribute and the "released" attribute itself. That should achieve the same thing... just with fewer nodes and less typing. Does that work? Quote Link to comment Share on other sites More sharing options...
3__ Posted November 7, 2013 Author Share Posted November 7, 2013 Thanks Zach! The '@' syntax is new to me... I've attached a file of your example. popwrangle_test.hipnc Quote Link to comment Share on other sites More sharing options...
yongbin Posted November 10, 2013 Share Posted November 10, 2013 (edited) I find this can be done exactly same way. just little bit of syntax difference is there... popwrangle_test1.hipnc Edited November 10, 2013 by yongbin 1 Quote Link to comment Share on other sites More sharing options...
Zach Posted November 10, 2013 Share Posted November 10, 2013 ...yeah, that's a much, much easier way. thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.