Home General Discussion

Creating a Modular Weapon Pipeline

Rik
I've been scouring Polycount and the internet for articles about creating a pipeline for modular weapon creation. I was really hoping the fine folks at Gearbox had published a little sum-sum on how they went about their method as well, but alas I haven't found anything. So, I'm turning to you guys!

I know about skankerzero's Mutant Little League Challenge thread, but I'm looking for any others that may be floating around out there.

Any suggestions?

Replies

  • Rik
    Found a few more:

    http://udn.epicgames.com/Two/WorkflowAndModularity.html
    http://www.gamasutra.com/view/feature/2475/creating_modular_game_art_for_fast_.php

    Both are geared more towards environment assets and not weapons, but there's a good amount of grid/snaps/general techniques between the two of them.
  • Racer445
    Offline / Send Message
    Racer445 polycounter lvl 12
    i did some of the borderlands 2 weapon models when i was working with 3point studios. i hope i'm allowed to talk about this. lawyers: it sure would be a shame to stop people from learning and getting better at their craft...

    in borderlands, huge portions of the gun needed to be swappable. we were given a blockout or sample mesh for the class of gun we were working on that already had the scale set up, and had the swappable sections clearly defined. the concept artists made sure that the designs were in clearly broken up chunks, and all concepts were painted over 3d blockouts to ensure there was no 2d cheating nonsense. the most important and most tedious part was constantly checking with the other models to make sure they didn't clip and look funny. this was checked after making the blockout, after making the high poly, and after making the low poly, then one more time after all the weapons were done.

    the pivots were all at 0 (as they should be) to make sure everything lined up as intended at all times. that's really all there was to it.
  • ZacD
    Offline / Send Message
    ZacD ngon master
    I haven't looked at borderlands guns in a while, could swappable parts be at different locations on different frames/gun bodys? or did the swappable parts have a fixed location?
  • Racer445
    Offline / Send Message
    Racer445 polycounter lvl 12
    they were fixed.
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    My colleague Ben Garnell, who also worked on some borderlands 2 stuff said that was all just flat faces where different parts met, didn't sound too complicated (but that's just hearsay).
    I think if you want to mix a lot of crazy, very different guns, it's the only way. it just gets too hard to combine otherwise.

    We did something sort of similar with just the highpoly at Splash Damage, for Dirty Bomb.
    Mainly, I looked at different guns and tried to see if variations can be built while sharing highpoly components (lowpoly also partly).
    We looked at HK MP5 and G3 type of guns: they all have similarish parts and upper receivers are foten just stretched versions. triggergroups are also easily interchangeable, stocks too.
    Another very generous gun for this was the AK and all sorts of derivatives. AK47, AKS-U, Dragunov SVU, SVD, OTS-14 Groza; they all share components in one way or another, with the added benefit that you can move the grip and trigger forward to create a bullpup layout (like the Groza). There's even shotguns based one AK parts, the Saiga rifles.

    If you were to do this ina truly modular, interactive way (as in pick and match ingame), you'd have to work with sockets and attachment points. doing everything at pivot 0 isn't gonna work if you can use the same barrel on different lengths of receivers. That means every part would have a "root" position that is used to attach it TO something (and to the hand for the grip), and they would have sockets that could receive other components. So you could have a barrel socket, stock socket, grip socket, scope socket. The barrel parts could then for example even have a silencer socket to attach parts to attached parts.

    That's technically though, I don't even know if you'd ever consider implementing it into a game. Artistically it just takes a lot of planning. Decide what you want:
    -base it on real guns, then look at lots of ref and come up with some Photoshop cut-and-paste examples. Like I said Kalashnikov or H&K weapons are probably your best bet. M4 works too but it's just a bit more standard. Things like ACR, SCAR are difficult: they all tend to look the same quickly.
    -If you want to do something fictional, it'll be much harder but probably better in the end. It's mainly going to come down to designing good, multifunctional separations/attachment methods between parts. Keeping in mind that you'd want very varied silhouettes while sharing components. The hardest part is probably being able to have both a pistol grip and a grip integrated into a stock attach to the same receiver. Also difficult is being able to turn the same parts into a machinegun: belt-fed receivers tend to have very different shapes.
    -Or you could just keep it simple and do the flat surface separation thing. That would be a bit too easy though, right ;)
  • EarthQuake
    Yep, pretty much what Racer and Laurens said here.

    Most important step is blocking it all out and making sure it all fits together, and then sticking to those blockouts religiously (ie, don't change up proportions when doing the high/lowpoly modeling. Avoid specialized connection points, we had some issues on one or two assets because the concept had a very specific connection point to that asset. As Laurens mentioned, try to keep the connection points perfectly flat to avoid and weird clipping.

    For borderlands there were different classes of weapons, so for instance, the shotguns all needed to be interchangeable, but a shotgun didn't need to interchange with a rifle or a rocket launcher. Something to keep in mind as well.
  • Rik
    Excellent info, Racer and Xoliul! Thanks much.

    This actually isn't intended for guns, but melee type weapons (which I think would be easier to setup than guns, since there are fewer parts that would need to attach to each other).
  • EarthQuake
    Rik wrote: »
    Excellent info, Racer and Xoliul! Thanks much.

    This actually isn't intended for guns, but melee type weapons (which I think would be easier to setup than guns, since there are fewer parts that would need to attach to each other).

    Yeah well guns, swords, vehicles, characters, its all sort of the same concept. You've gotta plan the system and make sure everything lines up. Concept it, block it out, make sure it works, then worry about the actual assets.
  • Jesse Moody
    Offline / Send Message
    Jesse Moody polycounter lvl 17
    I didn't work on BL2 but did stuff for the first Borderlands and everything Racer and EQ said is right. If you were doing a revolver all your parts had to work with the other revolvers without clipping. Flat faces that mat the other areas and pivots at 0,0,0. Also on the texture sheet since we had 6 variations of each gun we had 1/6 of the entire sheet for our whole gun. That way only 1 texture sheet was loaded at a time for each gun regardless of the parts configurations.
  • s6
    Offline / Send Message
    s6 polycounter lvl 10
    Everything these guys said pretty much covers it. I'll try to add/illustrate some points as well.

    What i didn't hear anyone say, Is it's probably a good idea to have a fixed number of components, Because it looks very strange when one is missing. Gearbox did this occasionally with BL1 with the SMG's and them being stock less.

    The images below are just to help show you where the "Shape Spaces" are and how the models fit into them. As everyone said, the block out is really the most important part. I wouldn't say any of the secondary or even most of the primary shapes have to be the same, But they have to respect the same basic spaces for every variation. This might sound kinda silly to mention, But when i think "Block out" i think of a early developed level of detail, and that isn't really the case here. I chose to fiddle with the SMG cause its the most "odd" of the guns. Most other weapons connect at pretty obvious spots and are largely self explanatory.

    To show the various components of any given SMG.:




    tD1fdf.gif




    You can see there that every peice seems to lock in place, and every peice has its own space. with nearly no exceptions. If meory serves the shotgun barrels may have had peice reaching from the barrel to the body. But anywyay.

    Here is the best way i can think of explaining the "Block out" idea for these types of guns, and how they always are in their respective spaces.




    J4HOPr.png




    I picked a terrible mag for this example, as its one of the few i know of that clip the grip a bit, So ignore that :p. But the rest of the pieces here have a predetermined space to exist within, and predetermined points to meet at (as the others were saying). As you can see, There are 4 different bodies here, All varying a bit, But all with the same basic shape and all respecting their own "space". the banana mag disrespects its space :p Don't do like the banana mag.

    In this next picture you can see my cycle through some barrels, Just so you can see nothing else change, And how the barrel stays in the same space, But the content within that space differs. Then some random assemblies at the end.




    8VQpn1.gif








    It's kind of a trick concept but stupid simple once you figure it out. when modding BL1 Everyone went ape shit once i figured out how import new meshes and recreate new gestalts for the weapons types ^^ Was Proud of that back then, And felt special. Till i released i only uncovered a function someone else created. Now i cant wait to be designing these systems !

    As for melee weapons on a system like this, It should be stupid easy. I can't imagine running into any issues using a system like this, and with melee weapons, you can probably "disrespect" space quite a bit more, Depending on what kind of weapons they are and in what style.

    sense i was at it:


    WdEnhb.png
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Awesome stuff! Was this a personal project? Curious what you did with your UV's / texture sheets ?
  • s6
    Offline / Send Message
    s6 polycounter lvl 10
    Oh, No no. Just spent 30 mins throwing it together :p thought i'd import a poly count logo after i was at it, for fun. And to clarify, If you didn't notice, these are weapons from the game. I didn't make any of these. This is all viewed inside the BL editor (A buggy as hell version of UDK with less working features, Essentially.)

    The way borderlands (at least BL1) did their materials is a master file to parent every weapon and weapon type, Then instances for each of the weapon types (shotgun, sniper, SMG ETC). And in these instance you reference new "base" textures (for simple color, emmissive, Normals etc) then manipulate a variety of color parameters to get them all "themed" appropriately. And the point I'm getting at is among those parameters, There are also two "overlay" texture slots that can be toggled on and off. "composite" and "metal" overlay. They put tillable textures in here to create stuff like the dahl cammo, Athena's wisdom (with the stars and junk), And some weird other ones like the starter rifle for Roland, has a dirt type overlay(as if they needed more dirt :D)

    Point being i just dropped the poly count logo right in on both of them to add a little flavor to the images. The reason the Uv's look pretty broken up, its because they are. Borderlands makes and AMAZING use of UV space. It's even apparent in their maps that they planned on having 6 variations for every weapon part. As you can see on the sheet each of the 6 "sections" has some visible body parts, A grip, a barrel and so on. Not all of the weapon types are in order, but more than not they ascend as if you're reading them, left to right, Top to bottom, Parts 1, parts 2, parts 3, parts 4, Parts 5. Just like this. Body 1, Mag 1, Sight 1, Stock 1, ACC 1, and so on is in the top left. All the 2's on the top right. So on. And you can see the 6 slot is wide open. This always made me wonder what all the part 6's would have looked like, And why they didn't go through with making them. But yeah, They UVs are very broken up. But the way they did their materials, its works out really well for them.




    yD7UkA.png






    Anyway. I'm not a GBX guy or ever been employed by or associated with Gearbox in anyway. But its the game that made me fall into game design, and i spent many hours learning its ins and outs. So i like to ramble about it. :)
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Oh right, my bad. I didn't recognize the weapon probably because it's from the first game?
    Either way, still very good writeup and thanks for digging it all up. I should try doing something like this in my spare time some day :)
  • Rik
    Damn, thanks a ton s620ex1; great writeup and images here.

    I've gone through and made a series of proxy versions for this particular asset I'm working on, and it does seem pretty straight forward once I figured out the restrictions and which area of each piece needs to line up.

    Again, thanks a ton for the write up, everyone.
  • ken0y
    Offline / Send Message
    ken0y polycounter lvl 7
    Hey Rik, I tackled something similar for my MA. I focused on using maxscript to procedurally assemble my weapon components within 3ds max. My maxscripting skills are very limited but it was merely a proof of concept :)

    http://www.youtube.com/watch?v=wT3l3bVFkHw
  • Rik
    ken0y wrote: »
    Hey Rik, I tackled something similar for my MA. I focused on using maxscript to procedurally assemble my weapon components within 3ds max. My maxscripting skills are very limited but it was merely a proof of concept :)

    http://www.youtube.com/watch?v=wT3l3bVFkHw

    Very cool! That's quite a handy tool you've created, ken0y. Maxscript is something I've been wanting to familiarize myself with for a while.
  • ken0y
    Offline / Send Message
    ken0y polycounter lvl 7
    Thanks Rik,

    I have uploaded the maxfile and script for anyone who is interested. The script is most likely very untidy in the eyes of a versed coder, but like I said, it proved the point at the time.

    I had a lot of help from the scriptspot and CGTalk users so maybe this can help others, feel free to use and abuse :)

    http://www.mediafire.com/download/6ow233cj0ltoepl/Swordsmith.rar

    cheers, K
Sign In or Register to comment.