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 → Shader lighting
Shader lighting
2002-11-04, 5:31 AM #1
Ok, I want to know how to light with shaders, cos i keep exceeding the entity light grid limit ******. I have deleted loads of unnecessary lighting, yet it's still too much. So is there any decent tuts out there??????

Also off topic, I couldn't beleive it i walk into Virgin Megastore. There on the shelf is the three films i have been looking for, "Leon", "Meet Joe Black" and "Shallow grave". Even better then that, they are in a 3 for £15 sale, now tell me I didn't get a deal and a half there, try and tell me that huh. It was so simple, how's that, Bob's yer uncle, have a bannana!


------------------
NEB
NEB
2002-11-04, 4:12 PM #2
Try making some of your brushes use vertex lighting instead of lightmapping. This can drastically decrease the light grid amount. This is best done with brushes that form terrain. Simple just add this key and value to a brush that is a func_group (might work for other entities but I'm not sure about that):

"q3map_vertexlighting" "1"

Most likely your terrain is divided into triangles already so vertex lighting doesn't look all that different from light mapping on terrain. I too had encounter this light grid problem a while back and setting those func_groups that were terrain to use vertex lighting fixed the problem for me. Hope this helps.

-- SavageX

------------------
"Never trust a bartender with bad grammar." - one of the many one-liners of Kyle Katarn.
"Be kind to nerds because one day... one will be your boss."
SavageX's Editing Corner
2002-11-06, 2:37 PM #3
Woah dude i am not sure what happened, but I think you made it worse lol. OK i don't have any func groups or any real terrain as it is a city of course. So i just used your tip with a few patches and surfaces.

I go to compile, it finishes early, i check the junk. I get the same exceeding light grid message, only i exceed like 8 times the original amount. Where as before i was just over the limit.

So i go back and remove the value from the surfaces and just leave it on a few patches. I go to compile, same thing and same text in junk. It doesn't even look like it has wrote to the junk the 2nd time as i removed some lighting but the number was the same.

I really need some tips on this, as i have atleast 4 more buildings to make, all needing light. I have already removed all the lighting I can without comprimising the overall look of the map.

The only other thing i can think of, is to split the map in two. But this is going to be hard as it is basically an open area. You would be able to see the other buildings that would be the next part of the map and that they weren't lit.

Heeeeelp, I've came to far to be stopped now ******!!!!

------------------
NEB
NEB
2002-11-07, 9:57 PM #4
bump

------------------
NEB
NEB
2002-11-08, 9:11 PM #5
Oops, silly me. It's supposed to be "q3map_vertexlightingonly". Sorry about that. Go try it now.

-- SavageX

------------------
"Never trust a bartender with bad grammar." - one of the many one-liners of Kyle Katarn.
"Be kind to nerds because one day... one will be your boss."
SavageX's Editing Corner
2002-11-09, 10:25 AM #6
Then still put the one???????

like,

key: "q3map_vertexlightingonly"
value: "1"

like that????

------------------
NEB
NEB
2002-11-09, 7:54 PM #7
Yes. I forgot to put in the word "only" last time. If you're making a level for SP use, look at the notes that are for the Func_group entity. It tells you how to do what I already told you before.

-- SavageX

------------------
"Never trust a bartender with bad grammar." - one of the many one-liners of Kyle Katarn.
"Be kind to nerds because one day... one will be your boss."
SavageX's Editing Corner
2002-11-10, 3:15 AM #8
Oh nooooooooooo, i did what you said, then i compiled a fullvis. Even though it was saying the same thing in junk, i figured what the hell and decided to try and load it. It started to load, hurrah, i thought.

Believe me that was a very premature hurrah. When i got in there the light was as if i had compiled a nolight or fastvis, the floor was up to my knees and i couldn't walk in certain areas as if there was clip there. It was like some crazy drug induced world, not that i would know of course.

HEEEEEEEEEEEELLLLLLLLLLLLLLLPPPPPPPPP

------------------
NEB
NEB
2002-11-10, 3:29 AM #9
and just incase you didn't beleive me......


[http://www.massassi.net/ec/images/8236.jpg]

Take a good look at that, why do i feel like i am going to have to start again.

------------------
NEB
NEB
2002-11-10, 3:41 AM #10
I made a map and in a certain area, I couldn't walk like there was an invisible brush blocking me. No one goes back there though so, my map still works.

You might be up to your knees because you placed the player start brush in the floor brush. That's all I can figure out.

Good luck...
2002-11-10, 5:25 AM #11
With GTKRadiant, clip brushes vanish when deselected, and when you play ... well, they clip 'ya. So, it must be some kind of view->filter option to view those, but I've never been successful at finding out what it is, mostly because I haven't looked.

If someone knows, post it.
www.wudan07.com
2002-11-10, 7:45 AM #12
erm no what i mean is i never put any clip there it is just acting like there is. It honestly has just gone nuts. To veiw clip you go on View ->filter->clip.

It totally looks like i am goin to have to start over. If i just save all the better buildings as prefabs, it won't be too bad. What am i talking about, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.

------------------
NEB
NEB
2002-11-10, 10:05 PM #13
Well, how many lights did you have anyway? I think the size of the map itself could be the problem as well as the number of lights. I think texture lights use up more light grids than entity lighting does so don't go over board with the texture lights.

-- SavageX

------------------
"Never trust a bartender with bad grammar." - one of the many one-liners of Kyle Katarn.
"Be kind to nerds because one day... one will be your boss."
SavageX's Editing Corner
2002-11-11, 3:59 AM #14
is there a way of being able to switch back and forth between maps then. At say a crossover point, kind of like the end of a level, only you can go back over.

This way i could have one map with one side fully textured and lit. Whilst the other side of the bridge is only textured as far as the eye can see and moderately lit. Then, when say you cross the bridge, it would switch you to the 2nd map with that side of the bridge textured and the other side only detailed as far as you can see.

------------------
NEB
NEB
2002-11-14, 12:55 AM #15
BUMP

------------------
NEB
NEB
2002-11-14, 4:23 AM #16
2 words to save your sanity:

Skybox Lighting.

------------------
*Joren, Legend, Alleged Egomaniac, and 6th Grade Spelling Champ*
*Joren, Legend, Alleged Egomaniac, Thread-Killer, 3-time Ban Recipient, and 6th Grade Spelling Champ*
2002-11-14, 4:44 AM #17
i came here after doing a search...

How DO you do shader lighting - would be very helpful as i want to do coloured lighting with this. Sky box lighting (a personal favourite of mine too), although maybe the answer to a lot of probs doesn't really help in a night-time map - which i have and looks like DrBleemo does too..

/edit BTW Dr>Bleemo i had similar prob (exceeded MAX_MAP_LIGHTGRID_ARRAY)
and i added-
key: gridsize

value: 128 128 128 (default is 64 64 128)

to the worldspawn. (Though i'm not entirely sure this is your prob)

gonna do more searching for coloured-light emitting shaders so i'll post here if i find answer....

[This message has been edited by Gignatz (edited November 14, 2002).]
2002-11-14, 5:58 AM #18
ok if anyone is still interested in light-emitting shaders:

after you have copied your chosen shader

e.g.
textures/bespin/mp_b_light04
{
surfaceparm metalsteps
{
map $lightmap
}
{
map textures/bespin/mp_b_light04
blendFunc GL_DST_COLOR GL_ZERO
}
{
map textures/bespin/mp_b_light04_glow
blendFunc GL_ONE GL_ONE
}
}

into mylight.shader and change it's name (textures/bespin/mp_b_light04) to
(textures/myshaders/mylightshader):

1) if in mp remove- surfaceparm metalsteps
( or you run the risk of splishy-sploshy footsteps in MP)

2) add (where the surfaceparm metalsteps line was) the line:

q3map_surfacelight 1000

(where 1000 is the brightness of the light - the surface area of the light texture also affects brightness)

3)if you want a coloured light (and deep, deep down you know you do [http://forums.massassi.net/html/smile.gif]) add:

q3map_lightimage textures/mytextures/mybluesquare

(i use textures/colors/blue (or red and the others in there)

4) if you want to see a texture in radiant (instead of notexture texture) add (i stick it at t'top):

qer_editorimage textures/bespin/mp_b_light04

(either the original path/name of the shader you just copied or normally the first texture in the shader)

should end up with something like this:

textures/gnar/g_blue_step_light
{
qer_editorimage textures/bespin/mp_b_light04
q3map_surfacelight 1500
q3map_lightimage textures/colors/blue
{
map $lightmap
}
{
map textures/bespin/mp_b_light04
blendFunc GL_DST_COLOR GL_ZERO
}
{
map textures/bespin/mp_b_light04_glow
blendFunc GL_ONE GL_ONE
}
}


This may not be the best way (i only learnt by trial and error - with a lil research thrown in) to do shaders so please pipe up if you know better [http://forums.massassi.net/html/smile.gif]



[This message has been edited by Gignatz (edited November 14, 2002).]
2002-11-14, 1:15 PM #19
Yeah my problem with the skybox lighting, is that it was a night map, so obviously i kind of wanted it dark. I just cannot believe that you cannot d a map this size in JO, it doesn't look as big as say sine's work for instance. I will try this method gignatz has put forward at the weekend. I haven't touched my map since saturday due to burn out and disgust at having this problem when i am almost done.

------------------
NEB
NEB
2002-11-14, 1:27 PM #20
well good Dr. if the error you got was exceeded MAX_MAP_LIGHTGRID_ARRAY the enlarged gridsize will sort it out.

Just remember the 3 values relate to x,y and z axes (jic you didn't click) So
value: 128 128 128 works on my map (i think i'll be able to reduce the x or y axis's size - i haven't finished fiddling) So you may have to play around a bit...

Good luck chap [http://forums.massassi.net/html/smile.gif]

↑ Up to the top!