Announcement

Collapse
No announcement yet.

Weapon Implementation Tutorials

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Weapon Implementation Tutorials

    Post any cool & helpful weapon tutorials here! Please post a comment/summary of the the tutorial along with the link.

    A high level tutorial that is similar to the approach I am taking, just replacing
    https://www.youtube.com/watch?v=RjbwYKqZmgg

    Part two of the custom weapon tutorial, much longer & some great info in there.
    https://www.youtube.com/watch?v=i1EWKNr6aXc

    A little more advanced blueprint tutorial. Even if you don't want to get this crazy it's a good watch and will get you more comfortable modifying existing blueprints for your proto meshes!
    https://www.youtube.com/watch?v=DTNO4kULts4
    Last edited by YemYam; 11-26-2014, 11:37 AM.
    Sr. Mechanical Modeler, Epic Games
    Unreal Championship 2 - Unreal Tournament 3 - Unreal Tournament 4 - Gears of War 1, 2, & 3 - Gears of War Judgement
    Infinity Blade 3 - Samaritan, Elemental, & Infiltrator Unreal Engine Tech Demos - Fortnite - Super Secret Projects

    My Portfolio of Mechy Bittles
    https://www.flickr.com/photos/yemyam/

    #2
    This is how I got it working for Maya:
    Download the shooter demo, export the demo's weapon mesh.
    Import into maya, and align/scale your weapon with it.
    Create a joint (animation menu, Skeleton > Joint tool).
    Place it in the mesh, anywhere.
    Smooth skin bind it (skin > smooth bind)
    Parent the joint to your gun mesh (select the joint, shift + select your mesh, then press "p").
    Then export as a .fbx, and follow the rest of the directions in the video.

    Make sure the fbx exporter plugin is enabled (Window > settings/preferences > Plug-in manager)

    I didn't have to orient the joint.
    I'm assuming the xyz is the same or something in Maya and UE4.
    Last edited by CognizanCe1; 12-02-2014, 03:12 PM.
    3D Artist looking for work.

    Comment


      #3
      We can definitely do something like that Tidal Blast but that requires coding support that we don't have at this moment. For now let's just tweak the values and see where that gets us!

      Gimmie your favorite weapon display values! For any weapon in the game. Post your results in this thread.

      https://forums.unrealtournament.com/...isplay-Values!
      Sr. Mechanical Modeler, Epic Games
      Unreal Championship 2 - Unreal Tournament 3 - Unreal Tournament 4 - Gears of War 1, 2, & 3 - Gears of War Judgement
      Infinity Blade 3 - Samaritan, Elemental, & Infiltrator Unreal Engine Tech Demos - Fortnite - Super Secret Projects

      My Portfolio of Mechy Bittles
      https://www.flickr.com/photos/yemyam/

      Comment


        #4
        NOTE: There has been a little bit of wonkiness with normal map syncing in the editor. If something goes wrong this will give you shading errors. The results you get depend heavily on what combination of tools you use to model your assets and more importantly what tools you use to process.

        This is a known issue by code & rendering and is in the que to be fixed. In the meantime our awesome character modeler Mark Morgan wrote up a doc explaining how to brute force the best results with the engine.

        If any of you have an tips and tricks, problems, questions, etc. please post in this thread!

        -------------------------------------------------------------------
        Xnormal Processing/Baking for UE4
        -------------------------------------------------------------------

        Best Practices for Normal Map Generation in Xnormal

        Last edit: MMorgan, 12/10/2014

        Those who are already set up and have been using xnormal to process for some time as of

        Dec 2014 will likely just need pages 2-6

        Multiple maps are generated to serve as a starting point for the texture artists. This document

        will go through the process. Xnormal is used, in conjunction with max, where complimentary

        gradient and additional AO maps are generated. For Maya users, you’ll have to find techniques

        to achieve a similar result to the maps created in Max, but the primary maps (Base, Normal,

        curvature, Bent Normal, and Ambient Occlusion) should be generated through Xnormal to

        match the Tangents used in UE4.


        -------------------------------------------------------------------
        Exporting the LP Mesh
        -------------------------------------------------------------------

        It is has become evident that Max and Maya treat the fbx differently on export with varied

        results with static and skel meshes , and we now have a few new or altered steps to insure that

        the maps (specifically normals) are accurate for UE4 and remain accurate through

        development. As such we should begin to compute normals when importing to the engine for

        skeletal and static meshes, and generate the normal from a file generated BY the engine.

        1. Once your model has UVs and ready to process/bake, ADD an edit mesh Modifier above

        it. If you are not using Max to create your low poly meshes you are on your own homies

        and need to figure out the best method for your modeling app. This modifier is used to

        force the triangulation of all polygons, and should be used both here and at the time the

        final mesh is exported for rigging to insure the mesh’s tri data is consistent and never

        turned between Max and Maya. Making the edges visible is done in this way so that the

        mesh can also be additionally held in an untriangulated form for ease of

        rigging/weighting. You can also turn edges in this modifier, but it is advised you do not

        do this here but turn tris on the base model in an editable mesh state, as those invisible

        edge orientations are in the mesh proper rather than in the modifier. Once established

        on the base as Editable MESH, they will be oriented correctly when made “visible” in the

        modifier. FOR STATIC MESHES, FULLY BAKING TRIANGULATION PRE-PROCESS/IMPORT

        IS A BEST PRACTICE



        2 Export your “process” low poly from Max/Modeling application to FBX format. You will

        need to unstack any UV islands resultant from mirroring your meshes or cloning

        components, placing these sections offset by 1 in the UV editor, and leaving the

        geometry whole in the mesh. Only ONE island of any stacked UV elements should be in

        0-1 range. Not offsetting them will yield errors in your map bakes.

        3 Import the low poly “process” mesh into UE4. It is imperative that you import your

        model “COMPUTE NORMALS” ditching any file data controlling normals. (Image next

        4 Immediately EXPORT this mesh back out of UE4: (image next page)

        5 Mesh exported in step 4 is the mesh you will use to process. When loaded into Xnormal

        for renders, use the default “Use exported normals” in your low poly settings. There is

        no need to reimport this mesh into your modeling app or the engine. Your final real time

        mesh coming from the modeling package, if you’re following the above steps, will match

        the triangulation and tangent data of your process file when imported “Compute

        Normals” so long as you are not subsequently editing it after baking. If you wish to use a

        cage in xnormal, you follow the same import /export rules for that mesh as well or

        xnormal will error a mismatch between process low poly and the associated cage mesh.


        -------------------------------------------------------------------
        Exporting HP Meshes
        -------------------------------------------------------------------

        HP meshes should be objs. Meshes are separated to produce different colors in the default

         Please name the separate HP obj meshes with the _p suffix or something descriptive

        (Example: M_MED_Base_01-p1, M_MED_Base_01-p2, M_MED_Base_01-p3, or pouch,

        Baking Maps in Xnormal / Saving your Xnormal Settings

        Save your Xnormal settings into an xml document with the process files, so that if can be easily

        reprocessed if needed.

        High Definition Meshes in XNormal

        HP OBJ meshes are added here (pretty straight forward) and shouldn’t require any tweaking in regards

        to the default mesh scale.

        Low Definition Meshes

        The Low poly FBX mesh goes here. Set the ray distances to 1.0 (this generally works well).

        These are variable specific for what project you are on and the material creation

        needs specific to your project. Do not rely specifically on this doc for that, but

        consult your lead/tech lead, along with those responsible for material/shader

        development to support them.

        It is a good idea however to use the settings for each to get consistent and quality

        results for each map type.

        In generating textures for Fortnite, several textures need to be generated, and all of them should be

         Base Bake texture

         Ambient Occlusion

         Bent normal map

        Normal Map Settings

        In the normal map properties, the Swizzle coordinate should be changed to –Y.

        Ambient Occlusion Settings

        Bent Normals Settings

        Bent normal properties are as follows:

         Spread Angle: 179.50

        Curvature Map Settings

         In the Curvature map options, set the rays to 182

         Spread Angle to 179.50

         Bias to .0000080000

         Average Algorithm

         Cosine Distribution

         Search distance to 2.0

         Set the Tone Mapping to Monochrome, with smoothing checked

         Background color to black

        Base Texture Settings

        In the Bake Base Texture properties, check the ‘write Object ID if no texture’ box. This will

        assign a unique color to each separate high poly mesh that is used in the projection.


        -------------------------------------------------------------------
        Using Max for additional maps
        -------------------------------------------------------------------

        There are a few additional maps that should be rendered from the low poly mesh to aid in

        texturing. They are a Gradient Ramp render, Contact AO, Dust Map, and SubSurface Map.

        Gradient Ramp material in Max is applied to Mesh (uv2).



        Gradient ramp should ramp from Black to White, for full value range.

        Apply a planar map to the character in UV2 so that the bottom of the mesh is at U=0 and top of the

        mesh is at U=1. The goal here is to get a smooth gradient from the bottom of the character to the top of

        Bake UV2 information out to UV1 in the RTT Window. Do not use a cage, and be sure to set edge

        Gradient

        AO render of the low poly for contact shadows (MR or Skylight), for use in adding subtle shadows to the

        texture to further emphasize the model & geometry.

         No mesh parts exploded out, want contact AO shadows where pieces of the low poly overlap and

        intersect the mesh to give more weight and detail to the texture.

         You may need to move tiled UV islands out of the 0-1 UV space to get the proper contact shadowing.

         This is used to tie pieces of the mesh together in the final asset, and make up for details and self-

        shadowing that the engine cannot reliably render on all machines.

        Contact AO

        Surface Map Renders

        For the next two renders, you will need to use Max’s Render Surface Map feature. This is found under

        the Rendering menu, beneath “Render to Texture.



        We only care about the Dust, and SubSurface maps in this list, but the other textures can be

        useful as well. Set the export size to 4096, upon clicking the buttons, a Render Window will

        open, where you can save the texture from there (does not save out do a predefined location

        automatically). Unfortunately, these maps do not seem to get edge-padding, but the borders

        can be dilated in Photoshop using the xNormal filter.

        Like with Contact AO, you want to ensure the mesh does not have overlapping UVs to avoid

        potential problems with the textures rendered.

        This is used to accent the top faces of the low poly in broad strokes. A similar texture will be baked from

        the high poly. It is similar to the Bent Normal map, but gives a little broader information since it is

        directly from the low poly.

        Using a Blur setting of 2 or 3 will clean up odd shading errors.

        If the body has visible flesh, a SubSurface map may come in handy for SSS masks.
        Sr. Mechanical Modeler, Epic Games
        Unreal Championship 2 - Unreal Tournament 3 - Unreal Tournament 4 - Gears of War 1, 2, & 3 - Gears of War Judgement
        Infinity Blade 3 - Samaritan, Elemental, & Infiltrator Unreal Engine Tech Demos - Fortnite - Super Secret Projects

        My Portfolio of Mechy Bittles
        https://www.flickr.com/photos/yemyam/

        Comment


          #5
          This is great stuff YemYam, thanks a lot.
          It appears some parts of the document are missing though (for example, parts that say see image on next page). Is this from a WIKI or something or maybe it's possible to put on WIKI

          I have a question: So I understand that the LP mesh that is used for baking in x-normal has to be first imported and exported as FBX, does this apply to the cage as well? In other words, I set up the cage in Max then process as above and export to and from engine before using it as the cage mesh?
          Also, how does this change when all is said and done and we're importing the final mesh with collision (I'm referring to static meshes mostly here but I suppose it will apply to any?)

          Thanks again.
          MyArtstation
          @jayoplus

          Comment


            #6
            So, to sum this up, export your lowpoly mesh to UE before baking and let the engine compute normals for you? I'll try this, thanks.

            As for the "tips and tricks", I'm not very experienced in baking myself, but there are 2 things that I know and use. Both aim at reducing the difference between the lowpoly and the highpoly normals - I convert UV seams to hard edges (can be done manually but there's also a script for max available somewhere on the polycount forums), and I add supporting edge loops to the lowpoly model where I can't have additional UV seams. Both methods affect the tris and vertex count, but this way you can achieve a quite "flat" tangent space normal map which is going to look good in pretty much any game engine.

            All my knowledge is coming from the handplane tutorials on youtube:





            Helped me understand lots of things.
            ʕ ´ ل͜ ´ ʔ

            Comment


              #7
              Jayoplus, it is from an internal document. You do need to do the engine import/calculate normals/export for both the low poly and the cage.

              And yes, I will get it on the wiki soon with images and many other tutorials. However, I'm currently slammed with deadlines so I'm doing this as a "quick fix" and can answer any questions you may have. I'm currently working on Shock Rifle anims and getting the Enforcer hi poly cleaned up so I can move to the low, unwrap, & process for that guy. I have a ton of other tasks I have to get done in the next two weeks then I'll backtrack and get all the tutorials setup for you.
              Sr. Mechanical Modeler, Epic Games
              Unreal Championship 2 - Unreal Tournament 3 - Unreal Tournament 4 - Gears of War 1, 2, & 3 - Gears of War Judgement
              Infinity Blade 3 - Samaritan, Elemental, & Infiltrator Unreal Engine Tech Demos - Fortnite - Super Secret Projects

              My Portfolio of Mechy Bittles
              https://www.flickr.com/photos/yemyam/

              Comment


                #8
                I created a wiki page for my Shock Rifle progress from the forum thread (minus all of the fun comments).

                https://wiki.unrealengine.com/Weapon...al_Shock_Rifle

                This is first pass wip, if there is anything you want explained in further detail let me know and I will add it. Also please continue to post in this thread if you run across any other cool UE4 weapon tutorials.
                Sr. Mechanical Modeler, Epic Games
                Unreal Championship 2 - Unreal Tournament 3 - Unreal Tournament 4 - Gears of War 1, 2, & 3 - Gears of War Judgement
                Infinity Blade 3 - Samaritan, Elemental, & Infiltrator Unreal Engine Tech Demos - Fortnite - Super Secret Projects

                My Portfolio of Mechy Bittles
                https://www.flickr.com/photos/yemyam/

                Comment


                  #9
                  Just curious what the top left map on this image is https://wiki.unrealengine.com/File:Shock_98.jpg, and what it's used for. I'm assuming it's the curvature map the document mentions, but I've never seen one before.

                  Comment


                    #10
                    That's the map we use to determine scratch, grime, and decals (one in each channel rgb) and how the physically based material layers blend.
                    Sr. Mechanical Modeler, Epic Games
                    Unreal Championship 2 - Unreal Tournament 3 - Unreal Tournament 4 - Gears of War 1, 2, & 3 - Gears of War Judgement
                    Infinity Blade 3 - Samaritan, Elemental, & Infiltrator Unreal Engine Tech Demos - Fortnite - Super Secret Projects

                    My Portfolio of Mechy Bittles
                    https://www.flickr.com/photos/yemyam/

                    Comment


                      #11
                      I'm curious as to why normal maps generated in max aren't recommended for now. Any more info on this?

                      Also, I've been thinking about the NormalFromHeightmap node in the material editor. Can this be used as a substitute?
                      Or does it cause artifacts?
                      Last edited by danpaz3d; 03-26-2015, 11:09 PM.
                      3d Artist
                      UT Cosmetic Items |
                      UT Cybernetic Build

                      Comment


                        #12
                        Originally posted by danpaz3d View Post
                        I'm curious as to why normal maps generated in max aren't recommended for now. Any more info on this?

                        Also, I've been thinking about the NormalFromHeightmap node in the material editor. Can this be used as a substitute?
                        Or does is cause artifacts?
                        I can't quite find the link anymore (there was one on polycount though that may be more relevant), but basically it comes down to the syncing of normal maps between different rendering engines.
                        If you bake normals in Max and apply it to a LP mesh and view in Max, then you will not see any errors since the normals are synced (baked and viewed in Max). You may start to see errors in the normal when you bring it in editor which also depends on the geo on the LP.
                        I think it was Pete(can't remember) who said the folks at XNormal were kind enough to share their normal map bake algorithm with them so that they could sync UE4 normals to those baked in XNormal. This is the reason for the recommendation.
                        I might have jumbled some details though but I think this covers some of it in a nutshell.
                        MyArtstation
                        @jayoplus

                        Comment


                          #13
                          Jayoplus is correct. It's not that Max normals won't work, it's just a matter of quality. They couldn't tell us the exact code algorithm for calculating normals so our coders couldn't sync it perfectly. Xnormal team could tell us so that's what we synced to. However, a lot of times Max is perfectly capable and gets it close enough.

                          That's really the issue with all baking issues and methods. Almost all will work in some form or fashion, it's just a matter of quality and whether you encounter shading errors or not. If you put enough geo in your low poly then almost any normal processing method will work - you are brute forcing the quality. If you have to be more frugal with your poly count then you are more prone to shading errors depending on your method.

                          That is the most challenging thing about low poly, unwrap, & process. There are no absolute rules and everything depends on the model. Organic models are much more forgiving and can be processed almost any method with good results. Mech stuff is easier to model but typically harder to process with perfect results. As long as you are getting acceptable results for your process then you are good to go. That's why I never refer to my process as the best or official method, it's going to be different for everybody.

                          Even with the most reliable processing method and pipeline you are still prone to errors, gremlins in the mesh, weird results, etc. It's always a trouble shooting exercise no matter how long you have been doing it. As mentioned before polycount has some great threads going into further detail on the subject. Just remember to use your own judgement and experience and remember every low poly and process you do will get better then the last.
                          Sr. Mechanical Modeler, Epic Games
                          Unreal Championship 2 - Unreal Tournament 3 - Unreal Tournament 4 - Gears of War 1, 2, & 3 - Gears of War Judgement
                          Infinity Blade 3 - Samaritan, Elemental, & Infiltrator Unreal Engine Tech Demos - Fortnite - Super Secret Projects

                          My Portfolio of Mechy Bittles
                          https://www.flickr.com/photos/yemyam/

                          Comment


                            #14
                            I thought this would be a good place for this vs buried in one of the weapon specific threads. I mentioned I was in the process of freshening up my hotkeys, scripts, & workflow. As a modeler it's easy to get into the repetition of using the same tools you always use. Sometimes you could do something a better way but to figure out the better way then to do it quicker would take longer than just doing it the way you already know. That makes you reluctant sometimes to figure out the new ways, especially if you are in a state of constant crunch.

                            With that said it's super important to do that spring cleaning so that's what I've been focusing on the past week. It's a little time consuming if you do it properly but is very worth it. I always hear a lot of talk about what modeling program is better or faster than another and when it comes down to it there is no "best" modeling package. There is a best highly scripted, hotkeyed, and customized modeling package that you know well and works for you.

                            Modeling packages and more importantly the tools you get comfortable with in that package contribute a ton to your personal style so why would we want to all use the same packages, tools, & techniques? I use Max, not because I think it's the best - it's just what I grew up with. Keep in mind even from the beginning when I started learning Max (version 2.5 in 1998) I had scripts that added to and modified the capabilities. Every single 3d package out there today has been missing something and there has always been an ambitious bunch that have filled those gaps with scripts, plugins, macros, etc.

                            Some days you will be faster and some days you will be slower but you should always be looking for new tools to add to your workbench. I just upgraded to Max 2015 and yet again there hasn't really been any improvements to the modeling toolset. However, ambitious people of the interwebs are still modding it and giving it the modeling and productivity tools it deserves. My new favorite tool/script suite is Rappatools.

                            http://remusjuncu.com/rappatools/

                            It has become the foundation for a lot of my hotkeys and quick menus and folds in pretty well with my style of working. There are many more out there and I still need to add and customize more but this was a good starting place. I love to look at other modeling packages and tutorials to see how people are using other tools. I may jump ship to Modo one day (they seem to be innovating at a Zbrush pace) but for now it's fun to see the modeling productivity tools they have and see if I can replicate something similar with scripts or plugins in Max.

                            Soooooooo with all that blabberin out of the way here is the start of my new foundation. The first thing I try to do is get as many commands hotkeyed around my natural hand placement. That means everything clustered around my left hand and the main key modifiers (Shift, Ctrl, Alt). That combined with mouse stuff forms the bulk of my work. Everything that I can't reach or remember I try to get in spacebar menus, quads, etc. - anything that pops the menu from your mouse position. If I have to drift to the outskirts of the screen I try to remember how many times I do it. If I do it more than a few times an hour it's a good sign it should be hotkeyed.

                            Disclaimer: Modeling workflows/macros/setups are an extremely personal thing. Everybody is different so I'm not saying mine is the right way, just my way. A lot of my setup is geared around the way my wrists and fingers feel, the size of my hands, etc. I've had many wrist injuries from skateboarding & snowboarding so certain hand movements hurt me more than others. I've been a computer professional for 25 years so you spend that much time in front of a dumb computer and you have to streamline things.

                            So with that said, here's my starting keyboard layout for my new setup. I'll be constantly refining and polishing it over the next few weeks. I keep it up on my second monitor and always refer to it when I can't remember the shortcut. The sooner you can sear it into your brain and commit it to muscle memory the quicker you will get and the quicker you will identify areas that aren't working in the flow of modeling.



                            Anyway, thought I would share a little insight to my workflow as it was requested. In turn I want all you modelers to share tips and tricks of your workflow. If you know of any cool tools, scripts, or techniques that I'm sleeping on please share!
                            Attached Files
                            Last edited by YemYam; 05-28-2015, 08:31 PM.
                            Sr. Mechanical Modeler, Epic Games
                            Unreal Championship 2 - Unreal Tournament 3 - Unreal Tournament 4 - Gears of War 1, 2, & 3 - Gears of War Judgement
                            Infinity Blade 3 - Samaritan, Elemental, & Infiltrator Unreal Engine Tech Demos - Fortnite - Super Secret Projects

                            My Portfolio of Mechy Bittles
                            https://www.flickr.com/photos/yemyam/

                            Comment


                              #15
                              Wow, nice stuff!
                              My shortcuts definitely need a refresh. Thing is when I started working in Max, my tasks mostly involved making 2D stuff that didn't require turbosmooths, etc. So the shortcuts I have are basically based on my using Textools a lot. That's pretty much the only plug-in I still have and use religiously.
                              Before moving to Max2015, I had Headus tools (but never upgraded it), I also used to use the Neil Blevin's Soulburn scripts a lot. Now that I'm getting back into doing some HP stuff, I may have to invest in rappatools. Didn't even know about it (or maybe I heard of it but never paid it any mind since I didn't think I needed it ^_^)
                              That is a lot of shortcuts you use there too :-)
                              Thanks for sharing.
                              MyArtstation
                              @jayoplus

                              Comment

                              Working...
                              X