No announcement yet.

Fast Easy Precise Way To Make Concave Collision for Your Meshes 360 Twist Ramp Ex. !

  • Filter
  • Time
  • Show
Clear All
new posts

    Fast Easy Precise Way To Make Concave Collision for Your Meshes 360 Twist Ramp Ex. !

    Dear Everyone,

    Time I Used to Make This Tutorial for the Community: 2 hours

    Time of Research Info involved in This Tutorial: Months

    (higher poly version of this ramp in my 2nd post! (only allowed 9 pics per post apparently))


    Oh oh oh I am so happy!


    See the Pictures Below!!

    See last pictures for perfect example of what this tutorial can help you do:

    Make a 360 Twist Ramp with proper collision so that a KActor ball can run up 360 ramp and twist around!

    All this in seconds, regarding the collision anyway

    The 360 twist took me about 45 minutes to make in 3ds max.


    I found a secret trick / hidden feature of the UDK (hidden on my screen resolution anyway) that makes concave collision in the UDK very easy and fast!


    The Situation I Resolved

    I could not figure out anywhere, even after hours reading on the net how to make concave collision easily! I even searched through 3ds max tutorials!

    I was trying very hard to find a simple way to make concave collision easily, without having to make hundreds of convex prisms myself and naming each and every one UCX_mymesh001, UCX_mymesh002, UCX_mymesh003,..years later...UCX_mymesh1002

    I've spent days researching this and often felt my dreams for my game could not even come true for reasons I will explain below, since I am using a KActor rolling ball and I cannot just use per-poly collision as you can do for pawns.

    For those of you not familiar with terminology:

    convex = a surface that is like a hill or a bump on ground, it has no interior spaces, just one big surface, like a sphere or box or triangle that is solid. These kind of meshes are easy for Unreal to produce collision for and the engine is hard wired for it due to algorithm limitations and ease of calculations

    concave = surface that curves in on itself and thus has an interior space which is valid and should not be filled-in as solid blocking volume.

    Well just look at the pictures below and you will see what concave suraces/meshes look like!

    Everywhere I read online people said you had to make your own convex prisms and rename them to UCX whatever in Maya or 3dsmax and then export with FBX.

    Some people still prefer ASE export format and were having problems with recent UDK versions

    To put this in perspective, to create individal prisms of convex surfaces for a complex concave object could require HOURS if not days of work, and be very complex and no fun.


    I am happy to say I have found a wonderful easy fast solution

    that requires only minutes of your time.


    I figured it out on my own!

    The core of my solution revolves around an issue with UDK, a bug apparently.

    I am using the may 2012 build of UDK.


    KActors Are The Most Picky About Collision

    For complex meshes and concave surfaces many people recommend just turning off simple box collision and using per-poly collision or simple line collision (edit these settings in static mesh editor of UDK).

    This is NOT an option if player unit is KActor, because KActors use rigid body physics and they require simplified collsion surfaces. They will go right through per-poly meshes as if there's nothing there!!

    My player unit happens to be a happy little sphere that rolls around.

    I want this sphere to roll up a 360 twisting ramp and loop around using physics engine.

    Therefore I had no way around it, I HAD to figure out how to do concave collision!


    Some Examples of My Concave Meshes

    Here are some concave meshes I have made, all in 3ds max, and successfully made complete collision for using my happy method!

    Do realize all these extremely concave shapes have near-perfect collision on their interior surfaces so that my KActor ball will respond to their collision surfaces as you would expect from your own human visual analysis.


    The Awesome Solution

    Look closely at this screen shot

    See that tiny little edge of what is actually a THIRD slider bar? I never saw this before! (well I saw it but erroneously assumed it wasn't important cause UDK wouldn't let me see it)


    This one slider is the secret key to very fast creation of concave collision for any mesh you can imagine.


    (yes I've tried to resize that window, to no avail whatsoever)

    My proof that this last slider is not common knowledge is the fact that I could not find this info anywhere on the net. So I am telling you myself.

    Method of using this last slider:

    1. first raise the first two sliders to max

    2. slowly raise the third slider up toward max (to the right)

    do this in small increments and when you have something reasonably good

    3. exit static mesh editor and SAVE your package!

    Reason for proceeding slowly is because if you jump to max, or ever do max,
    then UDK can crash, it happened to me over and ove.r

    Going even just shy of max will be fine.

    You will be warned in the image of mesh that it has a high collision prism count

    You should be happy, you would have had to make all those prisms yourself otherwise!

    I have never noticed a performance degradation from high prism count or even per-poly collision

    so just ignore this little orange colored warning.

    You've done it!

    You can now make proper collision, yes even simple box collision so KActors and other rigid bodies will collide properly (like pieces of Apex destructibles)


    My Twist Ramp Achieved

    Using what I've learned today, I created this 360 Twist Ramp and guess what

    my rolling ball KActor responds beautifully and smoothly to the ramp!


    I can literally, with enough force, actually make the 360 twist loop around the whole ramp with my rolling ball actor! Talk about a true test of how good the convex collision is!


    Bouncing Projectile Collision for 360 Twist Ramp

    Even my bouncing projectiles that my ball shoots bounce off the ramp, aiming right back at camera or doing even more of a 360 turn around as they bounce off the various surface angles of the 360 twist ramp!



    Concave collision in UDK is apparently quite easy, if you know this little trick I discovered.

    If you knew this already, lucky you, I had no clue and could find 0 info about it on internet

    I hope this little visual bug gets fixed so everyone can STOP making 100s of collision convex UCX prisms by hand!

    Please post below if my tutorial helps you in anyway, so that others are more likely to find this info!



    PS: I use the ASE format and import from 3ds max without any collision at all, and make entire thing in seconds in UDK using this method.

    Only figured this out today

    Final Version of My 360 Twist Ramp

    Dear Everyone,

    I made a higher poly version of the ramp you saw in first post!

    Here's the final version I plan to use for my game!

    Keep in mind this is one of many meshes I will be enabling players to create multiple copies of in my level using my in-game editor!



      That third slider is actually clearly visible for everyone. It seems to have bugged out for you, though.

      While the auto-generation can create solutions, it does not really create solutions with the best performance.
      Every differently coloured convex body that is auto-generated here is a separate collision primitive. The more primitives you have, the slower the actual performance of the collision will be. (The Content Browser will also show a warning on assets with a high number of collision primitives.)
      Your twisted ramp has so many places where it uses four primitives where a single one would be enough to cover it all. Simply moving all sliders to the very right side of the window is not a good practice. Instead you should always experiment with what gives you an appropriately accurate result for the lowest possible number of vertices and collision primitives.

      The best result is of course still created by hand in an external application.

      EDIT: Also, why is this in the programming section?


        I am fully aware of all the performance issues you mention, Crusha, but I've never had any problems with my performance.

        "Your twisted ramp has so many places where it uses four primitives where a single one would be enough to cover it all."

        An absolutely wonderful point, thank you, I was so excited about getting ANY concave collision working that I did not reach that level of refinement, but in my final development phases, having experienced "excessive prism" collision working correctly, I will scale it back as far as I can while still getting the same smooth gameplay.

        I don't want to scale back before I am sure the gameplay is tested at highest levels, so I know what to compare against when minimizing prism count.

        I do like your point about playing with how far to the right the sliders need to go, I do that myself but did not really specify that in the tutorial. I of course encourage others to see what actual amount of collision primitives are required!

        Thank you for mentioning this simple and fast optimization step.

        The point however is that I've never found any info on this method of produce concave collision effectively on net, and if anyone else's slider bugs out like mine or they don't know this method, it provides a FAST way to make concave geometry for a level.

        I've found TONS of documentation on using the UCX_yourmeshname001-155, but for people like me who are handling all phases of the project solo, I just don't have personal time for that!

        If I run into performance issues, I would be more likely to scale back my models in 3ds max before resorting to making lots of convex primitives by hand!

        If you truly think your method is better/ more time efficient, show me some concave models you've created with your method, and tell me how long it took you to make them

        Maybe that could convince me to try it your way

        My primary goal is speed, for me as a solo project leader/designer/everything, balanced with what modern computers can handle in my single player game


        PS: if a mod would like to move this tutorial to more appropriate section that's fine with me, I put it in programming since its the only part of the epic forums I ever check


        advantages of my method + Crusha's idea of reducing excessive prism count by adjusting sliders as far from right as possible without losing quality of gameplay:

        1. fast

        2. easy

        3. precise in terms of gameplay = sphere ball moving along curvy surfaces

        of course there has to be a disadvantage to the above, which is:

        performance as compared with a more methodical method.

        but my perception of the disadvantages of a more methodical method:

        1. SLOW

        2. boring

        3. can't get far in project cause yer busy making UCX_yourmeshname_101.5

        this is my perception, having not even tried doing it.

        If any of you / Crusha have done this and think my perceptions are inaccurate let me know

        Alls I can say is that I've made 16 pieces of fully functional concave level geometry for my game that are complex and beautiful and work AMAZINGLY and cause no performance issues, in about 3 hours.


          i just have simple line collision ticked and untick the other two. i dont bother with per poly or anything.
          works fine for collision even for KActors, but the only problem is a trace wont return anything.


            Wow very interesting Tegleg!

            I couldn't seem to get line collision (for others, you only uncheck "simple box collision" in static mesh editor) to work for my KActors, even with checking rigid body collision and notifiy rb collision etc.

            But hopefully it will work for others, what you are saying!

            Unfortunately I have to have traces return values since that is how I tell whether my Kactor is falling or not.

            But thanks for letting me know there's other options out there depending on the needs of the game engine you/we/the Community are making.



              Ahhh the love I receive from some of the community members,

              as I spend literally hours of my time trying to share info to help others who are not as exaltedly-wise as some of the said loving community members

              By the way I am still interested in positive feedback to my tutorial, let me know if it helps you who read this!


              PS: thank you for your support Tegleg

              Community members, do not be afraid to share your friendly and helpful offerings with the rest of the community just because of one or two people like the said-not-so-loving-community member (some people don't deserve names).

              Share what you are having fun with anyway!

              So many people do like what you post!


                Vendor X you need to grow up, no one else seems to have a major problem with him. Sooo you need to calm down.

                While convex collision is a good alternative to quick detailed collision. Its still better to make custom collision in your modeling program.


                  Pink, oh my god the pink!

                  You should consider contributing to a wiki site like UDK Central. Its great that you are posting tutorials here, but they will get lost in time among other posts, not to mention purges and other possible events.

                  A wiki would organize a lot of this stuff and will make it as permanent as it can be on the internet. You are obviously putting a lot of effort into these, better be safe than sorry


                    Dear TheAgent,

                    Thank you for the input, I guess you could say I am "prototyping" right now and seeing what will need to be refined later when I have more time to focus on individual components of my project, as I am the solo person on the team at the moment

                    Great to hear from you The Agent!


                    Dear RNG,

                    Thank you for your wonderful idea!

                    I had not thought as far ahead you, I will check out UDKCentral

                    Have a wonderful day you two!



                      I tend to read most posts in this forum, to help and advise, and often just to ensure there's no dis-information being spread - I feel very strongly that bad advice is worse than no advice. However, despite the praise you're receiving for these tutorials I'll be honest and state that I can barely get past the first paragraph of prose before giving up reading them.

                      So, if you're serious about receiving constructive criticism, here it is.

                      Try to be more concise and specific, without rambling or reaching the posting limit for images. A good method is to draft your tutorial in an open-office document. Then leave it overnight and re-read it the next day. You'll find you can refine it more effectively with hindsight.

                      Tone down the rhetoric regarding "joy and happiness". This isn't a care-bear forum. While UDK is public access and used by enthusiasts and hobbyists, it's also a professional tool and you are rubbing shoulders with professional users. The manner in which you post is a reflection on the community and those associated with it.

                      I thought the subliminal comments you placed in an earlier tutorial that spell out "my ... life ... is ... great" to be immature and potentially insensitive. Someone reading that may suffer from depression, bi-polar syndrome, or simply be at a low ebb, which is far more common than you may be aware of.

                      Also, try not to get too excited about every new discovery. Re-inventing the wheel can be a fun adventure, but it's not always necessary.


                        "My life is great" message was meant to cheer people up Spoof

                        It's part of my personality.

                        If I cannot provide helpful information without also expressing my personality, then apparently what you want on this forum are robots not people with dynamic personalities.

                        I am actually quite curious about you, and am quite thankful for your assistance!

                        Everyone who reads my posts knows more about me right from the start, and can relate to me through my expressive posts.

                        Why so strict and stringent about sharing of one's personality?

                        I thought this was a COMMUNITY forum.

                        A difference in style I suppose, but allow me my style please, while you use yours.

                        I try to be verbose for those who are not as good at code as you Spoof, so they can read the English to learn the UnrealScript

                        Perhaps you've forgotten what it's like to be a beginner Spoof?

                        I am quite admiring of your knowledge, but you are far beyond the people I am trying to reach, so I think you misunderstand my reasoning for my approach.

                        For you all the text is unnecessary, I agree!

                        But what about others?

                        Think inside the head of a someone who is not as good as you at unrealscript and I think you will see my posts differently.

                        I am in no way trying to challenge you, but I do think you are wrong in your analysis that the way you read my posts is the way EVERYONE will read them


                        PS: I praise you in my posts Spoof, too bad you are reacting in a strange way to people responding positively to mine.

                        I continue to be thankful for valuable insights you have provided, Spoof.

                        ...........sigh, no wonder few people post tutorials and most just ask questions.....

                        reactions like yours Spoof are not what nurtures someone who is spending HOURS of time writing this kind of material for those who could actually use it.

                        I looked up to you Spoof as a wise coder and a community leader, but you are not leading a community, communities are made up of people with dynamic personalities, and you are not honoring the personality very much.

                        Perhaps there is room for Art in and amongst Science and Fact?


                          I don't know when exactly you started following the UDK forums, but the reason few people post tutorials these days is because pretty much everything has been covered already in the past.
                          Plus that the UDN is an extensive resource that has appealing documentation about EVERY official feature of the engine, like this. What is left for the community to teach about are the things that are not inherent to the UDK itself. Code for more advanced things, usage of external tools to improve the workflow.
                          The usage of the Unreal Engine tools itself is more explained more extensively than ever before since the introduction of the UDK. Even official video tutorials have been created for it. We didn't have that luxury back in the old days™ and still found our way around.

                          As for Spoof, I have to side with him there. He is also just giving his honest opinion on your tutorials. No need to scold him for that, especially since he has little influence on what you expect him to be and what you then figure him out to be instead. A community is a number of people who share a common interest - it does not imply that everything has to be love, peace, harmony and care-bears, though. That would be the part of the forum where it's about the joy of Epic's games, but here it's primarily about help for professionals where even money may be involved, since those are the guys who will stick around in the end while others eventually give up when they realize that game development is not all fun and games.

                          You could have cut your tutorial down to about a third of it's size to explain what the basic problem is, how to solve it and what benefits and drawbacks are involved. Instead you spend about half of the tutorial talking about how you actually found things out yourself without actually getting to the point. The quintessence is hidden 6(!) entire screen heights from the top of the post away for me before I even knew what you were going at. This is constructive criticism. Don't take it as personal attack against your engagement.

                          About being new to something: I know that feeling pretty well. There are still many things out there that I am new at. And in those cases do I always prefer a tutorial that is slick and clean and gets things across to me in an efficient manner. I don't want to spend ages just with reading up on a single piece of information - it's easy to lose the motivation or concentration if you don't have much of a progress in what you do.

                          As for "Art in and amongst Science and Fact" (even though there should not really be any need to discuss this, since it seems more like a rhetoric/slightly evasive question): this is the coding section. Your post does not really belong here in the first place, but coding is all about science and fact. (Though I find some beauty in a nice function declaration)
                          It's a moot point in regard of the tutorial anyway. You want to teach people something. Unless you are teaching about art, there is no art involved in a teaching text, no matter how hard you try. It would only hinder getting the information across.


                            Quoting Crusha:
                            "Unless you are teaching about art, there is no art involved in a teaching text, no matter how hard you try"

                            Dear Crusha,

                            Art is part of the heart and soul of a human being.

                            I am teaching information to humans, not robots.

                            Therefore Art is ALWAYS involved.


                            PS: I am not requiring you to like or read my tutorials, you could at least leave me alone while I share my material with those who appreciate being treated as a friend and a human being.


                              Originally posted by evernewjoy View Post
                              Perhaps you've forgotten what it's like to be a beginner Spoof?
                              Actually I do remember. It was a long time ago, in a galaxy far, far away... before the internet, with it's vast library of free and easy knowledge.

                              This industry is constantly evolving, so despite my experience I'm always learning something new, and I'm always thankful that someone took the trouble to write clear, legible and well structured tutorials and documentation to guide me. When I help others I make an effort to write in that similar, familiar manner. It's no accident that books and tutorial sites do the same - there's nothing robotic about it.

                              But, you have your own style and aren't willing to accept criticism. That's ok, I don't have a problem with that.