Custom collision for models?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
CaptainCrazy
Posts: 12
Joined: Tue Apr 29, 2014 3:23 pm

Custom collision for models?

Post by CaptainCrazy »

I'll keep it brief since, well, it's not that hard to explain really.

So I have a model that I've made and i now wish to make custom collision geometry for it. Is there something that i need to do in order for the engine to detect the collision?

A while back i recall having to do something but I've worked with a few engines so i may be getting confused :rolleyes:

Thanks!
User avatar
Bacon
Posts: 1476
Joined: Sat Jul 31, 2004 7:00 am

Re: Custom collision for models?

Post by Bacon »

Highlight the model in radiant, hit E for the entity window and add the following key

spawnflags 2 for vertex lighting + clipped model
spawnflags 6 for lightmapped lighting + clipped

i think if you add 1 to those values the model will also cast shadows. According to the wiki spawnflags 1 is shadow casting. so 3 and 7, afaik. Never tested that.

This is not recommended for small sized, complex models. In most cases its a lot less taxing on the game if you manually make clip brushes. Like for your box its a lot less brushes (1) to clip it, instead of the 20+ brushes its going to generate with autoclip. (1 brush per face, and theres more than 6 faces on that model)
[b]CAPSLOCK IS ON[/b]
CaptainCrazy
Posts: 12
Joined: Tue Apr 29, 2014 3:23 pm

Re: Custom collision for models?

Post by CaptainCrazy »

Bacon wrote:Highlight the model in radiant, hit E for the entity window and add the following key

spawnflags 2 for vertex lighting + clipped model
spawnflags 6 for lightmapped lighting + clipped

i think if you add 1 to those values the model will also cast shadows. According to the wiki spawnflags 1 is shadow casting. so 3 and 7, afaik. Never tested that.

This is not recommended for small sized, complex models. In most cases its a lot less taxing on the game if you manually make clip brushes. Like for your box its a lot less brushes (1) to clip it, instead of the 20+ brushes its going to generate with autoclip. (1 brush per face, and theres more than 6 faces on that model)
This engine is giving me more trouble than it's worth >:( Now when i view my model in-game it looks like a weird black box with a white band on it. Maybe i need to build lightmaps or something i dunno

It looks normal in Radiant but in the game it looks like crap. Seriously considering going back to Source Engine but i don't really want to xD Also pressing E didn't even do anything (using GTKRadiant 1.5)
User avatar
Bacon
Posts: 1476
Joined: Sat Jul 31, 2004 7:00 am

Re: Custom collision for models?

Post by Bacon »

:olo: My bad. The entity key is "N"

I'm not sure about the models. I have no experience with 3ds. It has nothing to do with the engine though, as I have no problems getting models from blender to quake. Everything always comes out exactly how its meant to for me.

Edit: I even imported your box (3ds version) into blender, then exported it without touching anything to ase and it works in game just fine.

Also, the black texture with the "white band" is the no texture image. It means the model can't locate the texture, which makes no sense, because you said it shows in the editor. The only thing I can think of is try putting the uv image into baseq3.
[b]CAPSLOCK IS ON[/b]
User avatar
Theftbot
Posts: 483
Joined: Thu Oct 08, 2009 4:03 am

Re: Custom collision for models?

Post by Theftbot »

Or the better thing to do is manually clip the model!
Bliccer
Posts: 341
Joined: Thu Nov 26, 2009 4:27 pm

Re: Custom collision for models?

Post by Bliccer »

Depending on the complexity of the model it can even come to frame drops, since the engine will create a clip for every face. Just place rough clip walls around the model.
Very often it's better for the gameplay to use this method.
Post Reply