Mirrors in DirectQ or Darkplaces?

Discuss the construction of maps and the tools to create maps for 3D games.
Post Reply
BloodShot
Posts: 3
Joined: Sat Sep 27, 2008 3:37 pm

Mirrors in DirectQ or Darkplaces?

Post by BloodShot »

Hey guys, Is it possible through a mod or in some way to make a level with mirrors in either the DirectQ engine or DP? I figured DP would be possible since it has transparent water - if it is, how would I make one, since water doesn't reflect when your looking straight at it in DP.
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: Mirrors in DirectQ or Darkplaces?

Post by Nahuel »

mirrors... only in Glquake (i think). You can ask in engine programming!
hi, I am nahuel, I love quake and qc.
Spirit
Posts: 1065
Joined: Sat Nov 20, 2004 9:00 pm
Contact:

Post by Spirit »

Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Post by Nahuel »

will LordHavoc release a new stable-darkplaces for this mod?
hi, I am nahuel, I love quake and qc.
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Post by mh »

DirectQ doesn't support mirrors and is very unlikely to ever do so.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

FTE supports mirrors using a small variation on q3.

Q3's portals are defined using a special entity stating the destination position matched by being within 64 units of the portal's front plane.
If that ent has its source and dest at the same point, its a mirror, regardless of its angles.

FTE's variation is that it doesn't require that portal entity. If its not found it assumes its a mirror (you can't actually specify that sort of special ent from fte's qc right now anyway).

The following shader will give a mirror with FTE.

Code: Select all

snazzymirror
{
 portal
 {
  map $diffuse
  blendfunc blend
  alphagen const $r_mirroralpha
  depthwrite
 }
}
Rename the shader, change the map to a texture which actually exists, and give it a fixed alpha value which doesn't depend upon cheat cvars, and you have a mirror for whatever texture you want.
Note that you can use a different blendmode, for a grimy, more realistic mirror.

For DP, you can probably use some sort of dpwater hack.
razvanab
Posts: 13
Joined: Wed May 14, 2008 5:12 pm

Post by razvanab »

For Darkplaces

dp_refract distort r g b
Makes surfaces of this shader refractive with r_water. The refraction replaces the transparency of the texture. distort is used in conjunction with the normalmap to simulate a nonplanar water surface.

here is an example:

Code: Select all

textures/test/mirror
{ 
      qer_editorimage textures/test/qer_mirror
    { 
        map textures/test/mirror
    } 
     dp_reflect 0.5 1 1 1 0.9
 } 
Post Reply