lfnetwork.com mark read register faq members calendar

Thread: transparent shader with a lightmap
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 05-13-2006, 01:51 PM   #1
SD_Radical_Ed
Junior Member
 
SD_Radical_Ed's Avatar
 
Join Date: Oct 2003
Location: Jedi Academy v 1.00!!!!!
Posts: 252
transparent shader with a lightmap

how do i make a transparent(seethrough) shader with a lightmap?


HGR_Gaara_Of_The_Sand_TRI
I am the S.H.I.T. (Shinobi Hokage In Training)
SD_Radical_Ed is offline   you may: quote & reply,
Old 05-13-2006, 09:00 PM   #2
SD_Radical_Ed
Junior Member
 
SD_Radical_Ed's Avatar
 
Join Date: Oct 2003
Location: Jedi Academy v 1.00!!!!!
Posts: 252
ok ppl come on, no one ever answers my posts. are they that hard to do or is it that nobody cares?

anyways, heres what i need to do now. i need to make some water, that has a PORTAL REFLECTION on it, BUT is ALSO TRANSPARENT. i tried making a lightmap with the portal flags on it, but that just give me a mercury-looking water. i also tried a .png texture with alpha on it, and everything else i could think of. plz help. plz?


HGR_Gaara_Of_The_Sand_TRI
I am the S.H.I.T. (Shinobi Hokage In Training)
SD_Radical_Ed is offline   you may: quote & reply,
Old 05-14-2006, 12:14 AM   #3
ZemmurkTrooper
Rookie
 
ZemmurkTrooper's Avatar
 
Join Date: Sep 2005
Location: Baltimore, MD
Posts: 127
Dude, if you start freaking out, nobody will help. Besides, there are lots of posts without any response after the first post, so...


Stormtrooper For Life! Long Live The Empire!

Dark Forces Mod
http://darkforces.jediknight.net
Mapper

Dark Forces 2 Mod
http://shamusworld.gotdns.org/df2mod/
Mapper

Current Projects: JKMod, Tie Fighter Mod, DFMod, Ramsees Hed
ZemmurkTrooper is offline   you may: quote & reply,
Old 05-15-2006, 09:07 PM   #4
EvilJedi
Rookie
 
EvilJedi's Avatar
 
Join Date: Apr 2004
Posts: 154
My suggestion: Google it and search/post on other forums, this seems pretty complicated to me, so I can't help you..
EvilJedi is offline   you may: quote & reply,
Old 05-16-2006, 12:17 PM   #5
acdcfanbill
..the wonders I have seen
 
acdcfanbill's Avatar
 
Status: Super Moderator
Join Date: Jun 2001
Location: Random Hell Wholes around the
Posts: 5,700
Imperialist Meatbags Guild Member The Walking Carpets Guild Member LFN Staff Member 10 year veteran! 
um, i did one like this, but im a giant moron when it comes to shaders. mostly i find something raven did and start pasting crap together and then twiddle around with it until it actually works like it want takes a long time...

Code:
textures/ctf_rift/grate
{
	qer_editorimage textures/imperial/floorgrate
	surfaceparm	nonopaque
	surfaceparm	trans
	q3map_material	HollowMetal
	{
        map textures/imperial/floorgrate
        alphaFunc GE128
        blendFunc GL_ONE GL_ZERO
        depthWrite
        rgbGen identity
	}
	{
        map $lightmap
        blendFunc GL_DST_COLOR GL_ZERO
	}
}
so for me, this seemed to be clear in the correct spots and it had light cast on it, so uh, hopefully it's right/works for you.

acdcfanbill is offline   you may: quote & reply,
Old 05-16-2006, 07:35 PM   #6
MDN14
Rookie
 
Join Date: Sep 2003
Posts: 159
I am not sure if you can use a portal reflection on a transparent brush or not. If you wanted water like in some of the high end maps you see where it reflects the sky in a really cool way, you need to take your sky textures and use the one for upa nd make it kinda blurry and a bit distorted then use it in the shader. Annother idea you could try if you want it to actually reflect images like the players, is use a portal mirror on the BOTTOM of the water area, like the bottom of a lake. ANd then just put normal transparent water in the lake or whatever. But then you have a small problem if players can actually go under the water and move around enough or go down far enough that the caera can go under water. I suppose you could try to make a nonsolid mirror brush right under the surface of your water and have it VERY thin. That way the water is there and if the player looks down from above water they see the reflection but if they jump in they are under the reflective brush and dont see the reflection anymore. JUst texture the underside of the mirror brush with caulk_water I guess. I think your best bet would be to use a combination of my last idea with the shader having the faked reflection of the sky in it. Look at this duel map by phZ. It has a really cool ice shader effect that I like alot, use the same concept for the distorted reflection in the ice for your water:
http://www.pcgamemods.com/mod/5011.html



You could try this with the ice shader for your water, it is the normal ice shader, plus portal reflection, dont know if it will work or not though

Modified ice shader:
Code:
textures/phz_hoth/ice
{
	qer_editorimage	textures/phz_hoth/ice
	surfaceparm trans
	surfaceparm pointlight
	surfaceparm alphashadow
	surfaceparm lightfilter
	portal
	q3map_surfacelight 100
	q3map_backsplash 0.05 32
	sort	portal
	cull none
    {
        map textures/phz_hoth/ice
	blendFunc blend
        alphaFunc GT0
        depthWrite
        rgbGen identity
    }
    {
        map textures/phz_hoth/reflection2
        tcGen environment
        blendFunc blend
        alphaFunc GT0
	glow
        depthWrite
        alphaGen portal 4000
        rgbGen identity
    }
    {
        map $lightmap
        blendFunc GL_DST_COLOR GL_ZERO
    }
}

That would put the portal reflectiong at the shader's faked reflection layer, if you want the portal reflection to be at the water texture layer then just take out the "alphaGen portal 4000" and put it in the ice portion of the texture right under the "depthWrite" change stuff around if it does work and experiment to get it just how you want it



PS. all credit goes to phZ for that shader, he is the one who made it, not me. So if you use it just mention him in the map's credits

Last edited by MDN14; 05-16-2006 at 08:15 PM.
MDN14 is offline   you may: quote & reply,
Old 05-22-2006, 11:15 PM   #7
MDN14
Rookie
 
Join Date: Sep 2003
Posts: 159
So did that help you at all?
MDN14 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 > JA Mapping > transparent shader with a lightmap

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 05:59 AM.

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