Jump to content

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

Link to comment
Share on other sites

  • Replies 63
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
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..

Link to comment
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
Link to comment
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.

Link to comment
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"

Link to comment
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?

Link to comment
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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...