SC4D Homepage
BSC File Exchange
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 

News:

All SC4D members can freely PM any Staff member regarding issuing Karma Points to a deserving member on their behalf.


Author Topic: JBsimio on Nightlighting  (Read 3365 times)

0 Members and 1 Guest are viewing this topic.

Offline Diggis

JBsimio on Nightlighting
« on: December 03, 2009, 02:27:09 AM »
I take absolutly no credit for this (hence no blame when it goes wrong :D ) but below is a post from Jon on how he approaches lighting.

I've gotten a number of comments on my lighting lately, and thought that maybe a brief explaination of my interior lighting methods could be helpful to some people.  This is mainly geared towards GMAX users, as I have no idea how the lighting rigs in the other programs work.  Generally, my methods involve creating "rooms" to separate the areas.  I use different glass and floor textures to create subtle variety in the lighting.  From a modeling standpoint, there are a couple things to keep in mind for this to work well.  Obviously, it means that some interior walls will be needed.  It also means that each window should have its own individual pane of glass.  (You could do one glass texture for an entire wall... but I find it limits the random effect.)

So first off, here are a few "preparation" pictures taken from my most recent building.  First is a top down view of the essentials.  You can see where the windows are and the interior walls that separate each room.



That's really all it takes.  In this case the rooms are all basically the same size, which makes things a bit easier.  Different sized rooms are very doable, but require a little more work with the actual lights.  More on that later.  Next, here is a look at what will create the variety in the lighting (and also the day shots really).

First is the different glass textures.



There are actually 6 different textures mixed in there.  The easiest way I've found to do this and still make it totally random is to model the building first.  Once everything is set the way I like it, I ungroup all my windows one elevation at a time.  I count up how many total glass panes there are and divide that by the number of textures I want to use.  This tells me how many of each texture I'll have... say 20 of each in this case.  I open up the selection box and just start clicking on glass panes (with the control key to select multiple objects) until I have 20 selected.  I group it and label it "Glass_Blue" and then do the same for "Glass_Green," "Glass_Streaked," or whatever.  Then apply a different texture to each group.  Do this for each wall and your done... it's really not as bad as it sounds.  Here's an example of the glass settings I generally use:



Opacity ranges from 70-80 for the textures I'm including here.  The lighter blues tend to be higher opacity... the darkest is usually the green and needs to be a little lower to let the light show well.  Specular Level ranges between 40-60 with the Glossiness set between 1/3-1/2 of the specular level.  These are rough estimates... it's a matter of finding what works best for you.

Enough about the glass... the other key is the floors.  I actually use billboards for floors now.  They create a nice illusion of shadows and interior "noise" while remaining easy to use.



Once again, there are a variety of textures here.  I have 12 floors with 5 different textures.  Even the repeat textures are not completely the same.



As you can see... all three of the highlighted floors use the same texture.  It's just flipped, rotated, or tiled differently.  More variety... less work!

That's all there is to that part.  Now on with the actual lights!  I use two lights for each room.  One targe spot and one omni.  I do this for a couple reasons.  The spot light is primarily to light the floor... which is what ultimately gives the illusion of the lights being on in that room.  I also use it for a touch of color.  The omni brightens the floor and also creates the light spill effect for window sills or porches or whatever else might be nearby.  Let's take a closer look at the spot light first.



A couple things to notice here about the placement.  First of all the light is centered within the room on the x,y axis.  The floors start at z=6 and z=11 and are extruded 0.2m.  So the floor surface for this room is actually z=6.2.  The spot light is at z=10.9 or just below the next ceiling.  The target is actually set at z=5... so yes, it goes below the floor I'm working on.  Now for the settings:



There's a lot to see here... and this is the part that took me a lot of trial and error to get a handle on.  Starting at the top... we have a target spot (that's good, since it's what I was trying to use).  Moving down, I've checked Cast Shadows.  Below that are the color settings.  I use this yellowish color to add a warmer feel to the lights that doesn't get too harsh.  Below that is the multiplier... in this case set to 1.95.  This will take some fine tuning depending on the floor and glass textures used, but it seems to work fairly well in most cases.  Skip over the Affect Surfaces section... I have no idea what it does or if it even works in GMAX.  Next is the Spotlight Parameters and there are a couple things here.  Uncheck Show Cone and Overshoot if they are checked.  You can choose either a circle or rectangle pattern... we want rectangle since we're doing an interior room.  If the room is nowhere near sqaure, you can change the aspect ratio to create long or narrow rectangles... but be warned that these don't rotate well.  (That comes into play when cloning and moving these around.)  And finally in this section are the Hotspot and Falloff settings.  In the picture of our light, you can see two cones, one brighter blue and one darker.  The brighter blue indicates the hotspot.  Adjust this number until the cone just touches the walls at the floor level.  Make the falloff two more than the hotspot (this is the minimum difference allowed).  Be careful about using the top view to make these adjustments.  In top view the "cone" will look larger than the room because it still extends below the floor.  The final settings are the Near and Far Attenuation.  I use these to avoid light leaks on larger buildings.  Be sure to check the "use" box for each and set them both below the floor level.  In my example the light is 4.7m above the floor, so I set them both for 6.  This basically means that the light stops shining 6m from its source and is indicated by the blue arc along the bottom of the cone.  You can ignore the decay for this part.  Almost done... now we'll set up the omni light.



As you can see this is set slightly below the spot light.  The placement for the omni varies a little bit more depending what I want it to do.  I set it higher and closer to the exterior wall if there is a porch or roof I want light spilling out on... more centered and lower if not.  In this case, I have nothing outside to worry about so it is centered with my spotlight and at z=10.  Again we'll look at the settings:



Not quite as much to deal with this time.  Cast Shadows is checked again.  This should really be a GMAX default in my opinion, but it's not for some reason.  As you can see from the RGB settings for this one are almost white with a multiplier of 1.6.  The Attenuation Paramters are the key to this one and each is marked with a circle in the picture above.  Near Attenuation is the inner most blue circle.  This marks the boundaries of the brightest or most complete light... kind of like the hotspot for spot lights.  I don't want this to quite touch the floor or it will look too bright.  Since my light is 3.8m above the floor surface, I set the Near Attenuation to start at 0 (the source of the light) and end at 3.5.  (Don't forget to check the "use" box.  The show box just means you will always see these marking circles even when the light is not selected.  I never use it because it gets messy when you have 60 lights going.)  Next is the Far Attenuation.  This is the outermost grey circle.  The start number should just be your ending number from above.  The end number is flexible and indicates where your light will be completely faded out.  I generally set this around 6 or 7... usually 7 for spillovers and 6 where I don't need them.  Once again, don't forget the "use" box.  Finally, we have the decay.  It's marked by the green circle.  I still haven't completely figured this one out to be perfectly honest so I can't really explain exactly what it does.  I just know that I set it about midway between the near and far attenuation end points and select "Inverse" from the roll out.  The only thing to really notice here is that the green does touch and go beyond the floor, but not by much.

For exterior lighting, I also use the decay with free spots.  I've found when shining light down on a porch, that the decay arc should just barely touch the surface to create a nice fading out effect.  (The near attenuation would stop about 0.5 above this and the far attenuation goes 2-3m beyond it.)  Just a little side note... sorry.

Now that I've got my light made, I save and do a preview render in high quality to check the levels.  Make any adjustments necessary now until it looks the way you like it.  Once I'm happy with the effects, I group the two lights together and give it an appropriate name.  GMAX usually gives these groups some pretty crazy pivot points, so I always re-assign an x,y,z setting that makes sense to me.

This group is now my light for each room.  From here, I just clone the group as an instance and move it to each room I want to light.  I do the instance just so that if the final result isn't what I expected from my test render I can adjust one light and have all the rest adjust themselves accordingly.  The only thing to remember about this is that if you have different room sizes you will need to make a "new" group for each size.  (Usually just clone as a copy, make the size adjustments, rename, and then clone as an instance for the rest of the similar sized rooms.)

That's it... here is the end result:



This is definitely more work than nite mapping window panes, but I think the result is worth it.  The nice thing about this method is that I've found if I use the same set of textures (which I usually do) I can still mix them around enough to get variety but keep all the same settings.  I've now gotten to the point where I have three or four lighting schemes that I can choose from that usually fit pretty well.  I just merge the proper one into my current building, make some size adjustments, double check the effects, and start cloning.

« Last Edit: December 03, 2009, 04:55:29 PM by Diggis »

Sim City 4 Devotion Forums

JBsimio on Nightlighting
« on: December 03, 2009, 02:27:09 AM »

 


If you experience visual glitches in our site, we strongly suggest you to use Firefox to browse the forums. Also a 1024*768 or higher resolution is highly recommended to view this site

Latest News

All SC4D members can freely PM any Staff member regarding issuing Karma Points to a deserving member on their behalf.

SMF 2.0.15 | SMF © 2017, Simple Machines
TinyPortal © 2005-2011
SMFAds for Free Forums

Page created in 0.322 seconds with 47 queries.