ASE model clipping


(pazur) #1

i have noticed that the clipping of one my ASE models is a bit wrong. i have put it in a small test map and there the clipping is correct :eek: im using q3map 2.3.38

the model is not lightmapped but has q3map_clipmodel and some other parameters that are used on lightmapped models. here the shader:


models/natter/natterbo
{
	q3map_nonplanar
	q3map_forcemeta
	q3map_clipmodel
	q3map_splotchfix
	allowCompress
	surfaceparm nolightmap
	{
		map models/natter/natterbo.tga
	}
	{
		map models/natter/fakediffuse.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
}

maybe someting in the shader is causing this?


(cloudscapes) #2

You need to add the lightmap stage to your shader. :slight_smile: I fell for this problem the first couple times I was making clipping models. Try this shader:


models/natter/natterbo
{
	q3map_nonplanar
	q3map_forcemeta
	q3map_clipmodel
	q3map_splotchfix
	allowCompress
	surfaceparm nolightmap
	{
		map models/natter/natterbo.tga
	}
	{
		map models/natter/fakediffuse.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

What’s the fakediffuse for, out of curiosity? :slight_smile:


(pazur) #3

adding a lightmap stage didn`t work. still the same place at the model is clipped wrong. i will try to export as 3ds or md3 next and see if this still happens and if nothing helps there is still the good old “build clip brush around” method :slight_smile:
btw… did someone notice that pop n fresh md3 export plug(beta 6.1 for max 4) sometimes disconnects(unwelds) vertices. this looks ugly with vertex light. at least this doesnt happen with ASE.

i had first rgbgen lightningdiffuse in the model shader which is used for misc_gamemodels in wolf. my fakediffuse tga is faking the same look of the model as it had with rgbgen lightningdiffuse :wink: aplying lightningdiffuse to a misc_model would cause the model to be black


(cloudscapes) #4

I just realized my mistake when I copied/modified your shader :weird: Remove surfaceparm nolightmap and you should be in business! :rocker2:


(ydnar) #5

Lightmaps (or lack thereof) has zero effect on model clipping.

y