Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsJedi Outcast and Jedi Academy Editing Forum → Specular Shaders & Dynamic Lights
Specular Shaders & Dynamic Lights
2005-06-11, 5:45 PM #1
Hi guys, I've been lurking here forever and finally decided to sign up. I have a long winded question that should have a simple enough answer. Is JA's engine designed to support specular effects and/or moving light?

I was first drawn to this by noticing the illusion of spectral lighting on the floor in the Byss level. In the texture selector in GTK, selecting this texture, floor_byss or floor_byss2, highlights two separate textures, or a texture with a paired shader.

I wondered if it were possible to create the same effect using a duplicate shader script. I'm 99% shader illiterate, I've never made an alpha layer, and the actual implementation of adding custom textures and creating custom shaders is a mystery to me.

A push in the right direction would be nice, my searches have turned up mostly generic or unrelated shader/specular info. Nothing JA or JO. The ability to duplicate this effect would suddenly make my pet project map veeery interesting. Of course, I'm thinking Chaos Theory shaders, and that could be beyond JA, or my scope as an artist

The only other question was dynamic lighting. could it be done with targeted lights on a path? icarus? i'm pretty icarus illerate too. My assumption after some trial and error is that lighting is only done when compiled, so I'm guessing No for this question.

thanks yous guys,
Mike
2005-06-11, 6:07 PM #2
I believe you can have dynamic lighting (although it might look bad) that moves across a path. You can also have dynamic lighting that flicker or flash. Dynamic lighting can be triggered on and off. But remember, this type of lighting hurts framerate. The Quake3 engine is not the best for that sort of thing.

I'm not sure what you mean by specular lighting. Rephrase the question please. Do you mean lighting caused by shaders? Or do you mean how certain parts of the shader seem to light up.

If you are confused by shaders, I suggest you take a look at the http://shaderlab.com/q3map2/shader_manual/ (shader manual)

:)
SnailIracing:n(500tpostshpereline)pants
-----------------------------@%
2005-06-11, 8:50 PM #3
Thanks for the ref, I appriciate that, what of it I read was definately worth it. You're right, I was using words that mean something else in the lingo.

paraphrase:
so.. like looking at a polished floor in a dept store, there's a paralax effect. You move, and relative to your eyes, the light glinting against the floor appears to move with you. I doubt very seriously that light entities have anything to do with the optical effect of Byss_floor in JA, it's probably a shader trick, where one texture is static and the other is dynamically floating relative to your movement.

it's not animated or lit, I don't believe, and if it is a light emmiting shader, it's still not the cause of that paralax effect. If anyone knows what I mean, chime in. A multi-layered texture, one static and one semi-transparent one that moves dynamically? Play Byss if you're curious enough to, I used that particualr texture for all kinds of stuff, although I have many ideas, polished wood, polished stone, etc.

thanks also for dynamic lighting info
any more takers??
2005-06-12, 6:53 AM #4
Ah. I think you got the idea of it. I'm not the best expert on shaders but I can show stuff about. Here's two shaders from byss I pulled out.

textures/byss/large_floor

Code:
{

	q3map_material	SolidMetal

    {

        map $lightmap

    }

    {

        map textures/byss/large_floor

        blendFunc GL_DST_COLOR GL_ZERO

    }

    {

        map textures/byss/env_large_floor

        blendFunc GL_SRC_ALPHA GL_ONE

        alphaGen const 0.25

        tcGen environment

    }

}



textures/byss/pathway

{

	qer_editorimage	textures/byss/pathway

	q3map_material	SolidMetal

    {

        map $lightmap

    }

    {

        map textures/byss/pathway

        blendFunc GL_DST_COLOR GL_ZERO

    }

    {

        map textures/byss/env_large_floor

        blendFunc GL_SRC_ALPHA GL_ONE

        alphaGen const 0.25

        tcGen environment

    }

}


As you can see, to make the shader have that effect, it needs a second shader on top of it. I believe it's called an "env" map. Am I understanding your question correctly?

If you want to see an awesome map that uses this effect very well, check out http://www.pcgamemods.com/5013
SnailIracing:n(500tpostshpereline)pants
-----------------------------@%
2005-06-13, 11:49 AM #5
interesting that I would download that map rather than seek out more information based on that pair of shaders, eh? That's precicely what I've been talking about. I feel a bit like a blind man picking out his favorite clothes, I can get a feel for it but I can't quite picture the full suit.

At least I have a code example now, which I dually appriciate, really, above and beyond what I expected. I'll let this thread go unless you would guide me to further information on how to compile and make use of, or duplicate the effect without tinkering with the entire structure of the original shader. Some of this is beyond my understanding still, but I now have a clear picture of how it works.

Now I'll be waiting for you and continuing my search elsewhere with this new understanding.
preciate it a bunch Echo
you da man

↑ Up to the top!