[Sidefx-houdini-list] VOPSOP by ID

Jonathan Davies houdini at jonathandavies.co.uk
Fri Nov 30 12:10:38 EST 2012


== Getting Point numbers to VOPs =====
I've used the Point SOP with the 'match by attribute' option to grab the 
point number from the point with a matching ID on another frame ($PT2 
will grab the number of the point that matches the ID).
You can check for no match if you need to, by seeing when $ID2 == 0.

If you have particles being created and killed at different points 
through the sim, you can build a new point cloud matching the size of 
the maximum ID number by grabbing the nextID detail attribute from the 
last frame of the sim.  In some cases, this 'clean' point cloud is 
easier to work with - although will probably be a lot slower with some 
very heavy sims.

Once all this point num data is grabbed (and possibly cached again on 
disk if you have a huge point count), I jump into VOP-land and use the 
point numbers as I need to access the data from different frames. This 
is lots faster if you have a lot of VOP work to do.

My guess is that this would be quicker than Python, but slower than the 
HDK - I have done no performance testing however.


== Smooth Interpolation =====
I have tried using a Mix VOP to calculate the blend between the current 
velocity and the next frame velocity, then push the particle the 
appropriate fraction of the frame from its existing position. This 
worked nicely for a particle interpolater and gave me curved streaks. I 
guess it wouldn't be a cubic fit, as it is only taking the next frame 
into consideration - but it was speedy.


cheers
JD




On 11/30/2012 02:38 PM, Pablo Giménez wrote:
> If you dont want to enter into the HDK field I think the best option is to
> make a Python SOP which basically creates a dictionary matching points in
> the first input with the ones in he second using id attribute.
> then create a new attribute which is the point index of the second input
> point which paris with the first input point based on the id.
> Use this attribute in a vopsop to retrieve attributes from the second input.
> In HDK is much faster tha in Python of course so this rally doesn't scales
> well for huge particles systems.
> On the other hand doing a HDK node for this is easy if you now a little bit
> about C++.
> Cheers.
>
> 2012/11/30 Nick Nimble <nick at nicknimble.com>
>
>> Hi!
>>
>> I'm working on a method to re-time aka interpolate particles. I would like
>> to use a vopsop and do this as a post process. The idea is to use the point
>> position of the neighboring frames and their velocities to calculate an
>> in-between position.
>>
>> The problem is, a vopsop works by point numbers and not particles ID's and
>> since point-numbers change when a particle dies...
>>
>> Any suggestions? I was thinking about the sort SOP, or something like
>> that. A method to match the point number by the particle ID. Still this
>> would result in missing point-numbers and I'm not sure if Houdini would
>> like that.
>>
>> --
>> Cheers,
>> Nick, be Nimble
>> +31 622 4243 94 | www.nicknimble.com | www.facebook.com/nicknimble
>>
>> ______________________________**_________________
>> Sidefx-houdini-list mailing list
>> Sidefx-houdini-list at sidefx.com
>> https://lists.sidefx.com:443/**mailman/listinfo/sidefx-**houdini-list<https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list>
>>
>
>




More information about the Sidefx-houdini-list mailing list