Jump to content

Mean Value Coordinates


Recommended Posts

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Yes I think you are misunderstanding. Imagine you have a mesh with uv's on it and then you slice it in half by using a cookie sop with a grid, the points in the grid that are left after the cookie won't have sensible uv's on them. If you do an attribute transfer of them they will either be the nearest match or they will get averaged, either way they probably won't be very useful. However if you use the sbc weights to transfer them then they will at interpolate in a way that is consistent with the exterior points, which can be very useful for faking solid textures using a 2D texture map. There are probably other uses too but this is the obvious one to start with.

Link to comment
Share on other sites

I haven't but I could. The code is basically the same, all I've done is switch the functions that calculate the weights. The deform sop is identical. I suspect the timing will be quite similar for the capture process since you have to visit the same number of polys and points, but it may well be faster for the non triangulated mesh because you visit less polys.

Link to comment
Share on other sites

Ok here's the first pass at the SBC transfer sop. Plus some related fixes to the SBC capt sop.

Check the example file to see what it does. I've put some examples in there that show transfering texture coordinates, normals and point colours.

Unfortunately this method can only handle point attributes so that is a bit of a limitation for textures but you can get some interesting effects with transferring normals.

Actually in playing around with it I've been wondering if this method would have any relevance to doing long fur, since basically you can define a volume that contains the hairs and then deform that volume with very little danger of the hairs interpenetrating.... just a thought.

SBCdeformer.zip

Link to comment
Share on other sites

it depends on the how much the hair stretches in the deforming volume. Then you need to find a way to intelligently maintain the length of the hair.

-k

Ok here's the first pass at the SBC transfer sop. Plus some related fixes to the SBC capt sop.

Check the example file to see what it does. I've put some examples in there that show transfering texture coordinates, normals and point colours.

Unfortunately this method can only handle point attributes so that is a bit of a limitation for textures but you can get some interesting effects with transferring normals.

Actually in playing around with it I've been wondering if this method would have any relevance to doing long fur, since basically you can define a volume that contains the hairs and then deform that volume with very little danger of the hairs interpenetrating.... just a thought.

SBCdeformer.zip

Link to comment
Share on other sites

Ok, so enough playing with code, here for a change is a little movie made using the deformer and new transfer sop combo..... just an abstract thing but quite nice I think, would make a cool screensaver :P

SBCfish.mov

Thats one of the friendliest looking acid flashbacks I've seen. Very nice:)

Link to comment
Share on other sites

  • 4 months later...

Cheers Edward, that looks very interesting, not only is the GPU bit interesting but the fact they keep the values positive....

Weirdly only the other day I was musing as to whether computing coordinates for only the visible parts (from the unit sphere's perspective) was the answer to positivity but I had no idea mathematically how to do it.

Is it possible to do GPU calculations in the hdk? and if so any pointers on classes to look at?

Now can you find one on positive SBC coordinates....

Edited by sibarrick
Link to comment
Share on other sites

Is it possible to do GPU calculations in the hdk? and if so any pointers on classes to look at?

That's a good question. I've never tried in SOPs. You can normally just use whatever OpenGL functions except that you need a context set for you first. This usually only means in the functions that get called for the viewport (eg. the GR_RenderHook stuff as found in the HDK examples). If you want to do this within a SOP, it looks like you may be able to build a offscreen context using RE_RasterObject (in H9). Inside your callback, then you could just call whatever OpenGL functions you need, or use the thinly wrapped functions in the given RE_OGLRender object. YMMV though. :)

Link to comment
Share on other sites

  • 1 year later...

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...