Game Development Community

Snap to Grid Not Working Correctly

by Sumner Mccarty · in Artist Corner · 08/10/2006 (10:33 pm) · 9 replies

Greetings!

I posted this as a bug, but wanted to mention it here as well...

In the bug report I posted a video showing this, but Snap To Grid is not working correctly...

It seems to simply move the object/vert by the grid line amount but not snap it to the grid.

So if I had a grid line of 1.0 and I had a vert which was at 0.2...
It will currently go from 0.2 to 1.2 to 2.2 to 1.2 to 0.2 to -0.8, etc

It should go from 0.2 to 1 to 2 to 1 to 0 to -1

Right?


Cheers!
:)
Sumner

#1
08/17/2006 (6:42 am)
Top...

This is still present in Beta 8...

Snap to Grid simply changes how far each brush or vert will move...

It should move it the first time by the proper amount to get it synced to the grid
then, move it by the snap grid amount.

Please, just let me know this is an uncontested issue that will eventually get fixed.

(Many of my bug reports have been resolved, but are still in the bug tracker... this one is unresolved... and in the bugtracker)

Thanks!
:)
Sumner
#2
08/22/2006 (11:04 am)
Greetings!

Yes prior to Beta 9 the snap-to-grid only moved objects by the Grid Spacing amount and did not attempt to actually snap them to the grid line intersections. This was done as there is no current method to manually change a brush's pivot point but is instead based on the brush's vertex centroid. So slicing a brush would likely change its centroid and thus its position the next time you moved it.

With Beta 9 I allowed vertices to actually snap to the grid intersection lines and down the road I'll do the same with brushes and shapes.

- LightWave Dave
#3
09/16/2006 (9:50 pm)
I think it'll be great to have verts and objects snap to grid intersections, but I hope you'll still keep the option to have an object move by the grid spacing amount. I find that just as useful when building levels as snapping to grid intersections.

I believe in 3ds Max it was called relative snap - simply moving an object in increments that correspond with the current grid size. Then they got rid of it in version 3 or something - and I never forgave them :).

On a related topic, currently, on beta 13, I'm losing my mind trying to figure out how to change the grid and/or movement increment so that I can move an object in smaller increments than .5 meters. Which is why I stumbled into this thread. If any one has suggestions, please let me know. I know it should be obvious but... it's not. Not to me, anyway. Even typing in the transform isn't working for me.

EDIT: OK, I found the answer as soon as I posted this. It's right there under "prefs." Arrrrgh.
#4
09/27/2006 (9:00 am)
Snapping does not work right.. I zoomed in top view as close as I could get and noticed that the brushes don't line up at all..

Could this be why my zones will not export out right.. and I can only have 2 zones no mater how many portals I have.

members.cox.net/monwilson/SnapToGrid_NO.jpg
#5
09/27/2006 (10:58 am)
Greetings!

Yes you're correct in that there is no grid snapping for brushes. As noted above for Beta 9, grid snapping for vertices only was added. Brushes only move by the grid spacing.

For now if you'd like to snap a brush's pivot point to the grid you may use the Quantize tool. This still won't guarantee that your brush faces will line up unless they're an even grid spacing away from the pivot point.

If you'd like all selected brushes to line up against an outer edge you may try the 2D Alignment Tools.

- LightWave Dave
#6
09/27/2006 (11:07 am)
So is this why the zones are not working for me now..
#7
09/27/2006 (11:34 am)
How can one build with this tool when it can't ever follow its own rule. That rule being " Don't have gaps between brushes". And if you follow this rule you should have no light leaks and your zones should come out right.

I have tried this rule and I am starting to go bald trying to get things to line up perfect. I can't do it I mean I can't do it..

I have tried both methods that you have shown me and nether of them helped me out in fact Quantize tools seemed to make it worse.. the Vertices don't ever snap right each brush seems to have it's own world for snapping...the 2d alignment seems to work the best but even then it seemed to have a very small gap between brushes..

Note trying to complain but frustration is just getting to me.
#8
09/27/2006 (12:07 pm)
Greetings!

Using the Quantize tool on the brushes will only snap the brush's pivot point so your vertices lining up will solely depend on their distance from the pivot point. Unfortunately right now you cannot modify the pivot point.

Something that I had forgotten to mention is that the Quantize tool also works for vertices. Select those that you want to snap to a grid intersection and use the tool. They'll jump to the nearest intersection.

As for the 2D Alignment Tools they attempt to align the world aligned bounding boxes of the selected items so your success with these will depend on where you brush faces/vertices are in relation to the bounding box.

Please keep in mind that you'll need to make sure that your brushes remain convex after vertex manipulation. Otherwise you can get some strange things happening. One day we'll have an indicator of invalid brushes.

Something else to try is to not attempt to line up the faces right next to each other. Many artists recommend that you have walls penetrate each other to ensure there are no cracks. I'd recommend you read Tim Aste's comments in this thread. Unfortunately his pictures are no longer valid but hopefully his explanation will help.

- LightWave Dave
#9
09/27/2006 (12:50 pm)
Thanks for the quick response but no that don't help out and I have read it.. but when I do what hey suggest.. placing walls into the floors and ceilings and other walls it don't fix the light leeks infect it makes more problems like missing faces..