Jump to content

Transfer UVs in world space to remeshed object?


Recommended Posts

This is a bit fx, a bit modeling, a bit rendering, so I'm throwing it here--

I am running sims on a tree model. The original tree was too hi-res to simulate, so I had to run Clean and Remesh to reduce its poly count a little bit. It still proved too oddly-modeled to run a point deform on the original based on the sim, but the sim'd model is still high-poly enough so we're going to use it as the final.

What I need to do is transfer the UVs, in world space, from the original model to the down-res'd sim'd model. I tried using Maya's Transfer Attributes, which does exactly what I need, but choked on the source model's size. How can I do this in Houdini? (I know there will be some changes, but those should be mostly in the little tiny branches that are okay to lose, and this is not a hero tree.)

I assume it will be something like storing the original models' point positions and then somehow applying those points to the end result of the sim'd/cached model, at which point I could do a straight attribute transfer (and although I get this theory I don't know the steps required), or is there a better way (and if not, how would I do my suggested way)?

 

Thanks so much!

Link to comment
Share on other sites

Attribute transfer is what you need. But if you have UV seems those won't play nicely. You will need a vertex split node to break out the UV patches on your original model and then loop through each patch transferring attributes that way. That should keep your UV seams from breaking. Check this post for more info: https://www.sidefx.com/forum/topic/18890/

Link to comment
Share on other sites

I'm not quite following how to apply the vertexsplit. I have the setup on the attached screenshot, which obviously is wrong since it's not working, with the vertexsplit applied in the pipe right before the remeshing, and then using that as the source for the transferattributes. I did confirm with the uvquickshade that up through/including the vertexsplit the UVs are intact and lovely.

Screen Shot 2018-12-04 at 2.40.03 PM.png

Link to comment
Share on other sites

Okay, I found that "uv" has to be specified, so it's a LOT closer, although a bit (as the thread you referenced said) wobbly. However, right now I'm not using the attribute transfer at all--is there a way to incorporate that to do the final bit of smoothing/restoration/

 

 

splits.png

Screen Shot 2018-12-04 at 3.26.24 PM.png

Link to comment
Share on other sites

As far as I know, during a remesh or poly reduce small distortion is expect as point positions have changed. This will mostly be evident at UV seams as those have to shift to account for the new mesh. I'm no expert at UVs though so maybe someone else will have a better idea.

Link to comment
Share on other sites

So, Jesper--if I understand you correctly it's something like the screenshot (pointwrangle vP=v@uv;), then the grouping and smoothing, all after the Remesh? I'm afraid the "set your Position back to original position" has me lost, though.

 

Using the vertexsplit did so much good work. These aren't hero trees, so the small distortion will probably be usable.

 

And, martinkindl, ideally, yes: the problem is that the hi-res was too high-poly to sim, and the point deform from the reduced model to the high-poly one wasn't working--there were too many errant polygons flying off into space. I think this is because it's a library tree model, so there are lots of spindly branches that are four triangles for a large amount of space--I'm not having this same problem with our made-for-this-shot models. The downres'd one, though, still has enough detail to use as the finished model, so we're rolling with that.

 

Thanks!

 

 

Screen Shot 2018-12-06 at 4.23.42 PM.png

Link to comment
Share on other sites

2 hours ago, bentway23 said:

So, Jesper--if I understand you correctly it's something like the screenshot (pointwrangle vP=v@uv;), then the grouping and smoothing, all after the Remesh? I'm afraid the "set your Position back to original position" has me lost, though.

yeah thats the idea.

So in the wrangle you would do:

v@initialP = v@P;

v@P=v@uv;

do your operations with group and smooth.

then you can do in a new wrangle after the smooth: v@P = v@initialP;

I am not sure if it will revert the uvs back to the distorted look, but if so you should be able to transfer the smoothed uvs to the mesh with the distorted uvs replacing those.

 

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Hello,

I'm a new to houdini and running through the same issue with a fractured object. 

As I want to inflate the fractured object with vellum pressure, I need the inside group of polys to be remeshed in order to have a heavenly distributed geos, but when I do that the uv get distorded at the edge. I know the issue comes from the remesh, but isn't there a solution to fix that and reproject the uv properly? 

The idea is that I don't want the fracture to be visible at first glance.

 

how to fix those uv at the border of the fractured object?

 

Thanks

 

2020-01-10_10h46_36.png

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