Author Topic: Clipping model entities  (Read 4090 times)

p0m

  • Posts: 85
  • Turrets: +1/-0
Clipping model entities
« on: November 06, 2007, 04:05:54 am »
This may be a stupid question guys, but what is the most easy and effective way to clip a md3 model?

I've contemplated making another misc_model with the scale set up slightly higher and overriding the texture shaders on it to force it to use a clip shader instead, will this work?
img]http://img236.imageshack.us/img236/9799/userbar475207qy4.gif[/img]

Johnpp

  • Posts: 142
  • Turrets: +2/-14
Clipping model entities
« Reply #1 on: November 06, 2007, 05:13:17 am »
Use clip brushes, or, do these keys/values in the entities properties.

key:spawnflags
value:2

Though this method is NOT suggested. It will use a lot of FPS, as it 'auto-covers' the whole model with clip (you wont see it).

p0m

  • Posts: 85
  • Turrets: +1/-0
Clipping model entities
« Reply #2 on: November 06, 2007, 08:01:46 am »
An invisible detail clip brush shouldn't chew up fps though, if that's what that spawnflag does.
img]http://img236.imageshack.us/img236/9799/userbar475207qy4.gif[/img]

Johnpp

  • Posts: 142
  • Turrets: +2/-14
Clipping model entities
« Reply #3 on: November 06, 2007, 08:15:03 am »
If you have a VERY high polygon model, it will chew up FPS. For example, I was once testing out a 50,000 polygon model with SpawnFlags 2, and it wouldn't load the map. An error about too many brushes.

Spawnflags 2 make every seeable side to the model a clip brush. That is all right for low detail models, but do not do it for very high detail/poly models.

gareth

  • Posts: 710
  • Turrets: +38/-89
Clipping model entities
« Reply #4 on: November 06, 2007, 01:51:30 pm »
if you use the spawnflags method, you can get nasty clipping tho, like repeatedly  jarring when you push up against it, with clip brushes you can at least change the brushes to stop that.

Taiyo.uk

  • Posts: 2309
  • Turrets: +222/-191
    • Haos Redro
Clipping model entities
« Reply #5 on: November 06, 2007, 02:32:12 pm »
Keeping overall clipping simple can avoid problems such as excessive brush count as Johnpp said. It's also easy to make "bugclips" with spawnflags 2 on detailed models - places where you can get stuck et al. The below images show how three rectangular clip brushes can be used to clip several models at once:

Withaclip:


Withoutaclip:


This in-game shot shows that autoclipping would have been substantially more expensive with little noticeable effect bearing in mind that all bboxen are rectangular:

p0m

  • Posts: 85
  • Turrets: +1/-0
Clipping model entities
« Reply #6 on: November 06, 2007, 10:32:36 pm »
Yeah, I see what you mean about the spawnflags method. My main problem is that I'm trying to clip a bobbing entity with a misc_model assigned to it.
img]http://img236.imageshack.us/img236/9799/userbar475207qy4.gif[/img]

Taiyo.uk

  • Posts: 2309
  • Turrets: +222/-191
    • Haos Redro
Clipping model entities
« Reply #7 on: November 07, 2007, 01:31:54 am »
Create an origin brush and one or more clip brushes then make these into a func_bobbing, then set the model2 key like this. It should compile into the +100 bobbing computer of squish.