Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: Compound Mesh Collision  (Read 8249 times)

Occams Razer

  • Jr. Member
  • *
  • Posts: 48
  • Freelance Graphic and Game Designer, 3D Artist
Compound Mesh Collision
« on: March 30, 2016, 11:52:53 pm »

Hello, all.

With the release of the most recent update, I've taken a bit of an interest in making a few objects for Outerra. While I'm a long, long way from an expert and there's far more for me to learn from this point1, I do wish to ask how to create compound collision or custom collision boundaries for static objects. In the most recent TitanIM thread, Cameni said that it was already possible to do so (http://forum.outerra.com/index.php?topic=3469.0), but there seems to be little to no existing documentation on the importer.

I only ask because most of the more exciting things I can think to create would involve interiors, elevated walkways, tunnels, and bridges, which will make far more interesting places to lounge around or explore when vehicle and character collision get fully rounded off. Future-proofing, y'know? :P

1"I made a cube." - the song of the prospective content creator.
Logged

zzz

  • Sr. Member
  • ****
  • Posts: 266
  • newbie
Re: Compound Mesh Collision
« Reply #1 on: April 02, 2016, 04:04:58 pm »

If you add a two wheels to a geom object that object gets a cuboid collision mesh using the max dimensions of the object.

There was some discussion about using simple objects like cones and cynlinders and boxes as collision meshes in one of the updates, but as you said, no documentation.
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Compound Mesh Collision
« Reply #2 on: April 03, 2016, 02:12:07 am »

If there are no collision shapes defined, bounding box is used, even on static objects.

There's a brief doc describing what the engine expects for collision shapes. There's a also a convex hull mesh, but if possible, predefined shapes are more efficient.
Logged

Occams Razer

  • Jr. Member
  • *
  • Posts: 48
  • Freelance Graphic and Game Designer, 3D Artist
Re: Compound Mesh Collision
« Reply #3 on: April 04, 2016, 01:17:03 am »

If there are no collision shapes defined, bounding box is used, even on static objects.

There's a brief doc describing what the engine expects for collision shapes. There's a also a convex hull mesh, but if possible, predefined shapes are more efficient.

I know forum work isn't the highest of priorities, but I wish there were a 'thanks' button for this type of occasion. Thank you.

So, if you don't mind me asking, how long do you think till we can walk and drive on and in our creations? No rush, I know getting rivers up to snuff is a difficult challenge and I don't envy you there.
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 760
  • Love OT!
Re: Compound Mesh Collision
« Reply #4 on: April 04, 2016, 01:33:33 am »

Hi!

By the moment you can drive over meshes, but the vehicle have no friction over them (to explain it somehow). I made a high pass (which you'll be able to test when JBLM scenery is released), and you can cross over it if you have enough speed.
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

Occams Razer

  • Jr. Member
  • *
  • Posts: 48
  • Freelance Graphic and Game Designer, 3D Artist
Re: Compound Mesh Collision
« Reply #5 on: April 04, 2016, 02:36:03 am »

Hi!

By the moment you can drive over meshes, but the vehicle have no friction over them (to explain it somehow). I made a high pass (which you'll be able to test when JBLM scenery is released), and you can cross over it if you have enough speed.

Actually, I think it might be that the vehicle bounds can collide with static objects, but not the vehicles' wheels. I tested that earlier by driving over another mesh of mine that had been pushed far into the ground, to where only the topmost centimeter or so was showing. Driving the wheels of the Tatra over it didn't seem to produce any motion at all on their part. You can test this further by dropping a Tatra onto one of the hangars, you'll be able to see the suspension fully decompressing and the wheels phasing through the point of the roof.

Not to say that I'm right, of course. I'm still pretty new to this program.
Logged

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: Compound Mesh Collision
« Reply #6 on: January 19, 2018, 10:15:41 pm »

I know the average user on this site is highly knowledgeable about the rules of moving things into Outerra. But, there are newbies like me who pass through from time to time, looking for information on how to do the most fundamental things. 

One of those things is how to add collision geometry to imported objects. I've been trying to make a bridge over which cars can drive, and under which boats can sail... Today I finally got something simple to work.

Here is a tutorial showing what I did:



Here is a link to the OTX installer for the bridge in the tutorial, in case anybody wants to mess with it:
https://www.dropbox.com/s/c96re43nbf8gta6/bridge.patmarrnc.otx?dl=0
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 760
  • Love OT!
Re: Compound Mesh Collision
« Reply #7 on: January 19, 2018, 11:01:01 pm »

Hi, patmarrnc!

As far as I know COL_BOX needs to be actually a box, so should have only four vertices. If I understand well how it works, rather than looking at the position of each vertex, the collision is calculated matematically based on the dimensions of that box. From this document:

https://docs.google.com/document/d/1hazxl5cZqoJOSgF6Az7O9j1tbX-i5jU2JqTaD-SC5zc/edit#

"Shape is defined from AABB’s half vector."

 If you need more precition, would be better to use a COL_CONVEX, keepeing the polycount as low as possible, no UVs and soft shading.
« Last Edit: January 19, 2018, 11:08:20 pm by KW71 »
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: Compound Mesh Collision
« Reply #8 on: January 19, 2018, 11:56:40 pm »

Hi, patmarrnc!

As far as I know COL_BOX needs to be actually a box, so should have only four vertices.
Hey, thanks for helping me out KW71! I appreciate your input! Four vertices would make it 2 dimensional... is that what you mean?


 
Quote
If I understand well how it works, rather than looking at the position of each vertex, the collision is calculated matematically based on the dimensions of that box. From this document:

https://docs.google.com/document/d/1hazxl5cZqoJOSgF6Az7O9j1tbX-i5jU2JqTaD-SC5zc/edit#

"Shape is defined from AABB’s half vector."

 If you need more precition, would be better to use a COL_CONVEX, keepeing the polycount as low as possible, no UVs and soft shading.

Thanks. You've given me some new information with which to experiment!
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 760
  • Love OT!
Re: Compound Mesh Collision
« Reply #9 on: January 20, 2018, 11:48:56 am »


Hey, thanks for helping me out KW71! I appreciate your input! Four vertices would make it 2 dimensional... is that what you mean?


 Sorry, I mean 8!!  :facepalm:  I should not type when I'm sleepy! :D
Logged
"A man who is contented with what he has done, will never become famous for what he will do".