prop_physics won't work "ERROR!: Can't create physics object for <modelpath>"

Started by tempUser, November 02, 2014, 08:50:36 PM

Previous topic - Next topic

tempUser

Game: Counter-Strike: Source

Hi there.
I don't know if something is wrong with my server config, but I just can't use custom physic props.
Default physic props (for example an orange) work - Custom physic props are invisible.
They work fine on a listen server, but not on my dedicated server.
I tried your video tutorial: YouTube

Here is my testmap (Listen Server):


The models in the back are oranges (models/props/cs_italy/orange.mdl)
The models in the front are custom (models/myproject/teapot.mdl)
I tried all the prop_physics-types:

prop_physics
prop_physics_multiplayer
prop_physics_override (with 50 Health)

Flags are "Start asleep" and "Generate output on +USE"

Results:
No problems at all. I can shoot all oranges and teapots -> They will fall down and spawn props after they broke.
I can also collide with every model and move them around the map.

Here is my testmap (Dedicated Server):


Results:
The built-in models (oranges) are fine. I can collide with them and break them.
Custom props are invisible and I can't collide with them. Only the prop_physics_override prop is showing, but I can't shot nor collide with it.
The console gives the following error:
ERROR!: Can't create physics object for models/myproject/teapot.mdl
ERROR!: Can't create physics object for models/myproject/teapot.mdl

Models in Model Viewer:




Wall Worm Model Tools Settings:


Any ideas ?
Thanks!

wallworm

Without seeing the file, it's hard to say. I noticed that the collision hull settings does not have $concave. Could you paste a screen shot of HLMV with the Physics model checkbox on?

You can click File > Save As... Archive and send the zip to my email in the WW readme file and I can see what might be amiss.

tempUser

Mind if I upload it on mediafire ? It's just a simple teapot anyway. Link: Edit: Removed
The $concave settings doesn't seem to change anything. This is the physmodel:


wallworm

I opened the file you sent. And I did notice a couple things that should be changed. These may or may not fix the issue.

1) Do not use the AutoHull checkbox. That setting uses the reference mesh as the hull... which is usually not what is a good idea.

2) The object's pivot has been altered. That is fine... but you should always reset the models' XForm after doing this. IN this case, select the model, then open the Utilities Tab in the Command Panel and use the Reset Xform utilitied... and then click Reset Selected.

3) Once the XForm is reset, open the WWMT Collision Model rollout and click the Quick Hull button. Make sure that the $concave checkbox is on. Now export and compile again. This will get rid of a warning in the compiler mentioning slow collision tracing.

Now hopefully it will work.

Another possible problem is the specific Base. Some of the Base choices in the default WW may not be in all mods. It's kind of up to the user to find out what ones are available in the mod they are working on.

Anyway, I hope these are part of the problem. If not, I'll give some more thought to it.

tempUser

The Physmodel seems to be better now:



But sadly the model is still not visible on my dedicated server. I disabled the auto hull and created one of my own (like you said).
The physmodel looks at least better now (see above).
I also tried to make a new model without altering the pivot point, still no difference.

wallworm

Perhaps you should test different Base types. I've not had this problem on the levels I've made or used, so I cannot give any input on what the specific cause of this is.

Perhaps there is a mismatch between the files between the local/dedicated servers? Maybe there is some file whitelist? or folder blacklist?

Another thing to test is loading to the server all of the .phy, VVD, etc files that get created alongside the .mdl files. I was assuming you are testing from the same machine which means you already have the files locally, but another issue could be that the server isn't pushing the files because it needs a RES file. You can do this with WW by clicking WW > WW Level Design > RES Maker. That would go into the maps folder and must be named the same as the level.

I don't know that these will help this case, but they are worth a try.

tempUser

I fixed it now. The problem was that I didn't restart my server after I copied the models into its model folder and just restarted the map ... wow  :o
I can't believe it, I literally wasted around 12 hours to fix that problem. lol

Anyway, thank you  ;)

wallworm

Aha! Well yes, I should have thought about that one. I've been running a game server for over a decade and my habit is that whenever I load new content, I take the server offline while loading assets. What I usually do is load the assets to the fast download server first via FTP. Once those are done, I stop my game server, copy the files to the server folders, then restart the game server.

In terms of losing time. Well 12 hours is nothing. I spent about a year and a half trying to solve some problems in WW that were, eventually, solved with a couple simple lines of code. It just it took me that long to learn a few things regarding linear algebra :)

SMF spam blocked by CleanTalk