Home Technical Talk

Doing the Math: Bending Shapes while Staying on the Grid

polycounter lvl 17
Offline / Send Message
Incomitatum polycounter lvl 17
I didn't put this in the UDK forum as it probably applies to most 3d packages.

I have a modular "wall" asset, 192x192x16. Now that I have it unwrapped and textured I know I want to use it, for variation, to start making new shapes that "also" snap to the grid.

Similar to these:
Workflow06.jpg

The Fist thing I tried was to get a nice wide bend. I took 3 of my section and applied a Bend in the X:-90 and then a bend angle of 90.

The shape isn't bad. But the other end doen't line up with the grid. Should I take the verticies of the end and just snap them over to the grid. Just Fudge it?

I also found to get the bend the way I need it, I needed to move the center of my gizmo down to one end of my wall or the other.

As it normally is with me. I try something like this and there is just -one- small, fundamental, I overlook; which then leads to a DUH moment.

Or, more likely. A Bend can't do ALL the heavy lifting and by some application of Geometry -won't- fit the grid when you are done.

Bends.jpg

A nudge in the right direction would be nice.

Replies

  • ENODMI
    Options
    Offline / Send Message
    ENODMI polycounter lvl 14
    It may not be an absolutely perfect curve, but I'd just snap those last two points to the grid. As long as it it's landing on a multiple of your base unit, it shouldn't interfere with any building and no one will ever know.
  • Incomitatum
    Options
    Offline / Send Message
    Incomitatum polycounter lvl 17
    Thanks ENDOMI, I was hoping that was the case. And wouldn't lead to problems later.

    And so, for an 180degree bend, just do the same too eh? Make the ends planar to eachother and the move the point so the closest gridpoint?
  • Incomitatum
    Options
    Offline / Send Message
    Incomitatum polycounter lvl 17
    So do a bend, and then use a FFD 2x2x2 to move the end corner into place?

    What a great suggestion. I just tried it, and it worked like a charm.
  • Incomitatum
    Options
    Offline / Send Message
    Incomitatum polycounter lvl 17
    HA! I was just thinking as I got there (with the woman talking, and the TV going and the dog barking...) "Man, I can't really concentrate on this... what is all this about... Wish it had pictures... :D"
  • Incomitatum
    Options
    Offline / Send Message
    Incomitatum polycounter lvl 17
    I have done -some- bend work here.

    WIP_064.jpg

    It's not perfect. Even with an FFD some verts end up being a little bit off, but I Fudge them by moving them over and snapping them to the grid manually since the distance is so small.
  • Incomitatum
    Options
    Offline / Send Message
    Incomitatum polycounter lvl 17
    So, I am nearly done with this set. The one last problem I am prediciting, before exporting, is with the normals/smoothing groups on the bends.

    I want the ends to -seem- to line up with the strait walls seamlessly.

    I have applied and Edit Normals and can see those normals, pointing off at about a 15 degree angle, when they should be aligned to the grid. I can move them around.

    But; is there a faster way than moving them by hand? I can't seem to make them SNAP to the grid lines or that would be SO bad.

    Any help is appreciated.
  • PredatorGSR
    Options
    Offline / Send Message
    PredatorGSR polycounter lvl 14
    There is no need to move verts or use an ffd. In the bend modifier, expand it and select the "center" subselection. Select the axis that is perpendicular to the bend and move it along the axis. The bend will lengthen until it meets the grid point. With the axis selected you can middle mouse anywhere on the screen to adjust it, so you can zoom in super close to the grid point to get it visably perfect. That way you keep the perfect curve and aren't distorting it by using an ffd or moving verts. You should calculate the bend length so that it is pretty close and you don't have to lengthen it too much since the texture stretches slightly, but if you want perfectly tiling uvs, it is usually preferable to go to the nearest uv split rather than getting a perfect length and having a uv seam.

    I've done like a 1000 of these from 128 bends to 1536 bends and every step in between, so let me know if you run into any more issues and have questions.
  • Incomitatum
    Options
    Offline / Send Message
    Incomitatum polycounter lvl 17
    Well, the bending and using and FFD to nudge things into place went rather well, the last (and latest question) is about normals.

    You can see how there is a seam in the bend at the top (in my latest image above). This is from the bend normals being smoothed by a smoothing group.


    I am not sure how to take the end verticies and turn them 90 degrees, easily and quickly, so that smoothness flows well into end walls. Right now the vertex vector is about 15 degrees off the grid. It doesn't like to snap, OR have values put in manually. It also will not snap to any settings I might be using in an angle-rotation-snap.
  • Bruno Afonseca
    so you can zoom in super close to the grid point to get it visably perfect.
    hi there!
    so, this means you have to eyeball it, right? moving the center until it's close enough, and then snapping those verts to the grid? couldn't get them on the grid otherwise.
  • Mark Dygert
    Options
    Offline / Send Message
    To get the normals to match, when you bake weld a tile on either side and move the UV shells for those extra tiles out of the 0-1 renderable area. After you're done you can delete the extra tiles. Someone might cry foul that now the low poly normals don't exactly match what was baked but I haven't had any problems with it and I haven't see any other good work arounds that don't take 3 days to do. But I'm all ears if someone has something simple to be technically perfect.

    I've used both bend methods and they have their merits. The problem that I run into with FFD is that the FFD cage is created at the outermost points of your object if the verts you're snapping are the outermost point its normally fine to use it. If not as in you have an cliff with a roughed up edge to help hide the seam, or something that hangs out over the verts you need to snap, then it can be a bit of a pain.
    FFDOffGrid.jpg

    Either method, I would still snap the verts to the grid after getting it as close as possible, just to be absolutely sure you're on the grid.
  • PredatorGSR
    Options
    Offline / Send Message
    PredatorGSR polycounter lvl 14
    fonfa wrote: »
    hi there!
    so, this means you have to eyeball it, right? moving the center until it's close enough, and then snapping those verts to the grid? couldn't get them on the grid otherwise.

    Yea, you still would snap, but if it is so close to the grid point that there isn't a visible gap, your verts barely move at all, and it is just to make sure there is no seam. It just makes it a lot more precise.
Sign In or Register to comment.