specify min max size for UV
2479 7 1- wjm
- Member
- 39 posts
- Joined: Nov. 2014
- Offline
I'm trying to make my UVs have a fixed value and scale it so it's U and V value will be between 2 numbers. Think of it like a matchSize node but for UV.
Ideally, I would have hoped that after I got the min and max size of the UV by using an attribute promote to get the min and max. that simply putting it in a fit range would solve it?
Having messaged on Discord (thanks voxelheadD for your input) one suggestion was to use relbbox to set the UV in a vertex wrangle after the uvproject.
@uv = set(relbbox(0, "uvme", @P).x, relbbox(0, "uvme", @P).z, 0);
But this causes the UV to wrap around it's self.
Additionally is there a way to move my UV to UV world center? Thanks in advance
Ideally, I would have hoped that after I got the min and max size of the UV by using an attribute promote to get the min and max. that simply putting it in a fit range would solve it?
Having messaged on Discord (thanks voxelheadD for your input) one suggestion was to use relbbox to set the UV in a vertex wrangle after the uvproject.
@uv = set(relbbox(0, "uvme", @P).x, relbbox(0, "uvme", @P).z, 0);
But this causes the UV to wrap around it's self.
Additionally is there a way to move my UV to UV world center? Thanks in advance
- Tanto
- Member
- 401 posts
- Joined: Nov. 2016
- Offline
- wjm
- Member
- 39 posts
- Joined: Nov. 2014
- Offline
- Tanto
- Member
- 401 posts
- Joined: Nov. 2016
- Offline
- wjm
- Member
- 39 posts
- Joined: Nov. 2014
- Offline
OMG you are my hero i've literally been up all day working on this problem, I thought I attempted something like this earlier in the day but must have gone wrong somewhere. You are my hero!
I don't suppose you have any idea on my other problem when it comes to translating a UV into the center? I can't seem to find much info when it comes to UVing procedurally in Houdini.
I don't suppose you have any idea on my other problem when it comes to translating a UV into the center? I can't seem to find much info when it comes to UVing procedurally in Houdini.
- Tanto
- Member
- 401 posts
- Joined: Nov. 2016
- Offline
- wjm
- Member
- 39 posts
- Joined: Nov. 2014
- Offline
Sorry my language when it comes to UVs is pretty poor. I'm still approaching UV as I do in 3D and I'm getting the idea this shouldn't be done.
So i'd like to try and simply move the UV the middle of the UDIM procedurally. my current approach was to get the center of the UV and subtract that from 0.5,0.5. like I would I if i wanted to move a point in 3D space to another point.
Before:
After:
So i'd like to try and simply move the UV the middle of the UDIM procedurally. my current approach was to get the center of the UV and subtract that from 0.5,0.5. like I would I if i wanted to move a point in 3D space to another point.
Before:
After:
Edited by wjm - Feb. 11, 2021 20:15:16
- tamte
- Member
- 8599 posts
- Joined: July 2007
- Offline
-
- Quick Links