News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

make decals stay for a long time? (Quake 4)

Started by Tehstrelok, September 07, 2015, 02:42:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tehstrelok

Hi, there is a particular thing I´ve been trying to change in quake for, and is the duration of decals such as blood and bullet holes, however, it seems to work very differently from doom 3 where you just change some values and that is it, any ideas here?

VGames

Look in the material files. Find the decal u want to alter and then increase one of the numbers in the code. Can't remember which one. Not at my PC right now. It's very easy.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

Tehstrelok

Quote from: VGames on September 07, 2015, 04:48:44 PM
Look in the material files. Find the decal u want to alter and then increase one of the numbers in the code. Can't remember which one. Not at my PC right now. It's very easy.

ok, I found it, was simple enough,however, I am not sure which line I´d have to edit here, for example:

textures/decals/bullethole
{
   DECAL_MACRO
   noSelfShadow
   noShadows
   noImpact
   nonSolid
   qer_EditorImage   gfx/effects/decals/bullethole.tga
   {
      if ( glslPrograms == 1 )
      blend          GL_DST_COLOR, GL_SRC_COLOR
      rgba         decalFade[ DecalLife ]
      vertexColor
      glslProgram       glsl/MultiplyBlend.glsl
      shaderTexture      Image         gfx/effects/decals/bullethole.tga
   }   
   
   {       
      if ( glslPrograms == 0 )
            blend         gl_zero, gl_one_minus_src_color
      map         gfx/effects/decals/bullethole_multiply.tga
      clamp         // we don't want it to tile if the projection extends past the bounds
      rgba         decalFade[ DecalLife ]
      vertexColor      // oblique projections will be slightly faded down
   }
}

What line should be edited or added?

VGames

Add this line and adjust the 300 to your liking. Its in seconds so 300 would be 5 minutes.


textures/decals/bullethole
{
   DECAL_MACRO
   noSelfShadow
   noShadows
   noImpact
   nonSolid
   qer_EditorImage   gfx/effects/decals/bullethole.tga

decalInfo 300 5 ( 1 1 1 1 ) ( 0 0 0 0 )

   {
      if ( glslPrograms == 1 )
      blend          GL_DST_COLOR, GL_SRC_COLOR
      rgba         decalFade[ DecalLife ]
      vertexColor
      glslProgram       glsl/MultiplyBlend.glsl
      shaderTexture      Image         gfx/effects/decals/bullethole.tga
   }   
   
   {       
      if ( glslPrograms == 0 )
            blend         gl_zero, gl_one_minus_src_color
      map         gfx/effects/decals/bullethole_multiply.tga
      clamp         // we don't want it to tile if the projection extends past the bounds
      rgba         decalFade[ DecalLife ]
      vertexColor      // oblique projections will be slightly faded down
   }
}
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

Tehstrelok

Quote from: VGames on September 07, 2015, 06:57:58 PM
Add this line and adjust the 300 to your liking. Its in seconds so 300 would be 5 minutes.


In doom 3 that works perfectly, yet here it just causes the decal to become a square and still dissapears in 10 seconds, very odd, I do not understand why it works in the other game but not here.

VGames

Oh man I completely missed the fact that this a question regarding quake 4. Sorry about that.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

bkt

Raven changed a lot of small parts of the engine and gamecode in Q4.  You'll need the SDK to fix it probably. 

Tehstrelok

Quote from: bkt on September 08, 2015, 11:08:22 AM
Raven changed a lot of small parts of the engine and gamecode in Q4.  You'll need the SDK to fix it probably.

I see, thanks