Lighting help

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

Lighting help

Postby shaggy » Thu Nov 01, 2007 10:35 am

I'm making this map, but I can't seem to get the lighting right, could someone please help me. Here is the pk3.
http://www.shaggy.googlepages.com/ctf_swamp.pk3
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Postby TK471 » Thu Nov 01, 2007 11:32 am

Might be a syntax issue, I notice your 'scripts' folder is spelled

scrpits

Although I see the scripts is just for the liquid, but it might help things in the long run. You might be wanting some kind of skyparm/sun lighting for the room... I'm still learning myself, and my maps have lots of light entities currently to light the rooms. Maybe look at how some other maps are lit for large open areas.
TK471
Alien
 
Posts: 119
Joined: Wed Aug 01, 2007 2:41 pm

Postby TK471 » Thu Nov 01, 2007 2:08 pm

OK, for the record, I'm a newb too, and looking at your map, I thought 'sun light' or 'sky light', so I stole some scripts from Harlequin Sky (unpack the data20070531.pk3 to find all the info in there), and hacked it to make a sky light, which now casts shadows thru your water. This is probably not exactly correct, but it works, except the buildings outsides don't seem to be lit, and they probably need some lights added around them (as I said, I'm newb).

I also added some light fixtures in the rooms (you don't have to use those).

I also sorted some path issues, and changed your liquid script to look into your own 'shaggy' folder. Please read the script to see if you can understand where I'm coming from.

Here's some screenshots after adding sky lighting:

Image
Image
Image
Image

OK, it's your turn to work on your map, here's the updated .pk3 (hopefully I packed it correctly).

*Shaggy has new beta one posted under a new thread, here:
http://alientrap.org/forum/viewtopic.php?t=2384
Last edited by TK471 on Sat Nov 10, 2007 5:12 pm, edited 1 time in total.
TK471
Alien
 
Posts: 119
Joined: Wed Aug 01, 2007 2:41 pm

Postby shaggy » Thu Nov 01, 2007 9:26 pm

Thank you for that.

What light values did you use?
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Postby TK471 » Thu Nov 01, 2007 10:05 pm

Well, have a look at the shader that I added some bits to, and changed some paths:

Code: Select all
//Water for Q3texture, temp use.
//This shader is for DarkPlaces Engine - Nexuiz

textures/shaggy/liquids/liquid_1
{
   qer_editorimage textures/shaggy/liquids/liquid_1.tga
   qer_trans 0.5
   surfaceparm trans
   surfaceparm nonsolid
   surfaceparm water
   deformVertexes wave 150.0 sin 2 5 0.25 0.1
   Q3map_TessSize 128
   cull none
   {
      map textures/shaggy/liquids/liquid_1.tga
      blendFunc add
      rgbGen vertex
   }
}

textures/shaggy/round_light
{
   qer_editorimage textures/shaggy/round_light.tga
   q3map_lightimage textures/shaggy/round_light_glow.tga
   q3map_surfacelight 1000
   {
      map textures/shaggy/round_light.tga
      rgbGen identity
   }
   {
      map $lightmap
      blendfunc filter
      rgbGen identity
      tcGen lightmap
      depthFunc equal
   }
   {
      map textures/shaggy/round_light_glow.tga
      blendfunc add
   }
}

//   nebula skybox (taken to make test sky lighting)
//   =============

textures/shaggy/smt_cemwll
{
   qer_editorimage textures/shaggy/smt_cemwll_skylight.tga
   surfaceparm sky
   surfaceparm nolightmap
   q3map_surfacelight 50
// note: Change the surfacelight value if you want more ambient light from the sky.
   q3map_sun 1 .98 .9 70 0 90
// note: Change the fourth value (100) if you want a brighter or dimmer sun
   skyparms textures/shaggy/env/smt_cemwll - -
}


This is a hack, I was referencing the Q3A Shader Manual
(http://www.heppler.com/shader/) look for section 4.4 q3map_sun <red> <green> <blue> <intensity> <degrees> <elevation>. So I used some settings that existed for Harlequin Sky, swapped out the 6 sides of textures for the same texture you used for your outer walls (renamed appropriately), and turned down the 'sun' to a setting of 70 brightness. Oh, I also removed the 'surfaceparm noimpact' and 'surfaceparm nomarks' parms, since you looked to be making this a big room. You can add those back if you plan to turn it into a 'sky'.

The light fixtures each have 4 light entities, and each set at 300. As previously stated, you may want to add some lights on the outside of the buildings, but I'm not sure (anyone else have tips about that?).

I myself had not used the q3map_sun parameter before, so you gave me a chance to try it. I'll probably have more of a go at it in some other maps.

I highly recommend experimenting with the shaders a bit, keep a simple small map around for testing purposes, and also use that shader manual! I'm still sorting it all out myself. For your map, you could probably switch over to a nice skybox at some point, and have your dirty water spread out to the horizon.
TK471
Alien
 
Posts: 119
Joined: Wed Aug 01, 2007 2:41 pm

Postby tZork » Thu Nov 01, 2007 10:15 pm

also note that any shader using q3map_surfacelight or other lightcasting params need to be listed in shaderlist.txt (the basefilename, ex "scripts/blaha.shader" would be listed as "blaha")
HOF:
<Diablo> the nex is a "game modification"
<Diablo> quake1 never had a weapon like that.
<Vordreller> there was no need for anything over 4GB untill Vista came along
<Samua>]Idea: Fix it? :D
<Samua>Lies, that only applies to other people.
tZork
tZite Admin
 
Posts: 1337
Joined: Tue Feb 28, 2006 6:16 pm
Location: Halfway to somwhere else

Postby shaggy » Fri Nov 02, 2007 6:49 am

Hey, I was looking at the map again, I took a closer look at the light, and I was wounder in how you set the texture on the light so it on one side had the light texture and on the others it was blue... Even though it was a solid.

Here's what I'm talking about:
Image

---------------------

I do like what you've done, I think I'll leave it pretty much like that, except, I'll add a light on the bases.

Do you have any suggestions for it?
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Postby PinkRobot » Fri Nov 02, 2007 8:15 am

Use Ctrl-Alt-Shift to select individual faces of a brush to give them a different texture [press T] or edit the texture's appearance [press S].

I take it you do not use a lot of caulk either then ?
Now with new shiny avatar.
PinkRobot
Alien trapper
 
Posts: 443
Joined: Fri Jul 21, 2006 7:06 pm
Location: #brlogetc

Postby shaggy » Fri Nov 02, 2007 9:49 pm

No, I do not, I don't even know what they are.
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Postby TK471 » Fri Nov 02, 2007 11:21 pm

You need to use caulk. Caulk is under the 'common' textures, and you use it on the backside of any surface that you don't want the game engine to draw.

Look at this craziness (images taken with 'structural' brushes switched off from view):

Image
Image

All that pink crap, is 'caulk', it's stuff I don't want the game engine to draw. The purple stuff is 'nodraw', which I use on the backside of some translucent surfaces. But caulk is what you want for surfaces that are not seen (as much as possible, anyway).

Oh, also get into turning some brushes into 'detail' brushes. I learned that 'detail' brushes help some transparent 'alpha channel' textures, and also, will help in game compile time (my first map 'tk471dm1' went from 5 hours to compile, to about 15 minutes, just by turning brushes inside the map, into detail brushes!). But keep your main structural brushes as 'structural'.
TK471
Alien
 
Posts: 119
Joined: Wed Aug 01, 2007 2:41 pm


Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest

cron