Tremulous Forum
Media => Mapping Center => Topic started by: p0m 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?
-
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).
-
An invisible detail clip brush shouldn't chew up fps though, if that's what that spawnflag does.
-
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.
-
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.
-
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:
(http://www.haosredro.com/trem/img/withaclip.jpg)
Withoutaclip:
(http://www.haosredro.com/trem/img/withoutaclip.jpg)
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:
(http://www.haosredro.com/trem/img/rubbish.jpg)
-
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.
-
Create an origin brush and one or more clip brushes then make these into a func_bobbing, then set the model2 key like this (http://www.haosredro.com/trem/bobtest.zip). It should compile into the +100 bobbing computer of squish.