Home Technical Talk

Modular pieces with curves

aaronindhouse
polycounter lvl 9
Offline / Send Message
aaronindhouse polycounter lvl 9
Railing, Tracks, Highways, fencing etc. Any tips or tricks to building sets of curved items so they work nicely on a grid?

Replies

  • Joshua Stubbles
    Options
    Offline / Send Message
    Joshua Stubbles polycounter lvl 19
    Go through Kevin's thread, there's some great info in there. http://www.polycount.com/forum/showthread.php?t=90110
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    For the stuff you are asking for, I would make sure the pivot is in the center of the path that assets are on (seems logical, but I have seen sets that have the pivot of say a wall one side or another instead of centered along it's path). Also learn to edit the vertex normals of the end cap pieces so you don't get seams when curved pieces are snapped together.
  • Angry Beaver
    Options
    Offline / Send Message
    Angry Beaver polycounter lvl 7
    m4dcow wrote: »
    For the stuff you are asking for, I would make sure the pivot is in the center of the path that assets are on (seems logical, but I have seen sets that have the pivot of say a wall one side or another instead of centered along it's path). Also learn to edit the vertex normals of the end cap pieces so you don't get seams when curved pieces are snapped together.

    If you're making any modular system you need a consistent origin placement preferably positioned for the person creating the big picture out of the modules.

    Center of path is a great metric but sometimes you can do better. Say you have a piping system. Placing the origin right in the middle of the pipe seems good until you have sa a z shaped piece. You place that pipe and try to rotate it, you're going to have issues lining it up with the other pipes, the better place for the origin is at the very start of the pipe and then centered. That way it's super easy to rotate it without breaking alignment with the previous connection.

    If a wall set has an obvious inside and outside and the inside is supposed to fit neatly against a 256 block well put the origin flush with the inside wall. You have a long series of railing with gradual curves, but the origin at the very start of the railing system os it's super easy to move align and curve them.
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    If you're making any modular system you need a consistent origin placement preferably positioned for the person creating the big picture out of the modules.

    Center of path is a great metric but sometimes you can do better. Say you have a piping system. Placing the origin right in the middle of the pipe seems good until you have sa a z shaped piece. You place that pipe and try to rotate it, you're going to have issues lining it up with the other pipes, the better place for the origin is at the very start of the pipe and then centered. That way it's super easy to rotate it without breaking alignment with the previous connection.

    Yeh, I didn't mean centered along the horizontal, because as you say, you end up with issues aligning things. So like you say with pipes the pivot at the beginning of a section and then centered along the path would be good. For walls, or anything that sits on a ground plane, I use pivot at the beginning of path, centered to the path, and vertically positioned at the goundplane/bottom of the object.
  • dekorkh
    Options
    Offline / Send Message
    dekorkh triangle
    +m4dcow

    Another tool you may want to consider is embedding "attachment" nodes within each module. This way you can abstract out the working pivot for each module and have multiple independent nodes that you can organize into however complicated of a system you want.

    An example would be that you would have some weird curved pipe that has "in" "out" helper nodes to which, you know for sure, aligning other pipe modules "in" "out" nodes will create seamless connections. Then you can also tack on nodes for say gauges, valves, drips, etc and essentially create a neat and deep "snap-on" system.
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    @dekorkh
    Do mainstream engines allow for this (UDK, Cryengine Unity etc...), or are you talking about when building something in like Max or Maya.

    I used to work in gamebryo awhile back, and just about the only thing I liked in it was that you could define custom snap points for assets when you exported into the engine. In UDK and in general they say stick to the grid and that basically becomes your snap points.
  • dekorkh
    Options
    Offline / Send Message
    dekorkh triangle
    It's not "out of the box" for any of these, including max/maya, but the concept is really so basic that all you need is to strap together a simple tool to offset the module's transforms based on the difference between it's otherwise default transform in relation to the other module and the "attachment node's" transform....

    That paragraph is way more complicated than the actual process lol.. sry. Let me try again.

    Align module 1 to module 2 using their default pivots.
    Choose attachment point 1 and 2.
    Apply the inverse of the attachment point 2 transform to module 2 (relative)
    Apply the transform of the attachment point 1 transform to module 2 (relative)
    blamo?
  • dekorkh
    Options
    Offline / Send Message
    dekorkh triangle
    it's the equivalent of temporarily parenting everything in a module to one of the attachment points and then aligning it to the other attachment point... that's probably a way better explanation.
  • dekorkh
    Options
    Offline / Send Message
    dekorkh triangle
    ah... sry. I misunderstood the question. You're talking about exporting/importing with multiple embedded points.

    There's a bunch of places you can choose to "tack" on that data but, yes, it would most likely require some tweaking to your exporter + a tool to access those in the game... but it should really be fairly trivial. I've heard of even exporting with isolated verts that have specific channel info identifying them.. basically a hacky registration point.
  • aaronindhouse
    Options
    Offline / Send Message
    aaronindhouse polycounter lvl 9
    Thanks for the help guys. I can't believe I haven't seen Kevin's gears thread. Great stuff. It would be really cool if he did a segment in vetex #2 on his modular workflow.
Sign In or Register to comment.