1. Stuck, Having problems with creating your mod? Let us help you: Mod Support

[Tutorial] How to Add Collision to Sketchup Models (Not Visible Mesh)

Discussion in 'Content Creation' started by AIM, Jul 25, 2017.

  1. AIM

    AIM
    Expand Collapse

    Joined:
    Dec 29, 2015
    Messages:
    500
    If your one of those people that are complete idiots like me and can't figure out how to use Blender, this tutorial is most likely for you.
    For many weeks I was working on my new terrain, and I had a whole big group of static objects I decided I was going to use, and yes, I made them all. I threw them into the game and obviously, they had no collision since they came from Sketchup. I poked around looking at other maps and static object made by the devs, and I came to a conclusion which you will see in this video I added below. I will also add written instructions below as well.






    To add collision you must follow these steps

    1. Open up the Fn F11 World editor, select your object and go into the shape editor

    BeamNGdrivex642017-07-2514-23-27-431.jpg

    2. In the bottom right hand corner, look to the properties section and go into the "Detail Tab"

    BeamNGdrivex642017-07-2514-23-09-801.jpg


    3. Change the name of the detail to "collision"

    BeamNGdrivex642017-07-2513-13-19-654.jpg


    4. Change the name of the object to "ColMesh"

    BeamNGdrivex642017-07-2513-13-36-524.jpg

    If you have more than one name under the detail that you changed to "collision", write them like this:

    ColMesh-1
    ColMesh-2
    ColMesh-3

    You will have another number after this, but don't worry about that number for now.

    I hope that this works for you guys, and if you need further help, feel free to PM me or post below!
     
    #1 AIM, Jul 25, 2017
    Last edited: Jul 26, 2017
    • Informative Informative x 1
  2. Ctracerx2

    Ctracerx2
    Expand Collapse

    Joined:
    Jul 8, 2017
    Messages:
    24
    Thank you for posting this. This could be useful for many persons, including me.
     
  3. AIM

    AIM
    Expand Collapse

    Joined:
    Dec 29, 2015
    Messages:
    500
    Your very welcome!
     
  4. bobby_boulgat

    bobby_boulgat
    Expand Collapse

    Joined:
    Aug 23, 2013
    Messages:
    398
    it's all simple and it works . Perfect. Thanks a LOT
     
  5. AIM

    AIM
    Expand Collapse

    Joined:
    Dec 29, 2015
    Messages:
    500
    Your welcome! I always hoped I could be helpful.
     
    • Informative Informative x 1
  6. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    1,499
    Works great on objects, does *NOT* work for forest objects.

    Forest object bridges on the left (not level, doesn't matter), static objects on the right.

    My mapping days are very, very, very numbered.
    Just wanted to save others the effort if they try with forest objects (reason for the bump).
     
    • Like Like x 1
  7. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,735
    Interesting indeed. While I haven't been following this topic lately your screen clearly shows some sort of sorcery going on with
    the way the forest editor is handling meshes these days. I might experiment with a simple Blender mesh and see if the same
    thing occurs. My statement above is squarely pointed at the continuing issue with the way "BeamTorque" if you will, continues to have
    problems dealing with Sketchup .dae mesh export. Unfortunately, I believe the Sketchup to BeamNG corundum is only going to get worse
    as the base BeamNG T3D engine slowly morphs away from it's original structure to something completely different. Certainly, it does not
    look like Sketchup is interested in making their .dae exports act like other modeling programs.

    Alot of this is speculative reasoning on my part but the symptoms you are seeing don't appear to be an issue in anything I have seen in discussions
    or tutorials regarding Blender mesh creation and export, aside from mistakes made with mesh origin coordinates. Whatever the forest editor is doing
    these days is conflicting with Sketchup mesh origins bigtime.
     
  8. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    1,499
    Those aren't sketchup meshes. Sketchup didn't even touch my bridge meshes there.
    They're from Autodesk Maya, specifically, Maya LT. Grouped & everything.
    I had to optimize it with Blender3D by deleting about 200 different extraneous and pointless things & just keep the original mesh.

    This game is messed up yes, I love it; but the thing that's killing me is it's too hard to use Blender, and that's the only thing that can make a DAE that this game supports. So, in order to not have ANOTHER heart attack, I am considering cancelling my city project, unless someone's got some type of solution, this game just is not straight-forward enough at this point to mod for. Sadly this is also why lots of other modders left the scene here & will be my undoing also.

    It would not be a problem if I could use visible mesh in the forest brush (or if it worked like it was supposed to!).
    It wouldn't be a problem if I could use objects infinitely. There's only 4096 object slots though, where-as the forest brush is without limit (only cpu/ram/fps are limits). That's NOT a lot when you have any decently-sized (immersive) map. I feel like I'm back editing for Vanilla DOOM in 1995.

    --Thanks for your time, though, @Aboroath
     
    • Informative Informative x 1
  9. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,735
    I totally agree with and understand your frustrations. I saw this issue early on starting when the "experimental" builds first started appearing.
    My frustrations, (and general lack of understanding of what the devs were trying to accomplish), led to some pretty heated and insulting back and
    forth communication.

    In the end I have resigned myself to learning the programs that the devs prefer to have used, for the sake of my sanity and the undying love I have
    for this game. For me I have no other choice in the matter because my time is valuable, I am not getting any younger, and I just can't put the creative
    side of me aside with this. I'm really not trying to convince you of anything here, just saying it like it is.

    You are a great, energetic, creative and passionate map maker (probably a bit impatient like me), and I hope you don't fade off into the sunset like
    others have done. It's a personal choice thing for sure.

    I could go on all day with this subject and piss off alot of people but that isn't what this thread is for, nor is it productive. Hang in there man
    and keep asking questions and learning. I seriously can't imagine what sort of content you would devise if none of this were a problem!!
     
  10. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    1,499
    That's ... touching ... okay, well I'm a LOT calmer now, for what it's worth.
    I just don't get it why there's such a deal with Collada. It should work or ... NOT work.
    Sadly the one I cleaned up with Blender I couldn't even get collision on in the forest brush to save my hide.
    I can't design a city with 4096 objects unless I end up doing huge objects, and that's only going to make a map that runs like rubbish. It would be pretty, but it would run like rubbish. We already have two maps like that. West Coast (beautiful, but many complain about performance), and Roane County (which, even after it's been updated, kiddies are still crying a river about it's performance... boo-hoo-hoo).

    I could TRY learning blender again but the interface, oh the interface, oh that god-awful mess of a disaster, it's ANYTHING but intuitive. It would be useful for cleaning up models not making them (which, for the most part, I can already do with it, but I haven't figured out how to copy the model geometry, strip textures, and then stick it into the colmesh-1 data area).
    Why didn't they make blender like ermmmm... EVERY OTHER PROGRAM that does modeling?

    I will keep you posted @Aboroath but I am going to tinker for a few days. Hopefully I can find something that isn't *too* time consuming, otherwise I am basically going to can the project anyways. I am willing to put in years worth of effort. I am not willing to do double or triple-work because the game is too fussy with stuff, or too limited.
    But thanks for saying something nice, it takes a bigger man to do that than most are here.
    --Cheers!
     
  11. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,735
    Well I do sympathize with your frustration and quite frankly admire your ability to write out emotionally neutral communication about it:p.
    Never the less I follow your trials and tribulations so I am watching for what happens. You've gotten some pretty remarkable feedback from the devs
    so far and that says alot. Thanks for offering to keep the updates coming:cool:.

    Warning LONG post ahead:

    For what it is worth about Blender and an experience: I have spent many hours combing through and watching videos, tutorials, forum posts....the whole nine yards. The detective work involved with finding my needles in those haystacks has been arduous, with an occasional find here and there. It has gotten me to the point where I actually managed to make, from scratch, a decent Saguaro cactus, and get this, I UV mapped the bastard, by hand.
    When I thought about it in hindsight, I realized I had just done something extremely difficult in ANY modeling software...a friggin' UV mapped cactus, that I wanted BAD. I tried Sketchup first, yeah the cactus was the easy part for sure. It was the texturing in Sketchup that was a nightmare. It made and exported a separate material for each face of the mesh, all 335 of them. I tried every texturing plugin I could find and raised hell in the forums....nothing. I was stuck with an object (with collision back then), that had 335 different materials in BeamNG. Unacceptable.
    By the luck of god this thread appeared. I was happy someone was still trying to get the Sketchup to BeamNG thing under control and in a way
    everyone could understand (thank you @AIM!). Unfourtunately, I saw the usual scheme for getting collison and LOD's in there and yawned, the same damn finicky process I had learned from @jammin2222 several years back. Again, unacceptable. Then a revelation happened in this thread, @Occam's Razer posted Blender screens showing the hierarchy structure BeamNG needs to see .dae meshes and their materials/textures. For me that was all I needed to start experimenting and eventually do my cactus. There were many other "needles" that I had found through all my hours of searching but that was the biggie for me. I still don't understand why BeamNG needs those named empties like that but I don't need to...it works. This cactus of course requires basic Blender skills that are readily available all over the place and do require time to absorb, no different than Maya or anything else. The only difference is the way these different programs get to the same objective, a 3D mesh with collision and textures....period. Through all of this I eventually resigned myself to accepting the fact that for a seamless and FUN experience that would be supported for years I would have to eventually learn Blender enough to do something, anything that I was dying to get in game. A program that I could put all of my efforts into ONCE and ONCE only and the devs clearly will support forever in their quest to essentially make a custom engine out of Torque3D.

    The Blender interface is intimidating and yes, confusing. I have issues with it bigtime myself and to this day know very little of it. But I have picked
    up enough to actually be rewarded with a result I never thought even remotely possible or even remotely expecting...seriously. My learning rate with
    Blender is slow and I forget stuff and have to do it all over again, my retention of this is very weak, coupled with a manic need for immediate results.

    Okay time to end this rant! It has been said many times by many people, start with a simple textured cube and get the thing in game with collision. Do that two, three, four or ten times until it sticks....in your sleep. From there it is nothing more than adding a plethora of steps to it.

    Cheers.
     
  12. Ghost187

    Ghost187
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    400
    isnt the problem with using "visual mesh" collisions the bad performance a too complex collmesh creates? so, if you just rename the visual mesh to collmesh, wouldnt that create the same problem since it uses the same collisions as the "visible mesh" setting? or am i getting something wrong?

    i learned the hard trial and error way of using sketchup + blender to get simplyfied collmeshes, LODmeshes and such.
    today i have to say im quite comfortable with modeling in sketchup and texturing and optimizing in blender. (mostly joining the many parts and materials sketchup creates for one mesh) for statics and vehicles, something i wouldnt have dreamed of being able to do a few years ago.

    i developed a rather funny way of dealing with UV maps i guess, but ive been always happy with the results.
    bandicam.jpg
     
  13. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,735
    You are correct I believe. Simply copying the main mesh and using it as a collision mesh in Blender will result in the collision mesh being way to
    complex and resource hungry. You might as well save a step in Blender and use visible mesh in Torque.
    For colmeshes in Blender I have made a copy of the original mesh, removed just about everything but the exterior shell geometry and then
    put it's origin point back to "zero" (same as the original), select all of it and apply scale/rotation. I just make sure coordinates for both meshes
    are 0,0,0. Yeah, this is cute noob stuff for sure.

    So far the collision meshes I have played with work fine in game and are rarely a problem, surprisingly. My current headache is figuring out
    what is going on with materials. A game re-start appears to be part of the equation. Again, failure to retain.

    Your UV map screen is mind bending...migraine inducing..lol. Is that SmartUVmap?
     
  14. Ghost187

    Ghost187
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    400
    yes, i found it to meet my needs best. with the UV-selection set to "islands" it gives full controll of mapping single or multible faces with G, S, and R.
    and in "cycles - render mode" with the "viewpoint shading" set to "texture" youll see in realtime what you do on the model. its sure not the quickest way, and takes a little more effort, but it grew on me i guess.

    that crazy UV-map looks that way when i select all the faces on the model, when i work i only see the ones im working with ;)
     
    • Informative Informative x 1
  15. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,735
    Thanks for that @Ghost187!

    I have messed around with SmartUV a bit, not much. With the cactus I used the vanilla unwrap and manually adjusted each face. SmartUV
    is cool for fine control of face arrangement it looks like. I ran into brain block trying to SmartUV all the curves and threw in the towel:p. I was able to
    understand how SMuv could make complex texturing much faster though.
     
  16. Ghost187

    Ghost187
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    400
    yes, i also found out that smartUV is s#+t for curves and round stuff. vanilla unwrap does a much better job there.
    i usually try both when in question.
     
  17. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    1,499
    If you make materials with the material editor in the editor, the paths end up wrong.
    Paths should always start with /levels/mapfolder/art/ (rest goes here!)
    if you make them in the material editor in f11 map editor, they end up wrong. Please open the corresponding materials.cs file with notepad++ and edit these manually to fix.
    This has been a bug for about as long as I have been mapping (2+ years).

    If your mesh can't find the texture itself as soon as you bring the mesh in it's a discrepancy with the material called from the mesh not finding a like-named MAPTO field in your materials.cs file. Otherwise, it's the above, especially if the textures 'worked initially but not after I restart the application/game'.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice