[VideoTutorial] - Exporting static objects with collision

Discussion in 'Content Creation' started by Nadeox1, Oct 5, 2013.

  1. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,685
    #1 Nadeox1, Oct 5, 2013
    Last edited by a moderator: Oct 21, 2015
  2. BiscoMix

    BiscoMix
    Expand Collapse

    Joined:
    Sep 29, 2013
    Messages:
    57
    I'm having an issue where the car is floating above the object. Both the object and the mesh are lined up perfectly.

    Here is a screenshot of the issue, and my project file. No, the car is not in a mid-jump, neither. Haha
     

    Attached Files:

    • ramp-mesh-problem.jpg
    • blendersetup.jpg
  3. Holland

    Holland
    Expand Collapse

    Joined:
    May 23, 2013
    Messages:
    982
    You need to move the object right below the vehicle's tires.
     
  4. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,685
    Sometimes I noticed that the collision model was slightly offset like that, and it fixed itself by reloading beamng.
    Or you have the model under the ground (in that case move it above).
     
  5. moosedks

    moosedks
    Expand Collapse

    Joined:
    Nov 4, 2012
    Messages:
    1,112
    screenshot_00011.png

    half of my model is darker colored like if it were in a shadow and it sucks the cars down instead on having them on top. I think it's something I did wrong in blender but I don't know
     
  6. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,685
    Check if the normals are right, there should take be any back face (in blender disable the double sided thing and you will see the faces facing the wrong direction).
    As for the colour, check the material.
     
  7. moosedks

    moosedks
    Expand Collapse

    Joined:
    Nov 4, 2012
    Messages:
    1,112
    How do I disable double sided in blender?
     
  8. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,685
    Google, it's not hard.


    Oh well, the first circle.



    I swapped cos the first picture was wrong, this one is correct.
     
    #8 Nadeox1, Oct 6, 2013
    Last edited: Oct 6, 2013
  9. moosedks

    moosedks
    Expand Collapse

    Joined:
    Nov 4, 2012
    Messages:
    1,112
    I like how you went from "google" to "meh" with a picture (that was actually helpful) and now back to "Google, it's not hard." thanks for the help though
     
  10. BiscoMix

    BiscoMix
    Expand Collapse

    Joined:
    Sep 29, 2013
    Messages:
    57
    I took your advice and I made sure to put the model above the grid. I also imported the "fullsize" car into another layer for reference, which you'll see in my first example image. I completely delete the car model before exporting the .DAE file. Now the car isn't floating, but rather going inside of the object, but not completely. It's like the collision mesh is offset when it shouldn't be.

    Also, I completely started the object over just in-case I did something wrong along the way, so this isn't the same model object I posted above.

    Here are the images:

    - - - Updated - - -

    I figured out the issue! It had to do with the origin not being centered on the object, most likely because of its shape.

    Here is how I fixed the issue for anybody else who runs into this problem:

    1: Select the object in 'Object Mode'.
    2. On the left panel called 'Object Tools', click on 'Origin' and select 'Origin to Geometry' from the menu.
    3. Now line the object back to the center point.

    The same thing has to be done with the colmesh-1, but you would probably be better off deleting your colmesh-1 and reduplicating your object after centering the origin and object.
     

    Attached Files:

    • Blender-Ramp-Setup-1.jpg
    • Blender-Ramp-Setup-2.jpg
    • Blender-Ramp-Setup-3.jpg
  11. LSDMT420

    LSDMT420
    Expand Collapse

    Joined:
    Aug 23, 2013
    Messages:
    386
    Hey Nadeox1,

    Thank you so much for this tutorial, it was extremely helpful! I'm having a problem I hope you guys can help me with. I created a sphere in blender and cut an opening to drive into it, then I followed the guide for creating the collision mesh. Collisions from outside of the sphere are working perfectly, however when inside I can still drive through the object (I do take some damage though). I made a short video showing what I'm talking about, any ideas on what I did wrong and how to fix it?

     
    #11 LSDMT420, Oct 11, 2013
    Last edited by a moderator: Oct 21, 2015
  12. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,685
    Collsiions works only in 1 direction (the way the face is facing).
    Your normals are doing like this, facing outward, and not inward, so you have collision only if you come from outside.


    (imported from here)

    You have to solidify your model by making the internal part too, so you will have something like this:


    (imported from here)

    If you use blender you can easily do that with the Solidify modifier.
     
  13. NkosiKarbul

    NkosiKarbul
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    438
    Very good thread nadeox1!
    Will hopefully bring more people modeling new static objects. :)
    But i think taking LODs into it would be good, because if all learn to create stuff here but never use LODs we will have lots of props and models which cost more performance than realy needed. :/
    Took me quite some time to figure LODs myself but i think its worth to learn it.
     
  14. LSDMT420

    LSDMT420
    Expand Collapse

    Joined:
    Aug 23, 2013
    Messages:
    386
    Thanks you for the quick response, this is exactly what I needed! I didn't even know what the solidify tool was :)
     
  15. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
    hello, this is a great tutorial but i have a question. is it possible to have a uv mapped texture on the object?. im not very good with uv mapping but i did apply one to the object in blender (uv unwrap with marked edges then apply image, then go under the textures tab and change it so that the texture is there then when exporting check the "include uv textures") the tutorial i followed is here. the only problem is the textures dont show up on my object. also there are no textures for my object in the play i exported it too. Do i need to include my blend in this post so that you can look?

    thanks
    narwhal2
     
  16. BiscoMix

    BiscoMix
    Expand Collapse

    Joined:
    Sep 29, 2013
    Messages:
    57
    In my experience Blender doesn't create the texture files (or UV map) when you export the .dae. You have to export the UV map and edit it in Photoshop/ Gimp, etc. Once you've done that, you apply the UV map to the model inside of the BeamNG editor.
     
  17. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
    ok, thanks for the help
     
  18. Deewad

    Deewad
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    240
    Good Tutorial, But i'm having a problem, I've tried it multiple times now and I cannot figure it out, The collision is always off, In the attachment, Where the truck is stopped, It has hit some kind of collision, But that is the only collision on the model, any help would be great
     

    Attached Files:

    • Capture.JPG
    • Capture2.JPG
  19. moosedks

    moosedks
    Expand Collapse

    Joined:
    Nov 4, 2012
    Messages:
    1,112
    try deleting the cached file of the ramp. I had a problem where i had no collision AFTER I replaced an improperly set up mesh with a proper one and deleting the cached file fixed it. It's not the same issue as yours i guess but I think it's worth a try.
     
  20. Deewad

    Deewad
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    240
    Didn't change anything, Thanks though, Here is my blend file if anyone cares to take a look
     

    Attached Files:

  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