clipmodel fps killer


(|NV|S) #1

During the beta testing of my map ut_streets2, people have complained about major FPS lag when around a certain tree that I made using the q3_clipmodel in my shader to clip the trunk.


models/mapobjects/s8s/trunk 
{ 
   qer_editorimage models/mapobjects/s8s/trunk.tga 
   q3map_nonplanar 
   q3map_forcemeta 
   q3map_clipmodel     
   { 
      map models/mapobjects/s8s/trunk.tga 
   }
   {  
      map $lightmap
      blendFunc filter
	rgbGen identity
   }
}

this is the tree in question, the trunk is about 300 verts.

is there any reason why when they get close to this tree the FPS drops from a raging 300 fps to about 40?..and about 5fps when they are Touching the trunk?


(ydnar) #2

models/mapobjects/s8s/trunk
{
	q3map_clipModel
	q3map_forceMeta
	q3map_nonplanar
	q3map_shadeAngle 120
	{
		map $lightmap
		rgbGen identity
	}
	q3map_styleMarker
	{
		map models/mapobjects/s8s/trunk.tga
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

Put hint brushes around the tree, approximating large sections of the branches. This will segregate the clipping brushes to the smallest possible area, speeding up the tracing code.

y