I'm trying to flatten a tennisball geometry by its UV map, so I can do some geometry operations (a unroll with a bend sop) on the flat mesh and then reproject the mesh back to its original shape but with the operation I did.
I found this tutorial [www.youtube.com] on how to flatten out a geometry by its UV map.
I tried several ways to reproject the mesh. The best solution so far was storing the transformation matrix in an xform attribute and adding it to the original geo. But all looked wrong
I'm sure someone tackled this problem before, it seems a pretty handy tool to flatten out geometry, do effects on the flat mesh and reproject everything.
thanks for the help
Flatten a geometry by its UV map an reprojecting it back.
3275 7 3-
- waynes
- Member
- 5 posts
- Joined: Jan. 2018
- Offline
-
- EVargas
- Member
- 28 posts
- Joined: Jan. 2022
- Offline
Hi,
Maybe try "point deform" node to bring the shape back?
This node computes how a point cloud (the deformation lattice) deforms (compared to its original rest point positions), and applies those deformations to the input geometry. (https://www.sidefx.com/docs/houdini/nodes/sop/pointdeform.html [www.sidefx.com])
It uses 3 inputs: the thing to deform, plus some rest and deform to calculated how much.
Maybe try "point deform" node to bring the shape back?
This node computes how a point cloud (the deformation lattice) deforms (compared to its original rest point positions), and applies those deformations to the input geometry. (https://www.sidefx.com/docs/houdini/nodes/sop/pointdeform.html [www.sidefx.com])
It uses 3 inputs: the thing to deform, plus some rest and deform to calculated how much.
-
- waynes
- Member
- 5 posts
- Joined: Jan. 2018
- Offline
Hey!
Thanks for your post.
I haven't thought about the point deform thanks! But it seems like it's doing the same thing I already built when I'm storing the transformation matrix of the flattend mesh and adding it onto the source mesh. The deformed final mesh looks wrong in both. Which makes sense to me because houdini doesn't know how to add the roll animation from the flat to the original mesh.
It seems this is more complex than I first thought.
Thanks for your post.
I haven't thought about the point deform thanks! But it seems like it's doing the same thing I already built when I'm storing the transformation matrix of the flattend mesh and adding it onto the source mesh. The deformed final mesh looks wrong in both. Which makes sense to me because houdini doesn't know how to add the roll animation from the flat to the original mesh.
It seems this is more complex than I first thought.
-
- animatrix_
- Member
- 5103 posts
- Joined: Feb. 2012
- Online
You can use the Vertex Split SOP for the UV attribute, promote it to a point attribute, and then set P to UV:
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
-
- waynes
- Member
- 5 posts
- Joined: Jan. 2018
- Offline
Thanks animatrix
that's pretty much what I do in the file I've attached, but I can't reproject it to the original state with the bend applied.
in the P_to_uv attribwrangle you just set: @uv = @P; right?
Not sure for what the attribute swap is. Isn't the attribute wrangle doing the swap already?
Can you share the file you just did with the rubbertoy? Thanks!
I can't reproject the mesh in its orignal state.
that's pretty much what I do in the file I've attached, but I can't reproject it to the original state with the bend applied.
in the P_to_uv attribwrangle you just set: @uv = @P; right?
Not sure for what the attribute swap is. Isn't the attribute wrangle doing the swap already?
Can you share the file you just did with the rubbertoy? Thanks!
I can't reproject the mesh in its orignal state.
Edited by waynes - June 23, 2023 08:18:42
-
- animatrix_
- Member
- 5103 posts
- Joined: Feb. 2012
- Online
gerwayne87
in the P_to_uv attribwrangle you just set: @uv = @P; right?
Yes.
Attribute Swap is to make a copy of P so I can restore P after UV edits in the world space.
I didn't save the file but will try to make a new one when I am in front of a PC.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
-
- Aizatulin
- Member
- 504 posts
- Joined: July 2005
- Offline
You can also use the uv-coordinates to project geometry onto the surface. In fact you can identify X with u, Y with v and the Z with the normal. But this will only work, if the coordinates are existing (so this is quite limited).
You can take other surfaces as well to project you geo on.
You can take other surfaces as well to project you geo on.
Edited by Aizatulin - June 23, 2023 12:51:58
-
- waynes
- Member
- 5 posts
- Joined: Jan. 2018
- Offline
-
- Quick Links



