models with alpha channel and fog

Discuss the creation of various model formats for Quake engines, and related matters to modeling.
Post Reply
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

models with alpha channel and fog

Post by Nahuel »

hello forum, i am making a map in darkplaces with some models. I add fog but i have a problem:
Image

Image

the fog affects the models and dissapear when i move the mouse :? If i do not add shader scripts this bug doesnt appear but the models looks with transparency.

I need the correct shader to do not have bugs, i use this shader and didnt work correctly

Code: Select all

	{
	map models/vegetales/pine1
	alphaFunc GT0
	rgbGen vertex
	}
I also test this taken from the multiplant pack from quake 3 arena

Code: Select all

    surfaceparm alphashadow
    cull none
    nopicmip
	{
		map models/mapobjects/multiplant/pine1
		blendFunc GL_ONE GL_ZERO
		alphaFunc GE128
		depthWrite
		rgbGen identityLighting
	}
	{
		map $lightmap
		rgbGen identity
		blendFunc GL_DST_COLOR GL_ZERO
		depthFunc equal
	}
this doesn´t work correctly :( i have exactly the same bugs


Any help?
hi, I am nahuel, I love quake and qc.
LordHavoc
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA
Contact:

Re: models with alpha channel and fog

Post by LordHavoc »

If it changes depending on view direction then I'm pretty sure it's an engine bug and I'll need to run the map myself to examine renderer state.
stoleYourBike
Posts: 7
Joined: Fri Nov 25, 2011 3:03 am
Contact:

Re: models with alpha channel and fog

Post by stoleYourBike »

it works fine for me
using this shader

Code: Select all

textures/tree1/tree
{
	surfaceparm alphashadow
	surfaceparm nomarks
	surfaceparm trans
	cull disable
	nopicmip
	dpmeshcollisions
	{
		map textures/tree1/tree.tga
		rgbGen identity
		depthWrite
		alphaFunc GE128
	}
	{
		map $lightmap 
		blendfunc filter
		rgbGen identity
		tcGen lightmap 
		depthFunc equal
	}
}
might be some useless lines in there, I forgot already, but it works fine
Post Reply