Accurate Collision Models

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

Accurate Collision Models

Postby Portalboat on Wed Sep 22, 2010 10:25 pm

I need a pretty accurate collision mesh for my model, because it's possible for the player to stand right on top of it. So I basically divided up the model (separate primitives for the main gear part and the teeth), but it gets simplified to this:

Image

How can I fix this?
Portalboat
Regular
Regular
 
Joined: Tue Aug 11, 2009 4:00 pm

Re: Accurate Collision Models

Postby marks on Wed Sep 22, 2010 11:11 pm

were all the primitives convex?
User avatar
marks
Creative Assembly
Creative Assembly
 
Joined: Tue Aug 16, 2005 5:07 pm

Re: Accurate Collision Models

Postby Portalboat on Wed Sep 22, 2010 11:26 pm

I guess so, I was never really clear on what the meant.
Portalboat
Regular
Regular
 
Joined: Tue Aug 11, 2009 4:00 pm

Re: Accurate Collision Models

Postby marks on Wed Sep 22, 2010 11:38 pm

left convex, right concave
lol bottom 2 are swapped around, oops

Image
User avatar
marks
Creative Assembly
Creative Assembly
 
Joined: Tue Aug 16, 2005 5:07 pm

Re: Accurate Collision Models

Postby Terr on Wed Sep 22, 2010 11:40 pm

Portalboat wrote:I guess so, I was never really clear on what the meant.


In this case, "convex" means that there are absolutely no places where it "bulges inwards" or "has dents".

For example, the letters O or D are convex. The letters A and B are not, because they have "inwards bits" on the bottom of the A and the right-hand side of B.

Edit: Here's an improved version. If you can draw a line from any vertex to any other vertex, and that line goes "outside" the shape, it's not convex. This is true in 3D as well.

Image
Last edited by Terr on Wed Sep 22, 2010 11:49 pm, edited 2 times in total.
Terr
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 12, 2009 11:35 pm

Re: Accurate Collision Models

Postby Portalboat on Wed Sep 22, 2010 11:41 pm

Alright, I guess so....
Portalboat
Regular
Regular
 
Joined: Tue Aug 11, 2009 4:00 pm

Re: Accurate Collision Models

Postby Portalboat on Thu Sep 23, 2010 1:39 am

But I think that a non-convex solid would crash it, wouldn't it?
Portalboat
Regular
Regular
 
Joined: Tue Aug 11, 2009 4:00 pm

Re: Accurate Collision Models

Postby crazycarl on Thu Sep 23, 2010 2:31 am

What's happening is studiomdl can't tell your pieces apart, so it combines them all.

Each primitive you use should be completely closed. No holes in the mesh.
Primitives should not share vertices with each other. They can overlap and touch, however.
Each primitive must be smoothed with itself. See link
If a primitive is not convex, it will be made convex. It won't cause studiomdl to crash.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: Accurate Collision Models

Postby Terr on Thu Sep 23, 2010 8:12 pm

By the way, can you post something showing how big these gears are relative to the player?
Terr
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 12, 2009 11:35 pm

Re: Accurate Collision Models

Postby Portalboat on Thu Sep 23, 2010 11:47 pm

Alright, a couple questions:
How can I set a smoothing group in XSI?
Plus, this:
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: COSTLY COLLISION MODEL!!!! (164 parts - 40 allowed)
WARNING: Error with convex elements of gear3_phys.smd, building single convex!!!!
Portalboat
Regular
Regular
 
Joined: Tue Aug 11, 2009 4:00 pm

Re: Accurate Collision Models

Postby crazycarl on Fri Sep 24, 2010 6:26 am

XSI doesn't use smoothing groups as far as I know. Use Render -> Get-> Geometry Approximation. In the Polygon Mesh tab, uncheck Discontinuity: Automatic. All hard edges on the model will disappear.

This should fix the other errors. Right now it thinks each face is a convex piece, which it doesn't like.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: Accurate Collision Models

Postby Portalboat on Fri Sep 24, 2010 10:41 pm

It's a lot better, but there's still no hole:
Image
Portalboat
Regular
Regular
 
Joined: Tue Aug 11, 2009 4:00 pm

Re: Accurate Collision Models

Postby Groxkiller585 on Fri Sep 24, 2010 11:10 pm

make a cylinder, and make a cylindral hole in it. Put that in the collision model. Make sure the sides are triangles, otherwise StudioMDL will choke and cover up the hole. (at least from my experience it has...)

Also don't worry about sides, you want it as simple as possible. Unless it's huge it will be hard to tell if the collison model is perfect or not. So go for about 6-8 sides for the interior hole.
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Re: Accurate Collision Models

Postby Portalboat on Fri Sep 24, 2010 11:41 pm

The model DOES have a hole in it.
Portalboat
Regular
Regular
 
Joined: Tue Aug 11, 2009 4:00 pm

Re: Accurate Collision Models

Postby Groxkiller585 on Sat Sep 25, 2010 2:48 am

hmmm...

Are the shapes making up the cylinder's vertices touching? Take them out of line slightly so they are not touching, enough that they aren;t touching but little enough that it won't effect collisions.

EDIT: also using just the model right now for collisons will not get the hole;you need to make a new model with the hole for collisions, the current hole is too smooth.
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm
Next

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users