lightmapping md3 models - how?


(damocles) #1

I’m sure it’s possible. I’m just not entirely sure how. I tried making the model with its own unique textures and for each texture added:

{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}

as an extra texture mapping stage for each texture. I thought that would make it lightmap the textures, but they are still vertex lit. Am I missing something fundamental here?


(pazur) #2

this is a lightmapped model shader that was once poster here somewhere in the forum:


models/mapobjects/ut_canyon/utc_dirtytub
{
	q3map_nonplanar
	q3map_forcemeta
	q3map_clipmodel
	q3map_splotchfix
	qer_editorimage models/mapobjects/ut_canyon/dirtytub.tga

	{
		map models/mapobjects/ut_canyon/dirtytub.tga
	}

	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

this did work for me… try to write a similar shader for ur model


(damocles) #3

Dagnabbit, I searched the forum myself looking for that info, but couldn’t find it. thanks again pazur. Damn, twice in one day, I think I’ll just direct all my questions at you from now on :drink:


(pazur) #4

:beer: