LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   JO Mapping (http://www.lucasforums.com/forumdisplay.php?f=359)
-   -   Reflective shader? (http://www.lucasforums.com/showthread.php?t=109865)

MightyM 08-31-2003 06:09 AM

Reflective shader?
 
I was wondering, how can i make a shader that's reflective... like a mirror but not as reflective as that? They had a good example of this in the demo level but i'm thinking a bit less reflective than that... any tutorials or anything you could point me to? Thanks.

tFighterPilot 08-31-2003 09:08 AM

I was also wondering about it, especially for player models. I love the shiny suits in Planet Side.

Leslie Judge 08-31-2003 10:21 AM

You need something like the mirror_yavin shader in system.shader. There you can see they map another texture (a simple black color) onto the surface to make it darker. In the mirror_yavin the amount of black depends on the distance between the player and the surface. This is because "alphaGen portal 512". You need "alphaGen const 0.5" for example for your own shader to make it half way black.

Of course you can use any floor texture instead of the simple black color if you want. If the value in the alphaGen is higher the the reflectiveness of the surface is smaller.

For character I sugges using fake reflections, like newfloor_kej. It uses a texture mapped as an evironment map. It seems it is shiny. I used the same technik to make windows look like they reflecting the sky, however they don't. :)

tFighterPilot 08-31-2003 12:49 PM

It's always is fake, no game does a real reflection, it will be too heavy.

MightyM 09-01-2003 02:19 AM

great thanks i'll try that :) i want to make a reflective hangar floor... hopefully it won't hit performance too bad. Thanks for the tips.

MightyM 09-01-2003 02:46 AM

how do i apply a mirror? The manual for the editor says just apply the texture and then put a misc_surface_portal at around eye level to the mirrored surface.... but this didn't work... and as a note i'm trying to make a whole floor a mirror would this require a different procedure? Thanks.

Leslie Judge 09-01-2003 10:45 AM

Quote:

Originally posted by imyourfather
It's always is fake, no game does a real reflection, it will be too heavy.
True. Then let me make myself more clear. When you use a mirror to "reflect" things the engine draws those things twice. When you use a "fake reflection" then you use a pic of the environment on the "reflective" surface to make it look like it is mirroring the environment. Is this better now? :)

Leslie Judge 09-01-2003 10:48 AM

Quote:

Originally posted by MightyM
how do i apply a mirror? The manual for the editor says just apply the texture and then put a misc_surface_portal at around eye level to the mirrored surface.... but this didn't work... and as a note i'm trying to make a whole floor a mirror would this require a different procedure? Thanks.
Theoretically there is no difference. But I dont understand that eye-level thing. As I know the misc_portal_surface has to be not more than 64 units from the surface of the mirror. I can send you a sample map which was designed to show a working camera, but can be used for mirroring without the camera as well.

MightyM 09-01-2003 06:00 PM

I got it now, thanks. I remembered that the demo level had a reflective floor at the end when you get to fight the reborns so i just took it from there... i had to move my misc_portal_surface down to get it to work... so i guess i had it above 64 units.. thanks for your help now i have a shiny floor :)... well as soon as i make my floor texture.

[SASH]Nathan 09-24-2003 01:22 PM

a little trick im using on a map im making is this, make the map, compile it and then take a screenshot of the roof, than take that image, make a floor texture and then turn the floor texture into a shader with the roof image blending in under it with a slight movement value, it looks fecking cool and doesnt hit yur performance as much.

MightyM 09-26-2003 10:56 PM

smart kid... thanks.

Emon 09-26-2003 11:23 PM

Quote:

Originally posted by imyourfather
It's always is fake, no game does a real reflection, it will be too heavy.
Eh, that's not true, Q3 has been doing it for the past four years, and other games have before that... What are you talking about?

GothiX 09-27-2003 07:46 AM

Yep, Emon's back. :D


All times are GMT -4. The time now is 09:48 PM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.