Forum

models with alpha channel and fog

Discuss the creation of various model formats for Quake engines, and related matters to modeling.

Moderator: InsideQC Admins

models with alpha channel and fog

Postby Nahuel » Fri Mar 08, 2013 12:36 pm

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.
User avatar
Nahuel
 
Posts: 485
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: models with alpha channel and fog

Postby LordHavoc » Fri Mar 08, 2013 10:54 pm

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.
LordHavoc
 
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA

Re: models with alpha channel and fog

Postby stoleYourBike » Wed Mar 27, 2013 2:15 pm

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
stoleYourBike
 
Posts: 7
Joined: Fri Nov 25, 2011 3:03 am


Return to Modeling

Who is online

Users browsing this forum: No registered users and 2 guests