Rotate UVs as in World space after Flatten

   3439   4   3
User Avatar
Member
379 posts
Joined: 12月 2006
Online
I use UV Flatten to proceduraly sew UVs, after UV Unwrap. Problem with this is that after flatten, UV islands are being randomly rotated. I need to have them be rotated as in World Space. There is also UV Layout node that has option to Axis Align as in 3D space, but that really does not do much.

Any tips for this?
User Avatar
Member
578 posts
Joined: 8月 2014
Offline
SreckoM
I use UV Flatten to proceduraly sew UVs, after UV Unwrap. Problem with this is that after flatten, UV islands are being randomly rotated.
In UV Flatten SOP you can pin vertices to prevent an island from translating or rotating while you're sewing it or cutting.

Also, you can align islands manually either along U or V axes without leaving UV Flatten SOP. See "Axis-Aligned Vertex Groups" described in the docs [www.sidefx.com].

Note, that to toggle between alignment axes, you'll probably need to go to parameters editor and change "Align Parallel To" parm of the aligned group. That's because for some reason the respective shortcut command (SHIFT+LMB) doesn't seem to work in the interactive mode. At least it doesn't on my Houdini instance.

SreckoM
UV islands I need to have them be rotated as in World Space.
Can you provide an example of a desired result?

SreckoM
There is also UV Layout node that has option to Axis Align as in 3D space, but that really does not do much.
Probably a silly question, but have you tried changing "Island Rotation Step" while axis alignment is in "By Island Position in 3D"?
Edited by ajz3d - 2023年1月14日 13:11:05
User Avatar
Member
379 posts
Joined: 12月 2006
Online
Thanks for this, will check these suggestions!

What I need to have is everything to be procedural. As this is going to be HDA in Unity.

Can you provide an example of a desired result?

I want island to be rotated as in world space. So bottom of UV island in 3D needs to be bottom of island in UV space too. Artist apply texture with arrows pointing up. On some parts of geo it is correctly pointing up, on others it is pointing down and others left or right (cause UV islands are randomly rotated). Need all of them to point up. I know I can do it with UV Unwrap, or like Cubic mapping, thing is that artist wants less islands, and less seams. As possible. UV Flatten gives me that, but introduce orientation.

Less advance version of this:

Packmaster [www.blendernation.com]
Edited by SreckoM - 2023年1月14日 13:23:44
User Avatar
Member
8822 posts
Joined: 7月 2007
Offline
you can
- transform your geo to uv space
- reorient your direction vector
- apply rotation so that each island's avg direction vector points in V direction
- copy the P as uvs back to original geo
- layout

Attachments:
ts_align_uv_islands_by_3D_axis.hipnc (292.1 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
379 posts
Joined: 12月 2006
Online
As usual pure gold from you!

I hope one day I will be able to understand what you did here

Thanks a lot!
  • Quick Links