lfnetwork.com mark read register faq members calendar

Thread: Reflective shader?
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 08-31-2003, 06:09 AM   #1
MightyM
Rookie
 
Join Date: Aug 2003
Posts: 109
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.
MightyM is offline   you may: quote & reply,
Old 08-31-2003, 09:08 AM   #2
tFighterPilot
Senior Member
 
tFighterPilot's Avatar
 
Join Date: Jan 2003
Location: Israel
Posts: 2,729
I was also wondering about it, especially for player models. I love the shiny suits in Planet Side.


My projects:
Snow Speeder
Kaadu

Quote:
Originally posted by yaebginn
not at all, they came here[USA] to worship God however they wanted and it was built on the principals and rules of the Christian religion.
tFighterPilot is offline   you may: quote & reply,
Old 08-31-2003, 10:21 AM   #3
Leslie Judge
Teacher
 
Leslie Judge's Avatar
 
Join Date: Aug 2002
Location: Budapest, Hungary
Posts: 1,382
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.


L. J.
Leslie Judge is offline   you may: quote & reply,
Old 08-31-2003, 12:49 PM   #4
tFighterPilot
Senior Member
 
tFighterPilot's Avatar
 
Join Date: Jan 2003
Location: Israel
Posts: 2,729
It's always is fake, no game does a real reflection, it will be too heavy.


My projects:
Snow Speeder
Kaadu

Quote:
Originally posted by yaebginn
not at all, they came here[USA] to worship God however they wanted and it was built on the principals and rules of the Christian religion.
tFighterPilot is offline   you may: quote & reply,
Old 09-01-2003, 02:19 AM   #5
MightyM
Rookie
 
Join Date: Aug 2003
Posts: 109
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 is offline   you may: quote & reply,
Old 09-01-2003, 02:46 AM   #6
MightyM
Rookie
 
Join Date: Aug 2003
Posts: 109
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.
MightyM is offline   you may: quote & reply,
Old 09-01-2003, 10:45 AM   #7
Leslie Judge
Teacher
 
Leslie Judge's Avatar
 
Join Date: Aug 2002
Location: Budapest, Hungary
Posts: 1,382
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?


L. J.
Leslie Judge is offline   you may: quote & reply,
Old 09-01-2003, 10:48 AM   #8
Leslie Judge
Teacher
 
Leslie Judge's Avatar
 
Join Date: Aug 2002
Location: Budapest, Hungary
Posts: 1,382
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.


L. J.
Leslie Judge is offline   you may: quote & reply,
Old 09-01-2003, 06:00 PM   #9
MightyM
Rookie
 
Join Date: Aug 2003
Posts: 109
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.
MightyM is offline   you may: quote & reply,
Old 09-24-2003, 01:22 PM   #10
[SASH]Nathan
Rookie
 
Join Date: Sep 2003
Location: Oxford, UK
Posts: 49
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.


www.JK2mods.com
[SASH]Nathan is offline   you may: quote & reply,
Old 09-26-2003, 10:56 PM   #11
MightyM
Rookie
 
Join Date: Aug 2003
Posts: 109
smart kid... thanks.
MightyM is offline   you may: quote & reply,
Old 09-26-2003, 11:23 PM   #12
Emon
Strong Bad's Henchman
 
Emon's Avatar
 
Join Date: Jan 2002
Location: The Massassi Temple
Posts: 3,468
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?


Clarionet, n. An instrument of torture operated by a person with cotton in his ears. There are two instruments that are worse than a clarionet -- two clarionets.
Emon is offline   you may: quote & reply,
Old 09-27-2003, 07:46 AM   #13
GothiX
Ocean Soul
 
GothiX's Avatar
 
Join Date: Aug 2003
Location: Just a journey away
Posts: 1,906
Yep, Emon's back.


GothiX is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JO Mapping > Reflective shader?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:39 AM.

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