Removing Collision from Complex DIFs
by Nick Zafiris · in Artist Corner · 11/09/2004 (11:52 pm) · 4 replies
Hello all, for our project we're building a lot of ruined/destroyed buildings that the player would not neccessarily enter but will pass in front of. The walls are broken up into many many pieces. Off course most of them are irregular shapes, not squares. Some of the pieces touch each other and some don't.
My question is, since DIFs produce pixel perfect collision for every single brush, is there a way to remove it in order to reduce the performance loss? It's uneccessary to have collision for all those pieces. Sometimes when I put too many buildings in, the engine crashes and I think this is what's causing this.
In other words, if I have a straight wall that is composed of many small pieces, can I just have one collision brush around the whole wall instead of tens?
I'm currently using Hammer but is it editor, map2dif, or engine related?
Any help would be appreciated,
Nick
My question is, since DIFs produce pixel perfect collision for every single brush, is there a way to remove it in order to reduce the performance loss? It's uneccessary to have collision for all those pieces. Sometimes when I put too many buildings in, the engine crashes and I think this is what's causing this.
In other words, if I have a straight wall that is composed of many small pieces, can I just have one collision brush around the whole wall instead of tens?
I'm currently using Hammer but is it editor, map2dif, or engine related?
Any help would be appreciated,
Nick
#2
So in reality, the buildings will in the end be DTS objects instead of DIFs? That shouldn't be a problem.
However, I don't think exporting each "broken" wall piece in a separate .map file is possible. There could be as many as 100 or 200 irregular brushes in a building. It would be a very tedious process. Can I select multiple ones and perform the same process you mentioned?
About your second option, can you briefly explain how to create the collision brushes? I found 2 older posts regarding collision brushes. Any idea which one is better?
"If you want to create collision brushes, use the Null texture on the brush in a DETAIL entity. Don't use the collision entity."
or
"If you try to create a .dif with too many oddly angled surfaces, it simply won't compile properley, regardless of the size. The only solution in these cases it to create the object with tetrahedrons [the simplest brush possible]. This will usually require you to use a seperate collision mesh [by defining collision brushes] to avoid serious slowdown when collision detection is being perform [especially with smaller objects]. Currently once you use collision brushes, any non-collision brush becomes passable"
Nick
11/10/2004 (1:18 pm)
Thanks Matthew,So in reality, the buildings will in the end be DTS objects instead of DIFs? That shouldn't be a problem.
However, I don't think exporting each "broken" wall piece in a separate .map file is possible. There could be as many as 100 or 200 irregular brushes in a building. It would be a very tedious process. Can I select multiple ones and perform the same process you mentioned?
About your second option, can you briefly explain how to create the collision brushes? I found 2 older posts regarding collision brushes. Any idea which one is better?
"If you want to create collision brushes, use the Null texture on the brush in a DETAIL entity. Don't use the collision entity."
or
"If you try to create a .dif with too many oddly angled surfaces, it simply won't compile properley, regardless of the size. The only solution in these cases it to create the object with tetrahedrons [the simplest brush possible]. This will usually require you to use a seperate collision mesh [by defining collision brushes] to avoid serious slowdown when collision detection is being perform [especially with smaller objects]. Currently once you use collision brushes, any non-collision brush becomes passable"
Nick
#3
You can cut/paste portions of an interior from one Hammer level to another (File->New, Edit->Paste) and then export the new "level" that is just made up of the broken up wall.
11/10/2004 (1:57 pm)
Just right-click on the brush, choose "Tie to Entity", and pick "collision" from the drop down (same way for detail brushes).You can cut/paste portions of an interior from one Hammer level to another (File->New, Edit->Paste) and then export the new "level" that is just made up of the broken up wall.
Associate Matt Fairfax
PopCap
The best way would probably be to use my map23ds utility. You would export all of those bits that you don't want to collide with into their own .map file, convert them to 3ds, import them into the modeller of your choice (max/maya/milkshape/blender), export them as a dts w/o a collision mesh or with a simplified collision mesh.
The other option is to make use of the collision brush entities in Hammer but iirc you will have to then hand generate/designate *all* of the brushes needed for collision.