q3map2 generated shaders & styles


(smurkin) #1

Hi, I have 2 queries here

First off, I am mapping for q3 & I have been using the q3map2 style key to make an underwater light flicker…works fine while the map is in the maps folder baseq3…UNTIL I pak it up for distribution. Then I get missing textures in game (I am testing with a vanilla q3 install which is separate from my developer install).

The missing textures have light cast on them by the flickering light. The console complains about missing shaders & these shaders are those created by q3map2 during the compile.eg:

a57/A8B4CD51E582FE28A15F15468AE8ECB7 (a57 is the mapname)

I have tried locating the correct shader generated for my map and putting it in the /scripts pak file…but it only repaired one or two of the faulty surfaces. Anyone…any suggestions ?

My other query (not technically a q3map2 problem…but what the hell :slight_smile: )…I have a skylight with glass. I want to create a realistic shadow/light casting effect…but the glass isnt transmitting the light correctly (if at all):

I have func_gouped and lightmapscaled 0.5 the surfaces receiving the light & I am using a very bright red lightsource…but, well it looks bad :frowning:

Thanks

Smurkin


(Godmil) #2

I cant help with the missing textures… but just today I was struggling with the problem of the sky not passing through glass… I read somewhere that if you make the glass Func_static it lets light pass through (which works for me) :slight_smile:


(MindLink) #3

Well normally all those shaders should be in some generated shader file in your shader directory. They usually are named “q3map2_yourmapname.shader” and should contain all the shaders used for the lightstyle stuff… This file has to be included in the .pk3, otherwise it won’t work.


(smurkin) #4

Mindlink, Thanks…I located the required .shader…its good to know that style shader has to go in the pak3 file…but thats really only fixed half of the broken textures/surfaces…& the console is still moaning about shaders lm.-00N where N is the number of the entry shader in the generated .shader. In fact, I took ALL the q3map2 generated .shader files from all my map compiles and put them in the .pk3 - still no banana. I can’t understand why. ALL the shader info is present in the baseq3 - but I must be missing some when I make the .pk3…unless there is a conflict in the shaders -vs- the pak file directory structure ?!?

Godmill, func_static works for me too. The light isnt using the glass, but the shadows are good. If anyone knows a good toot for lighting a skylight…I’d really like to hear :slight_smile:


(MindLink) #5

Ah you’re using external lightmaps. Have a look at your /maps directory. There should be a subdirectory called just like your map containing loads of lm<something>.tga’s , you got to include that directory in your .pk3 as well. :slight_smile:


(smurkin) #6

Holy shit Mindlink…you the man :slight_smile: …I assume they go into the textures folder :clap:…many thanks :slight_smile:


(MindLink) #7

no they go in the same folder they are outside of the pk3 :slight_smile:
/maps/yourmapname/lm<whatever>.tga
:wink:


(ydnar) #8

Just pack up that directory with your BSP where it is, along with the generated shader script.

As for your glass casting shadows, add “surfaceparm trans” to the shader.

y


(ratty redemption) #9

not sure if this will be of use to anyone, but regarding light flickering, I just tried adding a rgbgen wave to a lightmap stage of a normal shader and it flickered the lightmap… I can`t think of a use for it myself, but maybe someone else will?


(smurkin) #10

Thankyou Gentlemen, pk3d as you suggested and it works lurvely :cool:

Anecdotally, heres an odd one…I have lightstyles built into my worldspawn - 3 styles, all flickering.

I accidentally keyed in a wait 3 key into an info_notnull target for a directed spot light (there is no style key on either the light or the notnull)…and on compiling I got the flicker effect…baked my noodle that one…took me ages to figure out why it was flickering…I assume that the wait 3 was interpreted as a style 3 key…interesting that the notnull too can confer the style :slight_smile:


(ratty redemption) #11

@smurkin, I too would like someone to explain how that worked, and I assume when you removed the key pair the flicker stopped?


(smurkin) #12

Yup…the wait was originally on both light and notnull…removed it from the light…still flickers…removed it from the notnull…flicker is gone. Tbh, I only compiled with bsp, light -fast, vis -fast.


(ratty redemption) #13

bsp, light -fast, vis -fast.

I guess you ment bsp, vis -fast, light -fast?

still though it is a weird “bug” ? :slight_smile:


(ydnar) #14

Targetted lights are styled, switchable. Since Q3 doesn’t support switchable lights, don’t target lights. :slight_smile:

y