Tremulous Forum
Media => Mapping Center => Topic started by: Dustin on July 10, 2006, 07:37:28 am
-
I've created a brush with a mirror (mirror1 or mirror2) shader applied to it, and have placed a misc_portal_surface within 64 units of it. Ingame, after compiling the map, i see either a checkerboard (grey and white) with "MIRROR SUBFACE" on it, or a white and dark grey grid. Nothing i've tried works. I even copied the mirror shader info from pulse and modified the name so it was the one used by my map.
Nothing.
(http://img19.imageshack.us/img19/4463/tremmirror1rr.th.jpg) (http://img19.imageshack.us/my.php?image=tremmirror1rr.jpg)
-
I've created a brush with a mirror (mirror1 or mirror2) shader applied to it, and have placed a misc_portal_surface within 64 units of it. Ingame, after compiling the map, i see either a checkerboard (grey and white) with "MIRROR SUBFACE" on it, or a white and dark grey grid. Nothing i've tried works. I even copied the mirror shader info from pulse and modified the name so it was the one used by my map.
Nothing.
(http://img19.imageshack.us/img19/4463/tremmirror1rr.th.jpg) (http://img19.imageshack.us/my.php?image=tremmirror1rr.jpg)
Make sure shaderlist.txt is up to date, is used by the editor and the map compiler tool and contains the .shader file referencing the mirror. And make sure the textures used by the mirror shader are all available.
Note : you should find a working mirror in the common.shader file. The Shader should be named mirror ( and not qer_mirror )
-
The only mirror shaders in common.shader are mirror1, mirror2, and qer_mirror. None of them work. (Also, for cameras, portal, qer_portal and timportal do not work).
My files are up-to-date. shaderlist.txt references common.shader which contains mirror1|2
I've tried EVERYTHING. All the accepted methods (Bubba's Arena Tutorials, the entity description/info for misc_portal_surface, the radiant manual) have failed for me, and i'm following them EXACTLY. It Just Doesn't Work!!
-
The only mirror shaders in common.shader are mirror1, mirror2, and qer_mirror. None of them work. (Also, for cameras, portal, qer_portal and timportal do not work).
My files are up-to-date. shaderlist.txt references common.shader which contains mirror1|2
I've tried EVERYTHING. All the accepted methods (Bubba's Arena Tutorials, the entity description/info for misc_portal_surface, the radiant manual) have failed for me, and i'm following them EXACTLY. It Just Doesn't Work!!
Try with mirror1, edit common.shader and check that all the textures referenced by the shader exist, are available in a pk3 somewhere. If not, copy the shader in your own custom .shader file and change it to reference textures you know are available.
-
The texture is available, common/mirror1.tga. I created it (and i'm using SV_PURE 0 for map testing).
-
Well, the texture show is what the engine will display when it can't find the texture or the shader.
Did you launch your map with devmap ? Are you sure the common.shader file is somewhere the game can load it ? Check in the console after you load the map if there is an error message somewhere.
PS : check all the messages you get during map compile. I had a lot of difficulties getting the mirrors to work because GTKRadiant and the map compiler were badly configured and couldn't find the shader files but no error message were shown. Looking at the complete map compile log showed me that the mirror shader couldn't be found.
PPS : and while I'm at it, when you get the checkerboard texture with mirror writen on it, it means you are using the editor texture as if it was an ingame texture. The editor texture should not be used directly ( qer_mirror.tga I believe ) If you get the grey grid, it means the engine cannot load the corresponding shader or texture.
PPPS : you've made the mirror.tga texture yourself you say ? Did you just copy the qer_mirror.tga file ? If so it won't work. You need a transparent texture for the mirror to work. That texture is the one displayed above the reflection and if it isn't at least somewhat transparent, it'll display as if there was no mirror.
-
The shader is /usr/local/games/tremulous/base/scripts/common.shader (which the game itself says that it loads)
The map compiler claims no problems (it loads common.shader, it doesn't tell me that my texture is missing)
I am loading it with devmap.
...loading 'scripts/common.shader'
----- finished R_Init -----
...
...loaded 34 faces, 0 meshes, 0 trisurfs, 0 flares
CL_InitCGame: 36.70 seconds
8107 msec to draw all images
Com_TouchMemory: 0 msec
Dustin^7 entered the game
Dustin^7 joined the humans
]\quit
PS: Transparent?! Ack! Uh, Which colour is that? Or is it alpha-channel transparency? (I'm kinda used to birmap-type transparency, a certain colour is transparent).. Hold on, going to make a new image, transparent. I never had made a copy of (can't remember the name) the grey/white checkerboard one.
-
Alpha channel transparency will do. The fact is that the mirror shader will display that texture after it draws the reflexion and so, if it isn't at least somewhat transparent, nothing will show :)
-
With a tga image that's 100% transparent (as created by The GIMP with "Transparency" set for the background color), i've gotten closer than ever to my desired effect.
I got the hall of mirrors. At least it's somewhat mirrory, but not what I was aiming for ;)
-
Well, just for info, here is a shader I've done to display a mirrored floor :
textures/glass/mirrored_floor
{
qer_editorimage textures/common/qer_mirror.tga
portal
{
map textures/glass/16tile09.tga
blendfunc blend
depthWrite
}
{
map $lightmap
blendFunc gl_dst_color gl_zero
rgbgen identity
}
}
"
I know that one works but you still need a texture to go with it :)
-
Thank you for all your help, Stof. I suppose I can.. attempt.. to find/make a working texture to see if the texture has been my problem all along.
Edit: Strangely, the shader from pulse (for the monitors/cameras) just uses 2 images, which are merely black and white lines. They fail for me, of course ;), even using the shader that pulse used.
-
Thinking about that, I guess that shader can be used for a mirror and you won't even need a texture :
textures/glass/mirrored_floor
{
qer_editorimage textures/common/qer_mirror.tga
portal
{
map $lightmap
blendFunc gl_dst_color gl_zero
rgbgen identity
}
}
You could try that :)
-
(http://img89.imageshack.us/img89/5589/shot00074kp.th.jpg) (http://img89.imageshack.us/my.php?image=shot00074kp.jpg)
I may have to give up on this endeavour. It's been failing for 10 hours straight. It just isn't working out ;). I'll dabble with camera-portals, and then if that fails, go back to more .. normal .. stuff. Thanks :)
Somehow, (how? I have no idea what it was, maybe changing my all-black texture to half-transparent black (ah-hah!)) i got mirrors to work. Thanks for all your help, Stof!
-
I made a simple map with a mirror in it to see if I could do it. It seems to work, so here it is:
http://home.austin.rr.com/selliott4/tremulous
The pk3 includes the map file (source) and textures it uses. I hope it is helpful.
-
Heh, i should make a simple map made of nothing but portals and mirrors.
Ill call it hall of mirrors.
-
I thought that would be fun too. So at one point I tried to make two adjacent sides of my simple mirror map (which only has six sides) mirrored (as opposed to the single side that is mirrored now). Only one of two mirrors functioned at any given time.
Maybe the limitation is that only one of the surfaces of any given portal may be mirrored. Maybe reflections of reflections are strictly forbidden by the game engine regardless of the number of intervening portals. I didn't experiment to find out.
Also, I included the shader script I used with my pk3 (rather than using an existing one). Here is the important part of that script:
textures/mirror/mirror_simple
{
qer_editorimage textures/common/qer_mirror.tga
surfaceparm nolightmap
portal
{
map textures/mirror/mirror_simple.tga
blendfunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
depthWrite
}
}
-
Naw, just make the portals >64u apart.