Jump to content
The Dark Mod Forums

Tips for moonlight


Springheel

Recommended Posts

Can anyone recommend some good articles or advice about simulating moonlight outdoors? I've heard lots of people say that parrallel lights should be avoided, but are there other cost-effective ways to create directional moonlight in relatively open spaces?

Link to comment
Share on other sites

A simple solution would be to use a single standard shadow-casting point light.

 

Remember the starting scene of LQD? The sun was a single point light. It worked pretty well, and it isn't even particularily performance hungry, if you keep the amount of other lights in moderation (max overlapping lights = 2 or 3) in the scene, and also set the majority of objects noshadows: just the large items that have a gameplay value should cast shadows. Complex objects: set to "noshadows 1" and make a simple shadow geometry with shadow texture.

 

In some scenes where you have a narrow shaft, you could use a spot-light, instead of a point light.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I just checked Remembrance of Him, which has the best moonlight I can recall, and I see RPGista has used two giant parallel lights to create his moonlight, and they even overlap considerably in spots. Granted, his mission was pretty tightly confined, but I always thought parallel lights where horrible FPS killers.

Link to comment
Share on other sites

*tilts head, I only remember mentions that parallel lights were quirky, not performance issues with them. That being said, I went with multiple projecting lights in an area where parallel would've made more logical sense, as the projecting lights worked as expected.

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

Think of light count like adding extra polys to your scene. If your geometry is sparse enough and you've set enough objects

to func_static then you can afford a little more light overlap. I think Remembrance worked well because of the custom textures

and normals. The geometry on the walls was pretty flat but the textures gave of the sense of depth and therefore he had a larger

triangle budget for light overlap.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

This article is very complete:

 

http://www.katsbits....-techniques.php

 

What I did in Remembrance was to use a parallel light for each open space "room" + general ambient light. I dont quite remember now why I used two in the main street area, probably because of radius issues. Its another light added over geometry all over (that faces the direction of the light), but in open spaces thats not really a problem, as you can use the moon to light the scene, and can do away with all the little flames that you would otherwise need. Of course, the angle and strength of the moonlight can cast shadows that the player can use, and the mapper can also use to make scenes more expressive.

 

Fact of the matter is I did not spare on polys. There are many decorative elements hung on buildings, patch cornices, modelled windows with real wood work (instead of prefabs) deliberately left as is to cast shadows, many models around (benches, graves, garbage, modelled roofs, vegetation, lots of rumble actually, etc), everything I wanted to put in there, within reason. Many overlapping lights, moveables, moveable lights, its not the most smooth working map, but its ok, so the engine can take a lot, as Im sure Springheel already knows quite well.

Edited by RPGista
Link to comment
Share on other sites

Well part of your answer, answers the question. You used custom models and func_statics. Even though they often appear to be more detailed than brushes,

the engine has a tricky way of splitting brushes into triangles to try and keep them ready to be split for portals, lights, and just plain FOV\Vis. That reduction in

polys gave you extra head room to add more lights.

 

Lessons:

 

1) Models give you more bang for your buck with regard to visuals per poly.

2) Even though scenes with models look more complex and detailed, you can often afford more lights with them too

 

Win Win

 

(Unless you don't know how to make models...)

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I just checked Remembrance of Him, which has the best moonlight I can recall, and I see RPGista has used two giant parallel lights to create his moonlight,

I was about to suggest this map, the way he did it and the way I have done it in the beta map Im working on is to have a moon light for each open area, but yeah you dont have to have more than one light in each area and certainly not over lapping.

 

The trick I found for perf is to make as much stuff "noshadows" "1" as possible.

Link to comment
Share on other sites

If you have a street and you want the buildings of one side to cast a shadow on the buildings on the other side you can make a parallel light texture with the silhouettes of the buildings in it. That way you can have a no shadows light with nice soft silhouettes projected on the other buildings.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...