Issues with the SnapVertsToGrid plugin

Started by Pocket, May 06, 2022, 02:09:49 PM

Previous topic - Next topic

Pocket

I'm trying to convert the clouds from Minecraft into a 3D model, using the PNG I extracted from the game files. I got as far as figuring out that I could make an Adobe Illustrator file out of it, import it, and extrude it into a 3D poly, but because of the fiddly nature of the tools I used, it doesn't quite line up with the grid. So I went looking for some kind of tool that would just snap every vertex to the grid, and coincidentally my search led me right back here.

I don't know if the script is just broken or if I'm not doing it correctly. What I did was select my object, click the Vertex (three dots) button, drag over the whole object in the top-down viewport, and select SnapVertsToGrid from the Modifier List dropdown. And it... kind of worked? It snapped the vertices to a grid, but definitely not the global coordinates. (See attachment #1) They're all off by exactly .025 in the X and Y coordinates and also the whole thing was moved .5 units upward. It's actually quite similar to what often happens when I try to move multiple vertices manually with snapping on, so I wonder if this script is just an automated version of that? Also, some polygons have turned black (see attachment #2), which I guess means there's some kind of invalid-shape shenanigans going on? They weren't like that before I ran the snap script.

This is in 3ds Max 2022, using a freshly-downloaded copy of the script.

wallworm

I think that the SnapVertsToGrid modifier is dependent on node xform being reset.

A better modifier is Brushify that also has a snap function. It has less transform restrictions. It's available in Wall Worm installer or as separate download.

Pocket

Well, that one doesn't lift the whole thing up by half a unit, but it still leaves the X and Y off by exactly .025 units. It also still produces random black polys, although not as many of them. Any more ideas?

wallworm

If Brushify is failing, then I suspect that the node needs its XForm Reset. Try deleting the modifier, then using The Reset Xform Utility, then re-applying the Brushify modifier.

Pocket

That seems to have done the trick, although I have to say that Brushify is extremely inefficient; it made the program hang for multiple minutes while it did its thing, and multiple minutes after that when I unticked vertex welding. It was like that the last time too; I just had more pressing issues to address.

Also the random-black-polygons issue was solved by selecting all the faces and clearing the smoothing groups, which I didn't want anyway. Found that out by accident when I noticed that one face was randomly rendering like it was part of one.

wallworm

For brushify, turn off cap and any option except for the Snap. That should make it run better. But note it wasn't made for high-poly objects.