PDA

View Full Version : breakable mirror? + please ansver my newest problem??


kgbdino
13th July 2005, 15:10
how do i make a mirror in my map?`

and if possible how do i make a mirros i can seethru in 1 way and it reflects light the other way.
please help me again...

carnage
13th July 2005, 15:50
ime not sure if u can make a mirror breakable

to fake it you could use a func_static decal texture that makes it look smashed

kgbdino
13th July 2005, 16:11
you can make evrything breakable (so it said in the tutorial) but it didnt say how to make a mirror
but how do i make a mirror? please help me

Chester
13th July 2005, 16:42
Well, if you already have a mirror texture just do one side with the mirror brush and then the other side with "NO DRAW". Works fine for me.

Also, if you dont feel like making a mirror texture you could setup a camera to point and project that image. More useful for cameras though.

kgbdino
13th July 2005, 16:45
well the problem is that i have no clue of how/where i get a mirror texture
and i have no clue of how i can setup a camera and a projector :???:

No1_sonuk
13th July 2005, 18:13
I have no idea how to write a portal shader, but I do know that the difference between a mirror and a "CCTV monitor" is the existence of a camera.
For a mirror, you place a misc_portal_surface within 64 block units of the mirror surface. To make it into a CCTV monitor, target the misc_portal_surface from a misc_portal_camera.

kgbdino
13th July 2005, 18:24
well, thank you? :???:
i would say thank you is i had any clue of how i did what you explained
(sorry people but i really am a n00b in that)

Jaquboss
13th July 2005, 18:45
mirror can be func_explosive ( tried, however dont use same shader for gibs), you must turn off fastsky to see it ..
And it was here several time , search!

Nocturne
14th July 2005, 02:22
what about the die command in scripts?

LaggingTom
14th July 2005, 04:35
A mirror is whatever texture you please, with the line:

portal

Added into its shader. My perfectly scratchless mirror texture is a 32x32 plain black .tga You can make scratches on the black as if you would want them on the mirror.

carnage
14th July 2005, 07:19
when you say on the black do you mean the alpha chanel?

Jaquboss
14th July 2005, 07:54
lol , you can use textures/common/dirtymirror ..
And black alpha means mirrored space , white alpha means dirty space

kgbdino
14th July 2005, 15:54
so if i make a .tga fiel that is black i can get mirrors?

Jaquboss
14th July 2005, 16:44
textures/common/mirror
{
qer_editorimage textures/common/mirror.tga
portal
surfaceparm nonsolid
surfaceparm nomarks
{
map textures/common/mirror.tga
blendfunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
depthWrite
}
}

Just make black texture named mirror and move it to textures/common
Also never forget , that misc_portal_surface must be maximaly 64 units far from mirror , and you should never texture more than 1 sides of brush of mirror , and there cant be two mirrors visible at once.. also check that there isnt mirror reflecting in another mirror..
As for more brush sides , it works but you get pretty nasty artifact..
For func breakable , just dont set Same shader spawnflag..

kgbdino
14th July 2005, 16:49
well thanks
exept do i make this a script or what??

Jaquboss
14th July 2005, 16:51
yep , just copy to mirror.shader for example and put in scripts..

kgbdino
14th July 2005, 17:00
and how do i choose where it will be mirrors?
is it just to choose a side of a brush and use the mirror texture?

Jaquboss
14th July 2005, 17:05
yeah like that , you will texture whole brush with some neutral texture and then drag mirror texture over side which will reflect ( unselect brush before you will drag texture ) , then place misc_portal_surface in front of it

kgbdino
14th July 2005, 17:25
to place misc_portal_surface do i have to right clink in 2d field and choose it in misc menu?
because if thats how it is done i cant do it

Jaquboss
14th July 2005, 19:51
well , there isnt normaly misc_potal_surface , you can put there whatever , select it , press n , click on classame and rewrite it to misc_portal_surface , then press enter and you have it ;-)

kgbdino
15th July 2005, 13:30
ok il do that

i have a building and want mirrors onn all the sides on the outside is that possible? :???:

carnage
15th July 2005, 13:40
i have a building and want mirrors onn all the sides on the outside is that possible? :???:

from what i understnad yes,

i think what u mean is u want to be able to look out of the building clearly but see a reflection when you look inside

there is a sligh extra level of complexity to that though, as glass needs volume

*create a glass shader
*place you brush in the window frame and give all sides the glass shader
*copy your glass shader and create an extra pass in it that adds you mirror .tga, (by changing the darkness of the alpha channel will change how strong the reflection is over the glass)
*apply this shader to the outside surface to your glass brush

i think its nesasary to do it this way as glass needs all sides of the brush to have the glass surface perams to work correctly

i cant test this as my hard drive is dead at the moment so if somneone could tell me if this would work would be nice :drink:

Jaquboss
15th July 2005, 13:45
It is possible , however only not whole walls
1) you can create one brush as building and use on it only mirrors from sides , however they will all reflect one view , so it will look strange , hard to explain , jsut try it
2) creating smaller mirror brushes at each sides, BEWATE YOI CANT SEE TWO MIRRORS AT ONCE , if you will , one mirror will be inactive and it will make HOM
EDIT: I can send you map showing it if you will pm me your mail..

carnage
15th July 2005, 14:16
CANT SEE TWO MIRRORS AT ONCE

by this do you mean u cant have two mirrirs on screen or you cant see a mirror from another mirror

kgbdino
15th July 2005, 14:45
Quote:
CANT SEE TWO MIRRORS AT ONCE


by this do you mean u cant have two mirrirs on screen or you cant see a mirror from another mirror


yes thats what he ment

kgbdino
20th July 2005, 19:29
well would it be possible to make 2 different textures called "mirror1" and "mirror2" in .tga format and then 2 scripts

textures/common/mirror1
{
qer_editorimage textures/common/mirror1.tga
portal
surfaceparm nonsolid
surfaceparm nomarks
{
map textures/common/mirror1.tga
blendfunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
depthWrite
}
}



and then a
textures/common/mirror2
{
qer_editorimage textures/common/mirror2.tga
portal
surfaceparm nonsolid
surfaceparm nomarks
{
map textures/common/mirror2.tga
blendfunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
depthWrite
}
}


would it then be possible to see 2 mirrors at once?

No1_sonuk
20th July 2005, 22:34
No, it's a problem with a reflection of a reflection of a reflection.....

I don't think it's that you can't have 2 mirrors, I think it's that you can't have 2 mirrors that can see each other.

carnage
20th July 2005, 23:07
i think, cos the area on screen is not a true image its rederd by the engine differntly than the player point of view, and if you see mirror from a mirrir it will just see right though it

if there is a place on the map where this could acour placeing a sliver brush or something behind the mirror would stop the HOM effect althout u wont get a real reflection

kgbdino
21st July 2005, 17:03
well the mirror seeing mirror wont be a problem.
because the mirrors will be faced in a 90*degree angle with the mirrors facing away from eachother
(BTW if 2 people see in the mirror at same time but from different agneles will they see the same or will it work corectly?)

carnage
21st July 2005, 17:12
i would think they would see it differntly as i would asume that all visuals are renderd independant of the server

kgbdino
21st July 2005, 17:16
ok thats good
(reason i asked s because a friend of mine said that everybody would see the same as the person with the lowest ping)
and that would really be BAD

kgbdino
21st July 2005, 21:46
ok i tried to make a mirror but when i went into ET my mirror1.tga texture was black and orange
to make a misc_portal_surface? is that done by simple making a brush and opening entities window when brush is selected then type in Key: classname Value: misc_portal_surface ?
and does it have to be placed at same place at wall to look like mirror? placed next to the wall to look like mirror (with no space) or place it a bit away formt he wall that shall look like mirror anwith some space but not much?
and what i have to do to make my black texture look black in ET

oohh and shall the wall behind the misc_portal_surface be painted black or is it the misc_portal_surface that shall be painted black?
what is wrong?

kgbdino
22nd July 2005, 08:30
ok.
here is what i did when i tried to make a mirror, and can someone who knows how to make one please ansver me and telling me what the f* i did wrong? thank you.
first i made a wall,
then i selected 1 side of the wall (using Ctrl+Shit+mousebutton)
then i used my mirror1 texture thats placed in my texture/common folder
then i made a 8unit wide brush covering the wall standing next to the wall without any spaces but they were not covering same units at any places
then i pressed "N" with the brush selected then i typed a KEY:Classname with a value of:misc_portal_surface

then i saved and converted.
and in ET it didnt work my mirror1 texture was black and orange and the mirror effect werent there
my mirror1 script:
textures/common/mirror1
{
qer_editorimage textures/common/mirror1.tga
portal
surfaceparm nonsolid
surfaceparm nomarks
{
map textures/common/mirror1.tga
blendfunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
depthWrite
}
}

EB
22nd July 2005, 19:25
I have a mirror setup in a file here : www.spyjuice.com/ld.htm - get the "after beginner tutorial.pk3" and unzip it to find the .map file. shaders and junk included.