Jump to content
Sign in to follow this  
groblus

Transfering uv's: vertex -> point ->vertex

Recommended Posts

Hi/ I'm working on a brickify effect (just as in one of the tutorials available on sidefx.com). The thing that I need is transfering UV data from the base mesh to the final brickyfi mesh. It's how it works now:

1) model comes from maya with uv already (uv as vertex data) - (works)

2) points are generated as a polygon mesh, and only points within tha base model are left (works)

3) transfering uv data from base mesh to point from step 2, i need vertex data -> point data cast (can't get it done - attribute transfer ??)

4) copying geometry with copy sop (works)

5) transfering UV data from the points (step 2) to the vertex data of the newly generated mesh (bricks) - (not yet completed since I can't get step 3 to work correctly)

 

Result: brickyfied geometry with UV's, and UV of every single brick is folded into a point - taking single point colour from the texture

 

I have a strange feeling that the solution is simple. If it was Maya - than I'd use nearestPointOnMesh or something like that to get the uv data from model to points, but with houdini I'm stuck. I can't get attribute transfer to work. If I use attribute promote and change vertex to point than attribute transfer starts to work but the uv map is damaged during attrib promotion (which is natural, since uv should be vertex not point data). Can as ask for some guidance with step 3 and some help with step 5 (which at the moment I have no idea how to accomplish) ?

 

Regards

groblus

Share this post


Link to post
Share on other sites

Hey,

 

could you maybe post your scene file or recreate an example so we can check it out.

 

R

Share this post


Link to post
Share on other sites

Hi.

After cleaning my scene from obsolete nodes (just to post it here) I managed do get further (past step 3). I used "Add" node, just to delete anything but points from the mesh (it caused problems) - ignoring it made a lot of stuff work down the pipe. The point - vertex relation is still not 100% clear for me (like having point's without having vertexes - it's a new concept for a maya user ;) ).

So at the moment I have step 3) working (I think) but I'm still stuck with 5)  because I get some nasty artifacts during attrib transfer at the final step.

I want to explicitly copy UV values from source point to the all vertices of the copied brick - now I use attribute transfer and it gives some artifacts.

 

I attached my scene just to show you how I managed to achieve it, any kind of help is really appreciated.

My goal is to get geometry which is brickified, and each brick has a UV collapsed to a single point on a texture map. I has to use simple UV's since it's going back to maya (so no houdini extras stuff)

 

EDIT:

 

I think I solved it, in the copySOP, I simply "set" uv values to points (then promoted to vertex and voila it seems to work - for now at least)

uvTransferExample.zip

Edited by groblus

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
Sign in to follow this  

×