Urban Terror Forums: reflective transparent glass shader - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

reflective transparent glass shader Rate Topic: -----

#1 User is offline   Wily Duck Icon

  •   mapper   
  • Account: wilyduck
  • Country:
  • Joined: 28-February 10
  • Posts: 634

Posted 02 June 2004 - 03:26 AM

I'm trying to make one! However the problem I've run into is that it doesn't seem one can cross a mirror using depthwrite with a blendfunc.

Here's my shader as it stands:

textures/ut_superman/reflect_glass
{
surfaceparm alphashadow
surfaceparm nolightmap
surfaceparm trans
sort additive
portal
qer_trans 0.5
q3map_backshader textures/superman/shiny_glass1

{
map textures/superman/duck_transparent.tga
depthwrite
blendfunc filter
}

{
map textures/effects/tinfx.tga
tcGen environment
blendfunc add
}
}

"textures/superman/duck_transparent.tga" is a 32bit 16x16pix tga with the alpha channel made fully transparent and the rgb being black. I tried a different sort to maybe change when q3 rendered the shader, no luck. The different blendfuncs applied to the first stage result in either the mirror working or showing all black, never trans. The second stage always works, blending the environment mapped tga correctly.

If you have any ideas, please share them. If you know this just can't be done, let me know too. Thanks!

FSK405 a wily duck

#2 User is offline   BludShoT Icon

  • Account: bludshot
  • Main tag: [T]
  • Country:
  • Joined: 28-February 10
  • Posts: 1,269

Posted 04 June 2004 - 09:56 AM

Check out the mirrors in the bathroom in ut_campus, that may help you (or maybe it won't).

#3 User is offline   StrayCat (old) Icon

  • Joined: 05-April 04
  • Posts: 603

Posted 05 June 2004 - 08:19 AM

I believe ut_apartment has a mirror or two in it as well, you may want to chat with the creators of those maps.

#4 Guest_Annihilator

Posted 05 June 2004 - 07:05 PM

I could be wrong, but don't the mirrors in apartment actually reflect your weapons as well?

#5 User is offline   NulL Icon

  •   former FS member   
    Level Designer
  • Account: null
  • Country:
  • Joined: 28-April 09
  • Posts: 2,606

Posted 05 June 2004 - 08:38 PM

[quote name='"Annihilator"]I could be wrong' date=' but don't the mirrors in apartment actually reflect your weapons as well?[/quote']

The mirrors have been fixed for quite a while now, it was a ut issue, nothing the mapper could do about it.

Im quite positive that its imposiable to render the portal as transparent, no matter what you make the blendfunc in the first stage, because the portal 'contents' are rendered before the first stage of the shader.

bullet_loaderAdvertisement

#6 User is offline   Wily Duck Icon

  •   mapper   
  • Account: wilyduck
  • Country:
  • Joined: 28-February 10
  • Posts: 634

Posted 08 June 2004 - 06:41 AM

And you are correct. Here's what I found out from map-center:

Quote

As I understand it from the initial post and thread title, what you are after is a pane of glass through which you can see the geometry beyond, but which also acts as a reflective surface using portal tech. (So the portal-generated reflection is partially transparent)

It's not possible to do this. You can either have an opaque reflection, or transparent glass. If you have a transparent stage in a portal shader then only the portal camera view will be able to show through that transparency.

It may be possible to fake it to some extent using a custom environment map - look at Cardigan's Q3 map Estatica for examples of this.

If you can't get outside the glass you could build a copy of the interior geometry outside the glass with an alphaed shader - obviously you get no player or other entity reflections though so probably not worth the effort.


That's too bad but oh well, right? Could have been fun.

-duck

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942