using a Static Prop as Spawn

H

horza

hiya,

well i did write quite a big post a minute ago but it seems to have vanished :(
i want to create a spawn inside the hull of a boat. is this possible is the main question i have
I am modeling the boat and creating the MDLs, a friend is doing the actual map.
Here is my very simple hull
hullscreenie.jpg


it's all one mesh with no errors. you can see the spawn area inside the hull in the Right view port.

i have tried a few ways of creating the collision models and how ever i do it the spawn space is ignored and the hull appears as all solid when in the game
this tut is the only thing i haven't tried http://www.hl2world.com/wiki/index.php/Creating_Physics_Models, the main reason being it will take longer to create collision model out of boxes that it would to make the model in the first place. To my mind creating a collision model out of lots of boxes would mean it would be more complex (more polys) than my hull currently has. hence why i am now wondering whether it is possible to have a spawn\room inside a static prop....or maybe it is possible, but just not practical.

any help\tips appreciated

Cheers

Horza
 

Snipergen

L13: Stunning Member
Nov 16, 2007
1,051
150
Not true mate, remember the containers in hl2 where you can hide in in zombiemod?

Well, you have to make a collision model that you export as a .SMD too. Assing a material to it with the texture you use as diffuse map, but dont unwrap your collision model ofcourse, now, select all polygons and set all smoothing groups to 1. Export.

This works I think. At least my collision models do what I want them to do.
 

Hawk

L7: Fancy Member
Dec 3, 2007
419
213
I've done the thing you're trying:

corpv6.jpg


Ignore the two shots below the shot of the ship. I'm just reusing a graphic I was showing to somebody else.

Anyway, I made the ship as your typical hollow mesh, however that spawn room you see (with the door) is actually brushes. In my ship's mesh I left the cabin part of it out so that it could be built in Hammer and avoid any problems. I also didn't put the ship's deck in the mesh, opting to make that out of brushes as well. There's even a downstairs to the ship (also built with brushes) that leads to a lower exit.

That battleship is the first custom model I ever put into TF2, so I didn't bother with collision. I put invisible Player Clip brushes in all the vital points to keep people from running through the hull. But the fact that the interactive parts are made with brushes means that most of my clipping was taken care of.
 

Shmitz

Old Hat
aa
Nov 12, 2007
1,128
746
The trick to a hollow prop is that, as Snipergen suggested, you need to create a separate model for the collision, and this model must have a few properties:

1) It must be constructed entirely of convex forms.
2) All faces must have a material assigned to them. This can be anything, and it doesn't matter how they're mapped, as they're not actually rendered.
3) Each convex object in the collision model must belong to its own smoothing group.
4) Last, but not least, you can have no more than 20 objects in your collision model. I found the model compiler complaining at me about convexity when I had even 21 objects, and they were all convex. So if you have more than 20, it'll ignore your collision model and just create the one big solid block. If your model is complex enough, this may warrant splitting it up into multiple models.