Mirrors in DirectQ or Darkplaces?
Mirrors in DirectQ or Darkplaces?
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.
Re: Mirrors in DirectQ or Darkplaces?
mirrors... only in Glquake (i think). You can ask in engine programming!
hi, I am nahuel, I love quake and qc.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
will LordHavoc release a new stable-darkplaces for this mod?Spirit wrote:Wait for http://forums.inside3d.com/viewtopic.php?t=3357
hi, I am nahuel, I love quake and qc.
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.
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.
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
}
}
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.
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:
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
}