Havnig a brutal time with collision mesh export in Milkshape
by Flybynight Studios · in Artist Corner · 08/28/2008 (6:27 pm) · 7 replies
I'm real sorry this seems so obvious but I just cant get it to work and I need to know where Im breakign it.
I've tried using the DTS exporter and the DTS exporter Plus and here is what happens..
If I create a collision mesh and place it beside my model... it works and collides.. When I place the collision mesh "around" my model there is no collision on the export..
Now something I read is that your model should not ever break the collision mesh.. is that true? In my case it's a large doorway/gate that the character walks under with a porticulis. The wooden gate is at a 90degree angle from the top of the gate so it's a real pain in the arse to make the model not colide with the collision mesh.
Is that possibly my issue? If so I'll take the time to do it right but its goign to be annoying.
thanks in advance.
I've tried using the DTS exporter and the DTS exporter Plus and here is what happens..
If I create a collision mesh and place it beside my model... it works and collides.. When I place the collision mesh "around" my model there is no collision on the export..
Now something I read is that your model should not ever break the collision mesh.. is that true? In my case it's a large doorway/gate that the character walks under with a porticulis. The wooden gate is at a 90degree angle from the top of the gate so it's a real pain in the arse to make the model not colide with the collision mesh.
Is that possibly my issue? If so I'll take the time to do it right but its goign to be annoying.
thanks in advance.
#2
I'll see if I can toss the model over this morning. Thanks again for your efforts.
08/29/2008 (7:47 am)
Don't think I wont take you up on that Ross :) Appreciate your taking a peek at the collision on your end. I dont recall having these kinds of problems a couple years back when I was working in Milkshape. I'm sur eI must be doing something stupid but I am completely missing the problem.I'll see if I can toss the model over this morning. Thanks again for your efforts.
#3
http://www.aakrana.com/temp/gate2.dts
http://www.aakrana.com/temp/gate2.ms3d
thanks again :)
08/29/2008 (7:58 am)
Can't see your email addy so I just dumped them on my site temporarily:http://www.aakrana.com/temp/gate2.dts
http://www.aakrana.com/temp/gate2.ms3d
thanks again :)
#4
There's a couple problems in your file.
1. There's no collision mesh at the top, just the 2 vertical ones, so when its working, you still can't walk across the top. (This is more of a art problem not a tech problem.)
2. The numbers at the end of your groupnames dictate LODs, and it doesn't seem you are following the right method. For a no LOD shape, all the mesh groups must end in 0. You have a few that end in 1 or 2. This causes your stock gate file to display only 1 shape, the highest number I believe. Turn them all to zero (not the collision one) and they will display in game. (gatelatch0, gatetop0, if you need a dupe of the same name, you gotta keep the end numbers clean.... gatetopA0, gatetopB0, works).
3. Your collision mesh. I don't think this is a problem that will break it, its more an issue for LOS_Collision meshes, its a good practice to keep each collision mesh group to a single primitive. This is a must for LOS-Cols, or they flat out wont work. But normal Collision-1's can actually be complex shapes and not break. (much better performance to use primitives).
I broke your Collision-1 into 2 separate groups, adding Collision-2 for the second one.
It all worked fine, let me know if you are still having trouble.
Jondo
08/29/2008 (8:42 am)
@Flybynight StudiosThere's a couple problems in your file.
1. There's no collision mesh at the top, just the 2 vertical ones, so when its working, you still can't walk across the top. (This is more of a art problem not a tech problem.)
2. The numbers at the end of your groupnames dictate LODs, and it doesn't seem you are following the right method. For a no LOD shape, all the mesh groups must end in 0. You have a few that end in 1 or 2. This causes your stock gate file to display only 1 shape, the highest number I believe. Turn them all to zero (not the collision one) and they will display in game. (gatelatch0, gatetop0, if you need a dupe of the same name, you gotta keep the end numbers clean.... gatetopA0, gatetopB0, works).
3. Your collision mesh. I don't think this is a problem that will break it, its more an issue for LOS_Collision meshes, its a good practice to keep each collision mesh group to a single primitive. This is a must for LOS-Cols, or they flat out wont work. But normal Collision-1's can actually be complex shapes and not break. (much better performance to use primitives).
I broke your Collision-1 into 2 separate groups, adding Collision-2 for the second one.
It all worked fine, let me know if you are still having trouble.
Jondo
#5
So anyways I understand that the top of my structure wont have collision at this point I jsut wanted to figure out what I was doing wrong. appreciate the insight. I'll go play with it right now :)
08/29/2008 (9:01 am)
Grr yeah I noticed that about the numbering of my groups. It's an old habit and I know I can't do that. I'll have to switch to the Alpha method you suggested. I wonder if that's what was causing my collision issue?So anyways I understand that the top of my structure wont have collision at this point I jsut wanted to figure out what I was doing wrong. appreciate the insight. I'll go play with it right now :)
#6
Another question though. For a simple shape like that am I correct in using DTS with collision or using DIF? I am thinking more in regards to performance. From what I can tell a DTS with a collision mesh can be very performance chewing. Where as DIFs are less. I guess what I am asking is am I correct to use DTS shapes where I can just toss a simple bounding box around a couple pieces to setup collision or should I really be doing most of my collision stuff that is more than say 20 faces in DIF?
Thanks so much all for your help.
08/29/2008 (9:07 am)
Outstanding Jondo, thank you. That fixed it. Just my screwey way of labelling. All better now.Another question though. For a simple shape like that am I correct in using DTS with collision or using DIF? I am thinking more in regards to performance. From what I can tell a DTS with a collision mesh can be very performance chewing. Where as DIFs are less. I guess what I am asking is am I correct to use DTS shapes where I can just toss a simple bounding box around a couple pieces to setup collision or should I really be doing most of my collision stuff that is more than say 20 faces in DIF?
Thanks so much all for your help.
#7
I am sure most peeps here would say use .dif over .dts whenever possible, which is probably the best choice. But it really depends if you have alot going on in your scene or not. I believe the true performance issues from using .dts is directly related to the complexity of the collision mesh, not much else. <-- Don't really know for sure, am a nub still.
Its my understanding that if you have simple primitives as your Col meshes, its practically the same, since thats part of what .difs do - build it all out of simple shapes.
If the geometry of the art itself doesn't require organic looking shapes, go with .difs to be safe. Of course there are limitations and not many options for pipelines. These days alot of people have opted for polysoup, which I know little about but it blows the doors off this whole discussion. Look into it.
Jondo
08/29/2008 (11:17 am)
Glad I could be of service.I am sure most peeps here would say use .dif over .dts whenever possible, which is probably the best choice. But it really depends if you have alot going on in your scene or not. I believe the true performance issues from using .dts is directly related to the complexity of the collision mesh, not much else. <-- Don't really know for sure, am a nub still.
Its my understanding that if you have simple primitives as your Col meshes, its practically the same, since thats part of what .difs do - build it all out of simple shapes.
If the geometry of the art itself doesn't require organic looking shapes, go with .difs to be safe. Of course there are limitations and not many options for pipelines. These days alot of people have opted for polysoup, which I know little about but it blows the doors off this whole discussion. Look into it.
Jondo
Torque 3D Owner Ross Cook
Created a very crude 3 box model, 2 upright supports with a plinth on top that extends beyond the width of the supports, an approximation of what I think you're describing. Placed the collision mesh around the supports, full height of the model but with the extended face of the plinth outside the collision mesh. Collision behaved as expected. Also tested having a tiny collision mesh with the model overlapping it on all sides and it behaved as expected.
I can't offer any real advice, just learning the ropes with Milkshape myself so wanted to check it for future reference. If you want to punt your model or an example of the problem this way I'll cast an inexperienced eye over it. :)