Adlernest_b4 & q3map_alphaMod


(DerSaidin) #1

Atm I’m trying to make some nice alpha blend terrain like this, but during compile I get a whole heap of errors:

WARNING: Unknown q3map_alphaMod method: dotproduct2
WARNING: Unknown q3map_alphaMod method: volume
WARNING: Unknown q3map_alphaMod method: set

I think that I have a version of q3map2 that doesnt support q3map_alphaMod or something.
Does anyone know where I can get a version that supports it? (I have radient 1.4.0 and q3map2 says “Q3Map (ydnar) - v2.5.11”)

Thanks


(nUllSkillZ) #2

http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=13093

There you will find:
http://members.lycos.co.uk/quakeroats/q3map2/


(DerSaidin) #3

Thanks


(DerSaidin) #4

With the latest version of that landmines done seem to work. Is -wolf the correct parameter for ET?


(DerSaidin) #5

Um, nm the landmines :slight_smile: , I have an even stranger/bigger problem:


Heres an example of this problem with the alpha terrain.
This area uses 2 terrain shaderes:

  • ter_grass - primary is a default grass texture, secondary is a slightly different grass texture
  • ter_grasspath - primary is default grass texture, secondary is a dirt road kind of texture

ter_grass is being used on the slope on the left of that picture (the right of the next)
ter_grass path is being used at the top
That ugly join is where they meet.

The idea was that I’d use alpha fade shaders along with “q3map_alphaMod volume”
Then use those shader brushes to make the secondary visible where I wanted the road.

As you can see in the first picture, the areas to the sides of the road are dirt. Yet as you can see in the the third picture, they shouldn’t be - theres a alpha_001 brush over it (I’ve tried alpha_000 here as well)

The relevant shaders:


textures/dersaidin/ter_grass
{
	qer_editorimage textures/dersaidin/ter_grass_qer.tga
	surfaceparm landmine
	surfaceparm grasssteps
	
	q3map_nonplanar
	q3map_shadeangle 100
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	q3map_alphaMod volume
	q3map_forceMeta
	       
	{
		map textures/temperate_sd/grass_dense1.tga	// Primary
		rgbGen identity
	}
	{
		map textures/temperate_sd/master_grass_dirt3.tga	// Secondary
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		//alphaFunc GE128
		rgbGen identity
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

textures/dersaidin/ter_grasspath
{
	qer_editorimage textures/dersaidin/ter_grasspath_qer.tga
	surfaceparm landmine
	surfaceparm grasssteps
	
	q3map_nonplanar
	q3map_shadeangle 100
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	
	q3map_alphaMod volume
	q3map_forceMeta
	        
	{
		map textures/temperate_sd/grass_dense1.tga
		// Primary
		rgbGen identity
	}
	{
		map textures/dersaidin/ds-dirt1.tga
		// Secondary
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		//alphaFunc GE128
		rgbGen identity
		alphaGen vertex
		//surfaceparm gravelsteps
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

// ======================================================================
// alpha fade shaders
// (c) 2004 randy reddig
// http://www.shaderlab.com
// distribution, in part or in whole, in any medium, permitted
// ======================================================================
//
// These shaders are not fixed to this directory location, they can
// be moved around. They exist here for convenience only.
//
textures/dersaidin/alpha_000	// Primary texture ONLY
{
	q3map_alphaMod volume
	q3map_alphaMod set 0.00
	surfaceparm nodraw
	surfaceparm nonsolid
	surfaceparm trans
	qer_trans 0.70
}

textures/dersaidin/alpha_001	// Almost Primary texture ONLY
{
	q3map_alphaMod volume
	q3map_alphaMod set 0.01
	surfaceparm nodraw
	surfaceparm nonsolid
	surfaceparm trans
	qer_trans 0.70
}

textures/dersaidin/alpha_025
{
	q3map_alphaMod volume
	q3map_alphaMod set 0.25
	surfaceparm nodraw
	surfaceparm nonsolid
	surfaceparm trans
	qer_trans 0.70
}

textures/dersaidin/alpha_050	// Perfect mix of both Primary + Secondary
{
	q3map_alphaMod volume
	q3map_alphaMod set 0.50
	surfaceparm nodraw
	surfaceparm nonsolid
	surfaceparm trans
	qer_trans 0.70
}

textures/dersaidin/alpha_075
{
	q3map_alphaMod volume
	q3map_alphaMod set 0.75
	surfaceparm nodraw
	surfaceparm nonsolid
	surfaceparm trans
	qer_trans 0.70
}

textures/dersaidin/alpha_085
{
	q3map_alphaMod volume
	q3map_alphaMod set 0.85
	surfaceparm nodraw
	surfaceparm nonsolid
	surfaceparm trans
	qer_trans 0.70
}

textures/dersaidin/alpha_100	// Secondary texture ONLY
{
	q3map_alphaMod volume
	q3map_alphaMod set 1.0
	surfaceparm nodraw
	surfaceparm nonsolid
	surfaceparm trans
	qer_trans 0.70
}

.map and stuff available if anyone needs to see it.

Thanks


(Shaderman) #6

At least the secondary textures in your terrain shaders need an alpha channel for alpha fading to work. In the first shader you’re using ET textures which don’t have it (I guess textures/dersaidin/ds-dirt1.tga doesn’t have one, too). Unfortunately only a few textures that came with ET have an alpha channel which means that you have to modify those textures for your map :confused:


(DerSaidin) #7

It had one, there was some areas which were fine.

I think I’ve found the solution now, I removed “q3map_alphaMod volume” from ter_grass and ter_grasspath, and it appears to work correctly now.
Now I just need to put in some more alpha shader brushes to fix it up.


(DerSaidin) #8

I’ve also noticed that the line “alphaFunc GE128” appears to make the alpha channel higher contrast, so the blend is very sudden (solid line rather than blured together)


(Diego) #9

I’m surprised you got it to work with the current textures without any edge lines. You are using 2 different grass textures with 2 different dirt textures. I’d be interested in seeing a final screenshot?

I used this same technique for my tank path, but I always used the same texture for the secondary slot. That way I can blend between grass, mud, or rock and the dirt.


(DerSaidin) #10





(DerSaidin) #11

http://www.clanbia.net/stats/adlernest_b4.pk3

http://www.gamearena.com.au/messageboards/3122/thread.php/3413786