DTS Collision issue
by Chris Labombard · in Torque Game Engine · 09/08/2005 (9:54 am) · 23 replies
I'm having an issue with DTS collisions.
I have set up a large dome that is entirely convex. and set it up to also be a collisoin mesh. My player can walk on it fine, but when I fire a projectile at it, the projectile goes right through it. Has anyone experienced similair issues before ? What is the root cause ? The projectiles hit every other dts object just fine.
I haven't tried fixing hte issue yet, by splitting the dome up into 4 peices. Hopefully that will solve the problem.
I have set up a large dome that is entirely convex. and set it up to also be a collisoin mesh. My player can walk on it fine, but when I fire a projectile at it, the projectile goes right through it. Has anyone experienced similair issues before ? What is the root cause ? The projectiles hit every other dts object just fine.
I haven't tried fixing hte issue yet, by splitting the dome up into 4 peices. Hopefully that will solve the problem.
About the author
I have been a professional game programmer for over 5 years now. I've worked on virtually every platform, dozens of games and released a few of my own games, including 2 iPhone titles and a title waiting release on Big Fish Games.
#2
here are some sreenshots
I can stand on the object
The projectile past it
The collision mesh in my object are the same as the object,
I just make a duplication of the mesh for the collision.
The wierd thing is that I do the same thing in every object and some of them
are fine and some got this problem.
I export with Milkshape3D.
09/10/2005 (2:12 am)
I got ths same problem for a while and I don't know how to fix ithere are some sreenshots
I can stand on the object
The projectile past it
The collision mesh in my object are the same as the object,
I just make a duplication of the mesh for the collision.
The wierd thing is that I do the same thing in every object and some of them
are fine and some got this problem.
I export with Milkshape3D.
#3
And your object is entirely convex?
09/10/2005 (3:29 am)
Quote:
The collision mesh in my object are the same as the object
And your object is entirely convex?
#4
Check out the dts chapter int the tge official documentations
09/10/2005 (4:17 am)
Forgive me if I'm wrong but dont you have to create a LOS (Line of Sight) collision object to get the projectiles to hit it?Check out the dts chapter int the tge official documentations
#5
you mean if the are holes in my object?
so no the entire object is a cube with extrude, I didn't
add or deleted any face.
I have a few objects in the scene with this problem.
I use the default projectile that come with TGE and I think the have LOS
plus the shot hit some objects and some not.
09/10/2005 (8:16 am)
Quote:And your object is entirely convex?
you mean if the are holes in my object?
so no the entire object is a cube with extrude, I didn't
add or deleted any face.
I have a few objects in the scene with this problem.
Quote:Forgive me if Im wrong but dont you have to create a LOS (Line of Sight) collision object to get the projectiles to hit it?
Check out the dts chapter int the tge official documentations
I use the default projectile that come with TGE and I think the have LOS
plus the shot hit some objects and some not.
#6
From your screenshots, your object does -not- look Convex, it looks very, very concave.
09/10/2005 (8:27 am)
Convex means that all the object bulges outwards, ie, /\, not inward EVER, IE, \_. Also, LOS collision is a shape thing, but I have never needed one.From your screenshots, your object does -not- look Convex, it looks very, very concave.
#8
Your collision mesh MUST be convex. By convex, I mean:
If you were to put 2 points at any area inside the shape, and join them with a segment, the segment cannot ever protrude outside of the shape.
I would suggest redoing your collision mesh and making it convex, then re-exporting the shape.
BTW, Is your texture map grey, or is it not loading a texture?
-Griff
09/10/2005 (12:37 pm)
This is probably because your shape looks concave. Although, this isnt a problem in itself, since you said your collision mesh was exactly the same, it is a problem. Your collision mesh MUST be convex. By convex, I mean:
If you were to put 2 points at any area inside the shape, and join them with a segment, the segment cannot ever protrude outside of the shape.
I would suggest redoing your collision mesh and making it convex, then re-exporting the shape.
BTW, Is your texture map grey, or is it not loading a texture?
-Griff
#9
The projectile, however, is a home brew, and probably doesnt have LOS. I don't know how to do that. I will chek it out and see if it resolves the issue... However, the projectile hits ALL other DTS's, which tells me that probably isnt the issue.
09/11/2005 (8:24 am)
My collision mesh IS convex. And it works perfectly for my player.The projectile, however, is a home brew, and probably doesnt have LOS. I don't know how to do that. I will chek it out and see if it resolves the issue... However, the projectile hits ALL other DTS's, which tells me that probably isnt the issue.
#10
In my game the projectile also hit some objects and some not, realy wierd.
09/12/2005 (4:06 am)
Quote:the projectile hits ALL other DTS's, which tells me that probably isnt the issue
In my game the projectile also hit some objects and some not, realy wierd.
#11
09/12/2005 (6:12 am)
We didn't tell you to give the projectile a LOS Collision, we told you to give the object LOS Collision -- the projectiles work by raycast.
#12
Still behaves the exact same way.
Any other ideas ?
09/12/2005 (6:51 am)
Ok. I gave the object LOS collision by creating a convex mesh in milkshape and naming it LOSCol-9Still behaves the exact same way.
Any other ideas ?
#13
Your mesh is not convex.
Chris,
Can't help you without seeing your collision mesh. The player can collide just fine with a concave collision mesh but a projectile is going to have major issues (will collide at certain angles occaissionally....but mostly won't collide).
09/12/2005 (2:28 pm)
Eran,Your mesh is not convex.
Chris,
Can't help you without seeing your collision mesh. The player can collide just fine with a concave collision mesh but a projectile is going to have major issues (will collide at certain angles occaissionally....but mostly won't collide).
#14
Just had a big week of BSP-compliant convex shapes and came up with a few rules that seem to work for me:
1.) The collision volumes (nodes, whatever) need to be convex.
An object is convex if you can draw a straight line through any point of the object and only hit two surfaces.
This object, although un-closed, works in torque as a convex shape:

2.) The collision volumes need to be non-transparent (in MAX at least).
I thought it would be cool to assign a semi-transparent material to the collision stuff so I could see all my objects at the same time... not. If you assign a transparent material to the collision, torque behaves exactly as you describe: player stands on it, but camera and projectiles go right through.
Here's how we're making our "floating Islands" for our game:
1.) Create an interesting shape for the main body of the island. Doesn't need to be convex.
2.) Download and install GLB3
3.) use the "Map Checker" utility to convert your cool shape into a convex hull (which will look like a shapeless blob)
4.) Repeat this process for a few more objects so you have a collection of shapeless blobs.
5.) Texture these guys so they look cool.
6.) Boolean (yes I said boolean) these shapes together into one chunk.
7.) Clean up stray verts and re-texture as required.
8.) Duplicate the object. This is now your collision mesh.
9.) separate the "operands" (the original objects) from the collision mesh and name them appropriately (col-1, col-2, col-3, etc,...)
This is the best I could do without digging into Quark and the "Carve a world from a solid block" methodology.
Here's a shot of the hierarchy and geometry that is working fine (and fast) in Torque:

BTW, if anyone has info for me on This Problem, I'd sure be interested in some feedback...
Yow! Back to work!
09/12/2005 (2:54 pm)
Hey guys,Just had a big week of BSP-compliant convex shapes and came up with a few rules that seem to work for me:
1.) The collision volumes (nodes, whatever) need to be convex.
An object is convex if you can draw a straight line through any point of the object and only hit two surfaces.
This object, although un-closed, works in torque as a convex shape:

2.) The collision volumes need to be non-transparent (in MAX at least).
I thought it would be cool to assign a semi-transparent material to the collision stuff so I could see all my objects at the same time... not. If you assign a transparent material to the collision, torque behaves exactly as you describe: player stands on it, but camera and projectiles go right through.
Here's how we're making our "floating Islands" for our game:
1.) Create an interesting shape for the main body of the island. Doesn't need to be convex.
2.) Download and install GLB3
3.) use the "Map Checker" utility to convert your cool shape into a convex hull (which will look like a shapeless blob)
4.) Repeat this process for a few more objects so you have a collection of shapeless blobs.
5.) Texture these guys so they look cool.
6.) Boolean (yes I said boolean) these shapes together into one chunk.
7.) Clean up stray verts and re-texture as required.
8.) Duplicate the object. This is now your collision mesh.
9.) separate the "operands" (the original objects) from the collision mesh and name them appropriately (col-1, col-2, col-3, etc,...)
This is the best I could do without digging into Quark and the "Carve a world from a solid block" methodology.
Here's a shot of the hierarchy and geometry that is working fine (and fast) in Torque:

BTW, if anyone has info for me on This Problem, I'd sure be interested in some feedback...
Yow! Back to work!
#16
I can see the top is convex. Is the bottom just flat? If so, check and see if you have the hierarchy set up the right way (see above helpful screenshot) and make sure there's no transparency in the shader you apply to it (doesn't look like it from here, but good to check anyway).
Is the camera colliding with the object? If the camera collides but projectiles don't, then you probably have an LOS issue and not a bound issue,... I think.
Still learning this wacky engine,
lineage.
09/12/2005 (5:06 pm)
Hey Chris,I can see the top is convex. Is the bottom just flat? If so, check and see if you have the hierarchy set up the right way (see above helpful screenshot) and make sure there's no transparency in the shader you apply to it (doesn't look like it from here, but good to check anyway).
Is the camera colliding with the object? If the camera collides but projectiles don't, then you probably have an LOS issue and not a bound issue,... I think.
Still learning this wacky engine,
lineage.
#17
09/12/2005 (8:20 pm)
That's fairly high poly for a collision mesh. Too many polys can sometimes cause issues with raycasts (projectiles). I also see some tiny little polys around the edge of the top that have portential for causing issues (verts too close together so can't generate a proper normal). The other thing I see is that you have a lot of edges that are shared among nearly coplanar triangles. It is very easy to accidentally create a concave crease/edge by turning the edge the wrong way when they are so close to being concave already. It only takes one to make your mesh concave and thus your projectiles not work. You can try to switch to a flat shaded rendering and see if you can spot any odd lighting.
#18
You are probably correct.
I have come to the conclusion that either:
A) The mesh is to ocomplex that TGE isn't treating it properly in regards to collision calculations.
or
B) The mesh has a slight fault somewhere, but due to the complexity of it, I am unable to find it.
I am probably going to remodel it and see if I can fix the problem that way.
09/13/2005 (3:42 am)
Matt,You are probably correct.
I have come to the conclusion that either:
A) The mesh is to ocomplex that TGE isn't treating it properly in regards to collision calculations.
or
B) The mesh has a slight fault somewhere, but due to the complexity of it, I am unable to find it.
I am probably going to remodel it and see if I can fix the problem that way.
#19
That mesh is way less complex than most of the GE walkable surfaces I'm building.
Chris: did you use GLB3 to check the convexity?
lineage.
09/13/2005 (10:00 am)
I dunno guys,...That mesh is way less complex than most of the GE walkable surfaces I'm building.
Chris: did you use GLB3 to check the convexity?
lineage.
#20
Is GLB3 for dif's or dts's ?
Research says its a 3ds max plug in :(
It will be ten tiems quicker just to model a new one... It is a pretty simplistic shape. The issue is I dont have a clue how to set up the texture the same way in milkshape. THe individual who made it for me was using max :(
09/13/2005 (10:02 am)
Im assuming GLB3 is a max plug in. I am using milkshape.Is GLB3 for dif's or dts's ?
Research says its a 3ds max plug in :(
It will be ten tiems quicker just to model a new one... It is a pretty simplistic shape. The issue is I dont have a clue how to set up the texture the same way in milkshape. THe individual who made it for me was using max :(
Associate Matt Fairfax
PopCap