masquerade Posted April 16, 2012 Share Posted April 16, 2012 Hi, I have an object which has changing topology (its growing). I want to use points of this object as template of a copy sop. Then I am trying to use stamping on my instance object which will drive a timeshift sop. The problem is, I cant find a way to get the creation frames of each point of my reference geometry and create a custom attribute from this. Does anyone have an opinion about how can I do that? Thanks in advance.. Quote Link to comment Share on other sites More sharing options...
ehsan parizi Posted April 16, 2012 Share Posted April 16, 2012 Hi, I have an object which has changing topology (its growing). I want to use points of this object as template of a copy sop. Then I am trying to use stamping on my instance object which will drive a timeshift sop. The problem is, I cant find a way to get the creation frames of each point of my reference geometry and create a custom attribute from this. Does anyone have an opinion about how can I do that? Thanks in advance.. something like this? : Quote Link to comment Share on other sites More sharing options...
masquerade Posted April 16, 2012 Author Share Posted April 16, 2012 Thanks for quick reply Ehsan. This technique is what I am using right now actually. I use $PT value just like in your example scene. But since my geometry is a complex one, and it is not uniformly growing (Its growing to several directions with several speeds) This method is very hard to control and is limited. If I could get the related points creation frame, I would use it instead of $PT value and everything would be perfect. I guess.. Quote Link to comment Share on other sites More sharing options...
masquerade Posted April 22, 2012 Author Share Posted April 22, 2012 For anyone having a similar issue, I found a workaround. Actually it is so simple, I have been cursing myself. I just added particle sop to the chain to convert my points into particles. Once you do it, they automatically get Life[0] and Life[1] attributes which returns current age(time based) and maximum life. In my case I just added an attribute sop and created my custom pointAge variable using $LIFE*$FPS*1000 (I dont know but somehow $LIFE attribute returns divided by 1000) After that I use that value for stamping which works super mega perfect.. Actually I am very new to Houdini and wasnt aware of Particle SOP. I tried to achieve the same effect using a POP network but couldn't figure out how to get the exact particle count with the correct timing for a changing topology. Somehow I achieved the wanted result with its less capable version Particle SOP. If I can, I still want to do that with POP network. Although particle Sop does the thing I asked for this topic, it is very limited and I always want more So if anyone knows how to do that with pop network, I would appreciate a lead. Thanks. Quote Link to comment Share on other sites More sharing options...
ehsan parizi Posted April 22, 2012 Share Posted April 22, 2012 (I dont know but somehow $LIFE attribute returns divided by 1000) it's because your particles' age is 1000 by default. btw, I don't know why you couldn't get the exact same result from popnet! IF you're getting the desired result from particle sop, you should be able to do that in popnet too! anyways, $AGE gives you the age of your particles in seconds, and idk what exactly you're loking for that you can get from "$LIFE*$FPS*1000" but it's not gonna give you the creation frame!! although you can get the creation frame with this expression : int($F-$AGE*$FPS) or just set your attribute type to integer and type $F-$AGE*$FPS maybe if you post a simplified version of your file, I (or someone else) can help better! 1 Quote Link to comment Share on other sites More sharing options...
zarti Posted April 22, 2012 Share Posted April 22, 2012 ... (I dont know but somehow $LIFE attribute returns divided by 1000) After that I use that value for stamping which works super .. ... yup ! few days ago i was trying and succeded with the same method you described above . Indeed months ago i tried to record frames as point attribs using python . it worked , but too slow . kinda cacheing ( writing out files on hdd ) . oc , i have in plan to make it an asset and upload on Exchange page , since not rarely this issue has came up and usually solutions remains as riddles for future ' generations ' . but first i need to ad few options , make it work for as much cases as possible and make tests too . im sure that wd be useful to ESC users . maybe to MASTER ones too if they do not want to use DOPs just for that . who knows ? =) Quote Link to comment Share on other sites More sharing options...
masquerade Posted April 23, 2012 Author Share Posted April 23, 2012 (edited) it's because your particles' age is 1000 by default. btw, I don't know why you couldn't get the exact same result from popnet! IF you're getting the desired result from particle sop, you should be able to do that in popnet too! anyways, $AGE gives you the age of your particles in seconds, and idk what exactly you're loking for that you can get from "$LIFE*$FPS*1000" but it's not gonna give you the creation frame!! although you can get the creation frame with this expression : int($F-$AGE*$FPS) or just set your attribute type to integer and type $F-$AGE*$FPS maybe if you post a simplified version of your file, I (or someone else) can help better! I know "$LIFE*$FPS*1000" is not giving me the creation frame. I forgot to mention that I modified the stamping parameter. In my case $F-$AGE*$FPS requires an expression in the timeshift sop something like "$F-stamp("../copy1","shifValue",0) Instead I used "$LIFE*$FPS" and "stamp("../copy1","shifValue",0)" Same results, shorter code. On the other hand, I couldnt find a way to use popnet for this purpose. particle sop has an option about "point reusing". Idk if I got it right but if you set it "don't reuse points", as long as the maximum particle count is above the maximum points of the object, it only uses each point once. I am very sure there is a way to do that using popnet, but I couldnt find it yet. I prepared a simple file covering the issue. It may make things more clear. PointAge.hipnc Edited April 23, 2012 by masquerade Quote Link to comment Share on other sites More sharing options...
masquerade Posted May 10, 2012 Author Share Posted May 10, 2012 Nobody has a comment about the subject? Quote Link to comment Share on other sites More sharing options...
sadhu Posted May 10, 2012 Share Posted May 10, 2012 (edited) May be this will help you. 1)Using time shift sop to find out new points added at sop level every frame and deleting rest of the points * Connect timeshift after fuse1 sop with expression $F-1 * Connect del sop to same fuse1 node write expression -(($PT+1)>npoints("../timeshift")). Use these points as input to popnet by connecting ouput of del sop to popnet. 2)In popnet source pop use impulse activation with birth rate equal to total no of incoming points - $NPT . 3)create justborn group in pop on source node without preserving to collect newly born particles each frame. 4)Create attrb birthframe only for justborn group in pop with value set to $F. 5)Now you have birthframe of each particle. Access it using point expression as value of shiftingen. 6)In timeshift node for animation write $F-stamp("../copy1","shiftingen",0) Is it working the way you want? Edited May 11, 2012 by sadhu Quote Link to comment Share on other sites More sharing options...
masquerade Posted May 15, 2012 Author Share Posted May 15, 2012 May be this will help you. 1)Using time shift sop to find out new points added at sop level every frame and deleting rest of the points * Connect timeshift after fuse1 sop with expression $F-1 * Connect del sop to same fuse1 node write expression -(($PT+1)>npoints("../timeshift")). Use these points as input to popnet by connecting ouput of del sop to popnet. 2)In popnet source pop use impulse activation with birth rate equal to total no of incoming points - $NPT . 3)create justborn group in pop on source node without preserving to collect newly born particles each frame. 4)Create attrb birthframe only for justborn group in pop with value set to $F. 5)Now you have birthframe of each particle. Access it using point expression as value of shiftingen. 6)In timeshift node for animation write $F-stamp("../copy1","shiftingen",0) Is it working the way you want? GREAT!! Steps 1,2 and 3 is the answer to the using popnet instead of particle node. One thing to add, delete SOP must be set to "Delete Non-selected". I stuck a little bit there. The only thing I couldnt figure out is step 4. I got the logic but couldnt figure out how to do this, can you elaborate it? Thank you very much, great workaround. 1 Quote Link to comment Share on other sites More sharing options...
sadhu Posted May 16, 2012 Share Posted May 16, 2012 The only thing I couldnt figure out is step 4. I got the logic but couldnt figure out how to do this, can you elaborate it? After source node in pop add attribute node. In it's source group para select justborn group Name the attribute birthframe. Set it's value to $F. You can check the value of birthframe attribute in details view. It gives birth frame no of each particle. 1 Quote Link to comment Share on other sites More sharing options...
Druidl Posted September 29, 2014 Share Posted September 29, 2014 Just to help somone,I just added an attribute before popnet, and set it to $F as a point attr. just make sure u are inheriting attributes in source pops. Found this was good if you have a retime in your pops. 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.