Sphere problem

Sphere problem

Re: Sphere problem Posted by Raventyr on Mon Dec 20th 2004 at 3:03pm
Raventyr
14 posts
Posted 2004-12-20 3:03pm
Raventyr
member
14 posts 1 snarkmarks Registered: Dec 20th 2004 Location: UK
Greets,

I've been working on some ideas and I wanted to add a ball to the game to see how the physics handle it. I built a sphere in xsi and successfully ported it in to hammer, and the game. The trouble I am having is with movement. I added the sphere as a "prop_physics_override" because i don't want it to take damage, but i still want it to be manipulated by the player. Everything seems to work fine except that once the ball is rolling, it will not stop. I've looked for some kind of friction settings, but found nothing. Any clues anybody ?
Re: Sphere problem Posted by Captain P on Mon Dec 20th 2004 at 3:30pm
Captain P
1370 posts
Posted 2004-12-20 3:30pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
The ball has not yet physics info attached to it I think? I don't know
how to add that, but that's what I think the problem is...
Re: Sphere problem Posted by Nickelplate on Mon Dec 20th 2004 at 4:57pm
Nickelplate
2770 posts
Posted 2004-12-20 4:57pm
2770 posts 346 snarkmarks Registered: Nov 23rd 2004 Occupation: Prince of Pleasure Location: US
just make it a prop_physics. this fixed eternally rolling barrels for me. just leave default settings and it won't take damage.
Re: Sphere problem Posted by Raventyr on Wed Dec 22nd 2004 at 5:34pm
Raventyr
14 posts
Posted 2004-12-22 5:34pm
Raventyr
member
14 posts 1 snarkmarks Registered: Dec 20th 2004 Location: UK
Cheers for the replies. It seems that if i add the ball as a standard prop_physics it doesn't show up in the game, which is odd considering it works fine as a prop_physics_override. Maybe I am missing something in the .qc file of my model. Any chance someone could copy paste a working prop_physics model's .qc file code ?
Re: Sphere problem Posted by Nickelplate on Wed Dec 22nd 2004 at 5:51pm
Nickelplate
2770 posts
Posted 2004-12-22 5:51pm
2770 posts 346 snarkmarks Registered: Nov 23rd 2004 Occupation: Prince of Pleasure Location: US
i will get one when i get home.
Re: Sphere problem Posted by Raventyr on Sun Dec 26th 2004 at 5:38pm
Raventyr
14 posts
Posted 2004-12-26 5:38pm
Raventyr
member
14 posts 1 snarkmarks Registered: Dec 20th 2004 Location: UK
Still having trouble stopping this ball from rolling. I've delved in to some other parameters in the model .qc file but still no joy. Perhaps it could be something to do with surface type. It just won't show up if its set to a prop_physics :confused:

I thought inertia was going to cover it, and it does make the ball slow down, but it still keeps rolling, just slower than normal, lol.
Re: Sphere problem Posted by Leperous on Mon Dec 27th 2004 at 3:07pm
Leperous
3382 posts
Posted 2004-12-27 3:07pm
Leperous
Creator of SnarkPit!
member
3382 posts 1635 snarkmarks Registered: Aug 21st 2001 Occupation: Lazy student Location: UK
Try a prop_dynamic, then?
Re: Sphere problem Posted by Raventyr on Wed Dec 29th 2004 at 12:22pm
Raventyr
14 posts
Posted 2004-12-29 12:22pm
Raventyr
member
14 posts 1 snarkmarks Registered: Dec 20th 2004 Location: UK
My model just doesn't appear in game unless i set it as a prop_physics_override, which would be fine if it ever stopped rolling... very strange.
Re: Sphere problem Posted by Nickelplate on Wed Dec 29th 2004 at 1:57pm
Nickelplate
2770 posts
Posted 2004-12-29 1:57pm
2770 posts 346 snarkmarks Registered: Nov 23rd 2004 Occupation: Prince of Pleasure Location: US
does your model have bones and a hitbox and all that garbage?
Re: Sphere problem Posted by Raventyr on Sun Jan 9th 2005 at 5:16pm
Raventyr
14 posts
Posted 2005-01-09 5:16pm
Raventyr
member
14 posts 1 snarkmarks Registered: Dec 20th 2004 Location: UK
Still no joy with this problem, but I noticed that its not just me. I just got done with Troika games "vampire the masquerade: bloodlines", which most of you will know was built with the source engine. On the last levels I noticed that when you kill a security guard that is attacking with a baton, and he drops the baton, it continuously rolls back and forth, bouncing off walls.. slowly but surely. Interesting.
Re: Sphere problem Posted by Livett on Sun Jan 9th 2005 at 5:19pm
Livett
164 posts
Posted 2005-01-09 5:19pm
Livett
member
164 posts 46 snarkmarks Registered: Dec 24th 2004 Occupation: Student Location: England
Tried prop_physics_multiplayer?
Re: Sphere problem Posted by uberDingo on Sun Jan 9th 2005 at 5:36pm
uberDingo
72 posts
Posted 2005-01-09 5:36pm
72 posts 17 snarkmarks Registered: Dec 21st 2004
prop_physics_multiplayer has some wierd interactions though as well. You can't stand on a prop_physics_multiplayer or do much of anything EXCEPT make it roll forward. You cant even block them to stop them from moving... though they do seem to stop on their own /shrug
Re: Sphere problem Posted by Jesta on Sun Jan 9th 2005 at 8:15pm
Jesta
7 posts
Posted 2005-01-09 8:15pm
Jesta
member
7 posts 1 snarkmarks Registered: Jan 9th 2005
I suspect your problem is with the model. I think what prop_physics_override does is ignore the model's physics data - if this is the case, then what is happening is your model has incorrect physics data, which is why only prop_physics_override works.

Fire up modelviewer and try loading your model, this will give some clues. You can see the physics mesh in there - if it doesn't show up, something went wrong while compiling. Not an expert on XSI but you'll have to make another copy of your sphere, in some way subdivided (smoothing groups in MAX, dunno bout XSI) to make an accurate physics mesh. Then export it as <modelname>_phys.smd, stick it in the same folder as your first SMD, and include it in your .qc file with this:

$collisionmodel "<modelname>_phys.smd" {
$Mass 100 <-----Whatever you want the mass to be, in kg
$concave
}

Then recompile your model.

Basically, if you don't supply a physics mesh, studiomdl tries to make it's own, drawing boxes the shortest possible distances between vertices. So if your model looked like this:

User posted image

Then the automatic physics model is this:

User posted image

If you think about it, if Studiomdl tried this technique on a sphere (depending partly on how you constructed it i guerss), it could end up with a very very wrong physics mesh, possibly even an empty one.

By subdividing it yourself and exporting a separate physics mesh, you can properly subdivide it yourself: for example,

User posted image

Have a look at the SDK section on porting models from HL1, it is the only place I know of with info on how to construct the physics mesh. Once you have the right physics model, you can use the other physics object types, hopefully solving your problem.

Hope that helps!
Re: Sphere problem Posted by DrGlass on Sun Jan 9th 2005 at 10:45pm
DrGlass
1825 posts
Posted 2005-01-09 10:45pm
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
make a tut with that info in it, very informative.
Re: Sphere problem Posted by Raventyr on Fri Jan 21st 2005 at 10:42am
Raventyr
14 posts
Posted 2005-01-21 10:42am
Raventyr
member
14 posts 1 snarkmarks Registered: Dec 20th 2004 Location: UK
Very informative Jesta, thanks. I was already using a collision model, and it appeared to be fine, but on closer inspection it is not very smooth, although it is spherical, it is covered in small points, making it rough. Perhaps this is why it will not stop continuously propelling itself along, i'm not sure. It definately has a slight wobble in its motion. Then again it still does not fix the issue of it only working as a physics override model. I've tried subdividing my mesh and various other things, but am still baffled.

EDIT: Just to clarify, the model itself is smooth, it is the physics model that is rough.
Re: Sphere problem Posted by Raventyr on Tue Jan 25th 2005 at 4:01pm
Raventyr
14 posts
Posted 2005-01-25 4:01pm
Raventyr
member
14 posts 1 snarkmarks Registered: Dec 20th 2004 Location: UK
Well, I have managed to get the model to work as a prop physics now, that was my bad, just needed to redo the .qc file, but i'm still getting the continuous rolling. :confused: So wish that I had max, i'm not having much luck finding the equivalent of smoothing groups in xsi.