Concave Collision Model?

Got problems with your models? Struggling with textures? Get help with your custom assets.

Concave Collision Model?

Postby Oninnaise on Sun Sep 30, 2012 11:42 am

Hi,
I have a model of a shack, and I'm trying to make a concave collision model for it, so you can walk through it.
I've looked on the Source SDK Documentation and on several other places, but the explanation is vague so I don't understand it. I've tried several ways, including Wall Worm Model Tools. But every time I export the model, it ends up with a box collision model around it, so I can't walk through it.

The model in question is :
Image

Is there anyone that could direct me to an tutorial or explanation that's more new people friendly, or explain to me how I could make a proper collision model for it?
Oninnaise
Dumpling
Dumpling
 
Joined: Sun Sep 30, 2012 11:30 am

Re: Concave Collision Model?

Postby Gambini on Sun Sep 30, 2012 12:37 pm

Hi. Well I´m kinof in a hurry to explain everything so excuse these brief pointers.

1- For what it is. it would work and look much better as brushwork than as model, but whatever floats your boat.
2- It looks like made with propper, if so, turn into world brushes all the blocking brushes and try to compile it. The problem may be that it exceeds the 40 pieces collision model limit. So you have to add this in the collision line:
Code: Select all
{
   $concave
   $maxconvexpieces xxx//the ammout of single pieces that compose your collision model
}

But being that the case you´d have to hijack the qc file generated by propper and compile it yourself. As propper will overwrite it everytime you compile.

3- In case you used a regular 3d application. You´ll have to create a new model that matches the collision of that mesh in the simplest way as possible. But it is important that it has to be made of single geometry pieces without concave angles and without removed faces. Once you created all pieces, merge them in a single object (without welding boundary edges) and apply any UV projection on it. Finally, all faces of this mesh must share the same smoothing group. This will differ from 3d tool to 3d tool, but in 3dstudio it´s done by selecting all faces and applying one single smoothing group and in Softimage XSI you have to select the mesh, go to Render > Get > Property > Geometry Approximation > Polygon Mesh and then uncheck the discontinuity box.

4- Finally, when compiling your model remember to add in this for your collision details:

Code: Select all
 $collisionmodel "thecollisionmodelfilename"
 {
   $concave  //so it´s concave
   $maxconvexpieces 120 //this number is the amount of pieces of which the collision model is composed
}


If still, the collision model is convex, then you did something wrong.
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Concave Collision Model?

Postby nub on Sun Sep 30, 2012 5:43 pm

The other option is to make it a model with propper but use no collision model, then create a basic brush structure with the clip texture, to sort of give the model a makeshift collision model. The only problem with doing this is you're stuck with a generic surface property and bullets will pass through the model (I think). It's not ideal but it's the easiest solution. You MIGHT be able to make a new tool texture that has a wooden surface property, but does not render at all. I know there used to be an invisible metal tool texture that Valve used before.
User avatar
nub
Veteran
Veteran
 
Joined: Tue Nov 15, 2005 1:11 am
Location: Charlotte, NC, US

Re: Concave Collision Model?

Postby kraid on Mon Oct 01, 2012 12:13 pm

AFAIK, the limit for collision model pieces is 72 with $maxconvexpieces and 20 without.
Assuming that there is a reason for this to be models instead of brushwork, i'd split it up into several models.
If you need a tutorial on such a specific thing like collision mesh setup, you also should give some information about the programs you used to create this prop.
Goldeneye Source v4.2.3
get it now and play for FREE!!!
http://www.goldeneyesource.net
kraid
Been Here A While
Been Here A While
 
Joined: Thu Jan 22, 2009 12:09 pm

Re: Concave Collision Model?

Postby Kosire on Mon Oct 01, 2012 12:17 pm

kraid wrote:AFAIK, the limit for collision model pieces is 72 with $maxconvexpieces and 20 without.
Assuming that there is a reason for this to be models instead of brushwork, i'd split it up into several models.
If you need a tutorial on such a specific thing like collision mesh setup, you also should give some information about the programs you used to create this prop.


You can set $maxconvexpieces to whatever you want. 200 if you want 200 convex pieces, not 72.
User avatar
Kosire
1337 p0st3r
1337 p0st3r
 
Joined: Sat Mar 07, 2009 7:25 pm
Location: Denmark

Re: Concave Collision Model?

Postby Oninnaise on Mon Oct 01, 2012 3:16 pm

Hi, thank you for your replies. I'm sorry I haven't been able to reply any sooner.So far I still haven't gotten it to work. The program i used for the mesh was 3ds max.
If there's anything else that's needed, please ask and I'll try to answer.
Oninnaise
Dumpling
Dumpling
 
Joined: Sun Sep 30, 2012 11:30 am

Re: Concave Collision Model?

Postby Kosire on Mon Oct 01, 2012 4:09 pm

Oninnaise wrote:Hi, thank you for your replies. I'm sorry I haven't been able to reply any sooner.So far I still haven't gotten it to work. The program i used for the mesh was 3ds max.
If there's anything else that's needed, please ask and I'll try to answer.


There is this guide on how to do it, but he uses XSI.. maybe you can use it though?

http://gamebanana.com/source/tuts/8337
User avatar
Kosire
1337 p0st3r
1337 p0st3r
 
Joined: Sat Mar 07, 2009 7:25 pm
Location: Denmark

Re: Concave Collision Model?

Postby Oninnaise on Mon Oct 01, 2012 4:33 pm

Thank you for the link, I might try it with XSI if I can't figure out anything else, since it's a free program after all.
Oninnaise
Dumpling
Dumpling
 
Joined: Sun Sep 30, 2012 11:30 am

Re: Concave Collision Model?

Postby Gambini on Mon Oct 01, 2012 11:41 pm

kraid wrote:AFAIK, the limit for collision model pieces is 72 with $maxconvexpieces and 20 without.
Assuming that there is a reason for this to be models instead of brushwork, i'd split it up into several models.
If you need a tutorial on such a specific thing like collision mesh setup, you also should give some information about the programs you used to create this prop.


I think that´s not right. I have models with more than 100 convex pieces.

Oninnaise wrote:Thank you for the link, I might try it with XSI if I can't figure out anything else, since it's a free program after all.


It is very easy man. Just cover the model geometry with blocks, then merge all these blocks into one mesh, apply a UV projection and add a smoothing group to all surfaces. Then, export this new mesh.
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Concave Collision Model?

Postby kraid on Tue Oct 02, 2012 3:14 am

Maybe it depends on the engine version.
Last time i tried, i think it was on original orangebox even long before it became source 2007.
Goldeneye Source v4.2.3
get it now and play for FREE!!!
http://www.goldeneyesource.net
kraid
Been Here A While
Been Here A While
 
Joined: Thu Jan 22, 2009 12:09 pm

Re: Concave Collision Model?

Postby Stormy on Fri Oct 05, 2012 8:54 pm

If you made it in a 3d program, not propper, then it should be fairly simple (actually complicated and frustrating if it's your first).

0. Drop whatever shitty modelling program you're using and get blender
0a. Lrn2blender
0b. Get the SMDtools plugin

1. Make the physmesh very simple - you don't need to have the same resolution as the ref mesh (see attached image)
2. Make the physmesh out of separate non-intersecting contiguous meshes (cubes in your case)
3. Assign a material to your physmesh - I usually use the same material as the ref mesh
4. Smooth shade your physmesh - I think Max uses smoothing groups
5. Unwrap your physmesh - the engine needs uv data to read hits. I don't think it matters if the UVs overlap but try it either way
6. Make sure all your face normals are facing the right direction (ie: out)
7. include the following in your .qc file:
Code: Select all
$collisionmodel physmesh // < the name of your physics mesh smd exported from max
// (if it is not in the same directory as your .qc you'll also need to provide the path)
{
    $concave
}

8. Use a batch file when compiling your qc (found here) so you can see the error that studiomdl spits out.
9. Google your error. If you can't find a solution, ask lopers
10. Become a qc pro and offer your help to other noobs - remember: you were a noob once too.
Attachments
pain.PNG
paintover of collision mesh
(355.38 KiB) Not downloaded yet
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users