Jump to content
sibarrick

3d Mean Value Coordinates

Recommended Posts

Very interesting stuff,

this is an extension of what I used to do the warpfield stuff.

It gots some heavy maths in it but if you skip to the bottom it's got some really nice pictures that explain what it is capable of.

I've only just started looking at it myself, I'm very interested to see if it is implementable in H. Love to see stuff like this in there, maybe H9..

Mean Value Coordinates

Share this post


Link to post
Share on other sites

I've bunged the code for the mean value coordinate system into a vex sop. Not exactly efficient but not bad when you think about the number of calculations it has to do. The algorithm is really very efficient, if it was implimented in the hdk it would be very fast because you could store all the weights on the geometry and then the actual calculation to do the deformation is very minimal. Actually if you have a dual proc you might be able to set the vex sop to use both and that will speed things up a bit. I have one idea that might improve the speed somewhat, I might try that out if I get time.

Anyway its here for those that are interested in seeing what it can do for real as opposed to just reading about it. At present it's setup to do deformations but as you've seen from the paper it can do uv interpolation into solid textures too so I might stick that together as well.

Perhaps this thread should move to scripting?

Hopefully I've included all the data this time....

Warp.zip

Share this post


Link to post
Share on other sites

hey simon,

my bunny went on the fritz from your example hip.. this is at .01 blend.. at full 1 it's just lines shooting off in the distance everywhere.. :blink:

post-505-1116948151_thumb.jpg

i also just tried some very simple standard geometry with no luck.. this sounds cool tho.. excited to see it in action..

Share this post


Link to post
Share on other sites

I just tried it in v7.2.199 and it seems fine...

very cool work Simon....

it's slow but it's almost exactly like the maya wrap deformer (which is also slow)..

HDK'ing this would be great...

Share this post


Link to post
Share on other sites

This was done in H7.0.265 on Windows

post-509-1116968102_thumb.jpg

I thought it would be alright, it's all done with standard sops and vex functions... <_< hmm weird. Does the control mesh look ok?

It might be worth just opening type properties on the warpmesh sop inside the subnet and re-compiling the code perhaps.

Unfortunately I can't write HDK (yet, unlikely to get the time to learn for a while either ) but it's pretty simple so anyone who does should be able to put it together pretty easily.

In the paper they talk about captureing taking 2-3 seconds and then deformations taking only 0.09 secs which is realtime, so definately doable.

Just tried this in H7.0.231 and indeed there seems to be a bug, rats, apprentice users will have to wait for H7.0.265 to turn up. sorry :(

Edited by sibarrick

Share this post


Link to post
Share on other sites

es no problemo.. i'll just wait a little while.. looks very cool though..

Share this post


Link to post
Share on other sites

Hey Simon. Great stuff!!! :D

Thanks for the link... and the implementation!

I just had a look at the paper.... I wonder if this can be used as an interpolant over unstructured point clouds... hmmm...

Cheers!

Share this post


Link to post
Share on other sites

I don't see why not, but you would need to put them inside a structured mesh of some sort to do the calculation of the mean value coordinates. But the values you interpolate could be store in the cloud and should be smooth in all directions, which I guess is what is important.

The tricky bit would be efficiently building the containing mesh. Maybe the powercrust algorithm could help? if not you are stuck with building a convex hull.

Oh yes, something I forgot to mention, in or to keep the speed at maximum ie very slow versus dead stop, i left out the bit of code that checks for points coincident with the control cage, so if you are trying this out either fix the code or make sure the control mesh is slightly bigger than the data you are interpolating.

Share this post


Link to post
Share on other sites

FYI, it seems to give trouble under 7.0.365 - exploded mesh as well..

Share this post


Link to post
Share on other sites

I wonder what is going on works fine on H7.0.369, H7.2.2, H8.0.222

It seems odd that vex would have changed so much in so many versions..... I wonder if it's something else.

Could those of you having problems try unlocking the hda and turning the number of threads to "no threading"

Share this post


Link to post
Share on other sites

after unlocking it, it was already set to no threading.. i chose 1 proc. and then went back to none but still no luck..

Share this post


Link to post
Share on other sites
after unlocking it, it was already set to no threading.. i chose 1 proc. and then went back to none but still no luck..

18447[/snapback]

Same here :( (In 8.0.251 too)

FYI, the bunny model's missing but if I use a subdivided version of the rest mesh it still explodes ..

BTW, I downloaded it from the Exchange, not this forum. Any difference in versions?

Share this post


Link to post
Share on other sites

:angry:

Should be basically the same, I downloaded them myself and tested them, also found the bunny model missing so I've updated that on exchange.

The only actual difference was the one I posted here used no threading and the one on exchange used threading.

I've tested on all the versions of Houdini I have access too and the only one that didn't work was H7.0.231, works for me with and without threading so the only things left are operating system, and something I've done that is so dumb I haven't spotted it yet. All my tests have been done on windows. I'm guessing you (Jason) are using Linux how about you deecue? Arctor got it to work I wonder what os he's using?

Could it have anything to do with the hip file using the embedded code maybe? Have you tried installing the otl so that it reads from disk. Totally clutching at straws, this is most perplexing.

Share this post


Link to post
Share on other sites

I'm running Linux...

I'll see if I can test it with some other builds later today...

has anyone from SESI seen the file?

Share this post


Link to post
Share on other sites

I'm on Linux RH9, yep.

I could try the Windows version... stand by..

<edit>

... nope, 7.0.365 on Windows is a no-go. Looks a little better, but no go.

Edited by Jason

Share this post


Link to post
Share on other sites

I haven't sent it to anyone specifically, so unless Edward has tried it.

I'll post it off to them and see what the say.

At the moment it's seeming pretty random, there must be some common thread to it.....

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

×