Is there any way to pixel snap your uvs to either the center or corners of a pixel?
It doesn't seam like many people doing NexGen stuff care about this but I know its really important on lower resolution textures when you start editing individual pixels.
Replies
1. Set the Coordinate Rounding to "Fixed"
2. Set the Fixed Increment to one of the following values:
0.125 = My modeling snap setting, I switch to this when not UVing.
0.03125 = 1 pixel on a 32 x 32 map
0.015625 = 1 pixel on a 64 x 64 map
0.0078125 = 1 pixel on a 128 x 128 map
0.00390625 = 1 pixel on a 256 x 256 map
0.001953125 = 1 pixel on a 512 x 512 map
0.0009765625 = 1 pixel on a 1024 x 1024 map
0.00048828125 = 1 pixel on a 2048 x 2048 map
0.000244140625 = 1 pixel on a 4096 x 4096 map
So the first script goes like this:
You can copy that text and paste it into notepad then save as a .py file. Just replace the "0.125" with each of the other values and save as a new script. I'm sure there's a more efficient way to condense this down to one script, but my Python skills aren't that far along yet :poly136:
The problem is that you must run the script with nothing selected and your mouse pointer hovering over the maximized modeling viewport. For some strange reason it won't work when run in the UV viewport, or with anything selected.
The main trick is to get one vert to be perfectly aligned with a pixel. To do this I usually just create a Unit Primitives -> Plane in the current mesh and do a Fit UVs on it. That way I have a vert in all four corners of 0-1 UV space. Then I just use Drag Snap Rigid to snap any particular shell to one of the corners. At this point you can use that first shell's vert as a snapping point and delete the Unit Plane or just move the Unit Plane over U - 1 to get it out of the way but keep it handy for snapping purposes.
Hope that helps
EDIT:
(From a post over on the Luxology Forums)
I've seen that if you open the "Snapping Options" and turned on the coordinate rounding to "force fixed" instead of "fixed" you can use the move tool to snap a point to a pixel center just by moving it a little.
On my 1024² texture i use the 2048 grid to be sure that my uv point was at pixel center.
so my message is about automatisation of the process to all athe point into a uv map:
Imagine that you can parse the point indice of a mesh, select them one at a time and move eatch of them just around a defined value like U = V = (1/1024)*0.8
where 1/1024 define a pixel snap value for a 1024 texture.
I'm not a programmer, so please be not offensed by this:
I hope you understand the purpose of this.