Jump to content
sibarrick

PMVC - positive mean value coordinates

Recommended Posts

Ok, I knocked up an HDK version of PMVC_captAtt, the sop that takes the output from the ray sop and actually calculates the PMVC weights.

In my test file this reduces the capture time from around 1.15 minutes to ~16 seconds which is not too bad. Unfortunately I don't think there is a way to convert that one to VEX since it needs to reference vertices.

I've included compiles for windows H9.5.379 (32 bit vc8) and Mac H9.5.179 and H10.0.228

I think this is nearly done, I just need to do some more testing especially with large geometry. Then I'll wrap it all up properly and post an HDK and non-HDK version on my site.

PMVCrelease4_HDK.zip

Edited by sibarrick

Share this post


Link to post
Share on other sites

This is all great stuff; I love seeing how you progressively refined your approach; and I'm pleased that now you can deliver an HDK and non-HDK version...it's almost a try-before-you-buy because compiling HDK stuff isn't always as simple as it you'd want it:)

Thanks Simon!

Share this post


Link to post
Share on other sites
The only place I could see using it was
new_pos += pos*weight;

It's possible to do this by first baking out arrays of your data for all points and then running VM_Math to do SIMD operations. It does require extra setup which takes extra some time as well. However, if these arrays aren't changing from cook to cook, then the setup results might be reused.

Does anyone know if the python nodes run compiled code or is it always interpreted?

The python source code is compiled into "bytecode" which I think is a form of the tokenized source code. It is then interpreted per cook. Yes, bytecode is not the same (nor as fast) as running native compiled code.

Share this post


Link to post
Share on other sites

Thought it was probably worth adding a link here over to my 2d GMVC and 3d PGMVC implementation, the 3d PGMVC is basically a better version of what is in this thread as it removes the need to use triangles in the capture cage.

You can find it near the end of this thread

GMVC and PGMVC

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×