Visible Mesh collision "breaking" when scaling?

Level design, models, animations, physics, etc.
  • 1
  • 2
12 posts Page 1 of 2
Mitovo
Posts: 85
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Fri Jan 13, 2017 2:17 pm
Hello,

So, the title pretty much sums it up. I have a custom mesh I've imported into T3D, and I set the collision to "visible mesh" (I intend to create proper collision meshes at a later time, but this is just for set-up/mock-up work). I notice that I can rotate the model how ever I want and collision works fine. However, when I scale it, the collision breaks and my character runs right through it. I have multiple duplicates of the same object in my scene right now, and the ones kept at, or very near original size work fine. The ones I've scaled notably larger lose their collision.

Is there a way to fix this, or kind of "refresh" the collision to work on the larger mesh size on those objects?


And while I'm at it, a second question, can you have multiple collision meshes per object? Since collision meshes need to be convex, it would make it difficult to create a convincing looking collision mesh for an object that has an overhang or is otherwise concave in shape, without the player hitting an "invisible wall".

Thanks!
JeffR
Steering Committee
Steering Committee
Posts: 757
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Fri Jan 13, 2017 4:10 pm
For the first part: do you know if it stays broken if you scale the object, save, exit and reload? Or does it work if the object is created with the new scale? That'd help narrow things down

For the second part, yeah, you can either have collision meshes in the art file itself, which follow a naming convention(I beleive it's if the submesh is named Col-*, where the * is a number).
Alternatively, you can load the shape up in the shape editor and use the collision tab to automatically generate convex hull collision meshes. It's easier than doing it in a modelling program, but because it's automated, may not give the preferred results.

Either way, either of these methods will work.
Mitovo
Posts: 85
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Fri Jan 13, 2017 4:26 pm
JeffR wrote:For the first part: do you know if it stays broken if you scale the object, save, exit and reload? Or does it work if the object is created with the new scale? That'd help narrow things down


Hi there,

I meant to include that in the previous message, but forgot to add it. No, saving, closing and re-opening the file doesn't help. Not sure how you mean creating it with the new scale? You mean create a larger version of the object in Blender and then import that?
Mitovo
Posts: 85
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Fri Jan 13, 2017 4:42 pm
Okay, I just noticed something.

When I scale up the object, the visible mesh is increasing, but the collision size is staying the same. So, the larger I make it, I'm able to run further into the visible mesh before I hit the collision.

Now, I've tried finding a way to update the collision mesh after increasing it, but have not been able to do this.

I've also tried adding it as a new object, from the original DAE file, increasing the size first, *then* setting the collision, but that isn't working either. Still getting the same effect. The collision mesh is being created at the original size of the object.
Duion
Posts: 833
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Fri Jan 13, 2017 5:55 pm
I never had problems with that and I build levels with visible mesh collision for quite a while now.
Mitovo
Posts: 85
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Fri Jan 13, 2017 6:54 pm
Here's a video I just recorded showing what's happening. This is the process I've used for any other object I've imported, etc, and this is the first time it's doing this, at least that I can recall.

http://tinyurl.com/zp272zv

Maybe someone will see a clue in the video as to what's happening. Apologies for the awful frame-rate. Apparently Corel VideoStudio's recorder isn't very good for 3D games, and NVidia's recorder wasn't cooperating with me. Still, it gets the idea across.
Duion
Posts: 833
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Fri Jan 13, 2017 8:03 pm
I just tested myself and for me it works.
What build are you using? Are you using bullet or physX?
Mitovo
Posts: 85
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Fri Jan 13, 2017 8:14 pm
Duion wrote:I just tested myself and for me it works.
What build are you using? Are you using bullet or physX?


It's 3.8, and I'm using Physx.

I'd confirm which PhysX version, but now T3D won't get past the "loading datablocks" stage so I can get into the game/editor. Ugh lol.
Duion
Posts: 833
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Fri Jan 13, 2017 8:20 pm
Then it is probably a phsyics problem, the T3D stock physics work fine, but I encountered collision errors with bullet and/or physX before.
JeffR
Steering Committee
Steering Committee
Posts: 757
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Fri Jan 13, 2017 8:42 pm
Thanks for the details MiToVo.

I'll fire it up with PhysX and have a look. Most likely thing is when the object scale changes, that's not applied to the physics rep, so it never passes along to the physics sim.

I'll let you know what I find.
  • 1
  • 2
12 posts Page 1 of 2

Who is online

Users browsing this forum: No registered users and 1 guest