lfnetwork.com mark read register faq members calendar

Thread: Some shader questions
Thread Tools Display Modes
Post a new thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Prev Previous Post   Next Post Next
Old 06-24-2012, 05:53 PM   #1
FarbrorGnur
Rookie
 
FarbrorGnur's Avatar
 
Join Date: Aug 2011
Posts: 47
Some shader questions

I'm freaking out because I had a shader but now I can't find the correct commands and lines again no matter what I do.

1) I have a picture on the wall, and it gets blended by the reflection from a mirror (portal). This functions properly, and has functioned even more properly. The problem is that it looks bad, and it did look good before.
What I have is a picture (catpicture.jpg) and the same picture with a grey alpha channel for halfish transparency (catpicture_alpha.tga).

I don't know what to do with the shader anymore because I've tried so many things. I have two versions I'm testing at the same time:

Code:
textures/SP/dogpicture
{
	qer_editorimage	textures/SP/catpicture.jpg
	surfaceparm	nonsolid
	surfaceparm	playerclip
	portal
	q3map_nolightmap
    {
        map textures/SP/catpicture_alpha.tga
        blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
        depthWrite
        alphaGen portal 2048
    }
}

textures/SP/catpicture
{
	qer_editorimage	textures/SP/catpicture
	portal
	q3map_nolightmap
    {
        map textures/SP/catpicture
        blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
        depthWrite
        alphaGen portal 2048
    }
    {
	map textures/SP/catpicture_alpha.tga
	blendfunc blend
	depthWrite
    }
}
Since I'm trying to make it work on two different brushes, I've called one of them dogshader so that it won't interfere. I can make different results with them, but I'm struggling to find back to the right one.

What I need: I want the picture on the wall to be (preferrably) affected by the map lighting, but I've ran into problems with portal and lightmap at same time, so it's acceptable with a nolightmap. I want the picture to be most visible, and let the alpha channel set the transparency for the mirror. I managed to do this somehow, but when trying to make a better way to solve it (by using only one .tga file and not a .jpg file), I screwed up. The shaders above have the same results, which gives me the hope that it can be achieved without blending it with a special made .tga, because I intend to have more than one picture, and it would be best if I could let each picture be .tga format, have an alpha channel, and let it blend the texture with its own alpha channel, so that the picture is the most visible, and the mirror is less visible, and doesn't get over exposed in the reflection (like the blendfunc add makes it).


2) Is there a way to make light emitting shaders keep their original intensity instead of becoming brighter, but rather just radiate light into the room? This is for a floor, and the shader looks like this:

Code:
textures/SP/woodenfloor1
{
	qer_editorimage textures/SP/woodenfloor1
	q3map_surfacelight	300
	q3map_lightimage textures/SP/lightimage.tga
    {
	map $lightmap
        rgbGen identity
    }
    {
        map textures/SP/woodenfloor1
        rgbGen identity
    }
}
I tried to use a lightimage because I had the impression it could fix the issue, but the texture stayed the same, so it's the same with and without.


3) Is this relevant and possible for JK2 or JKA? http://en.wikibooks.org/wiki/GtkRadiant/Skyportals (I know it doesn't exist in our GTKradiant already).
FarbrorGnur is offline   you may: quote & reply,
Post a new 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 > Some shader questions

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:25 AM.

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