Forum

Mirrors in DirectQ or Darkplaces?

Discuss the construction of maps and the tools to create maps for 3D games.

Moderator: InsideQC Admins

Mirrors in DirectQ or Darkplaces?

Postby BloodShot » Sat Jun 18, 2011 12:04 am

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.
BloodShot
 
Posts: 3
Joined: Sat Sep 27, 2008 3:37 pm

Re: Mirrors in DirectQ or Darkplaces?

Postby Nahuel » Sat Jun 18, 2011 12:28 am

mirrors... only in Glquake (i think). You can ask in engine programming!
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Postby Spirit » Sat Jun 18, 2011 7:08 am

Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1031
Joined: Sat Nov 20, 2004 9:00 pm

Postby Nahuel » Sat Jun 18, 2011 12:57 pm

Spirit wrote:Wait for viewtopic.php?t=3357

will LordHavoc release a new stable-darkplaces for this mod?
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Postby mh » Fri Jul 01, 2011 9:05 am

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
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Spike » Fri Jul 01, 2011 10:33 am

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.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby razvanab » Mon Jul 04, 2011 12:48 am

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
 }
razvanab
 
Posts: 13
Joined: Wed May 14, 2008 5:12 pm


Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest