Jump to content
The Dark Mod Forums

Moonlight


killhour

Recommended Posts

How do I make a directional light, such as cast by the moon? I figured a parallel light would be best, but it doesn't seem to work.

 

Yes, you use a parallel light, but you have to drag the light center away from the middle of the light. D3 calculates the direction of the light vector via light center->light entity.

Link to comment
Share on other sites

Yes, you use a parallel light, but you have to drag the light center away from the middle of the light. D3 calculates the direction of the light vector via light center->light entity.

 

I did this, but the light didn't appear to work. There's something in the wiki about not intersecting parallel walls, but it was worded strangely.

 

Edit: Wait, should the origin be towards what I want lit, or away from it?

Link to comment
Share on other sites

The origin point you drag will be the SOURCE of the light, so figure the light coming from it's direction and going through the center of the light object (green diamond). So if you want the moonlight to go straight downward, drag that origin UP a bit (doesn't matter how far, even just 1 unit will do fine).

 

I like a good diagonal light but still mostly from above, such as 8 units up, 4 units north (forward), and 2 units to the west (left). Then the light will point downward and south-southeast.

 

Keep in mind that if you set the light to cast shadows (and you probably will want that to make it look good), that if you stick the light in a room that is closed off then the walls will effectively shadow the whole room, and it will appear to you that the light isn't working. That is hard to explain though so you may not see what I mean.

 

A way to see what I mean is to build a simple room, and put short (8 ft or something) walls (made of stone texture) on all the sides, and on top of those build additional brushes, another 38 ft or so, so that the entire room height is 40 ft) and paint the inside surfaces with portal_sky (and paint the ceiling brush inside surface with portal sky). Be sure you have a sky prefab (like "starry_something") in the mission of course. Then make a moonlight that is larger than the whole room, and position the origin as mentioned above. Then test in game, and you will see how the walls make shadows.

 

If you didn't have portal_sky painted where it is, the whole room would be in shadow, despite the fact that the center of the light is within the room. You just have to realize that when you make a light parallel, the light is no longer coming from the center of the light, but from the edges of the light boundary, and from whatever direction you moved the origin.

shadowdark50.gif keep50.gif
Link to comment
Share on other sites

It sounds like you've already seen the wiki page, but here is another link that seems dead on the wiki that I'll update. http://www.katsbits.com/htm/tutorials/doom...ing_outdoor.htm

 

As Komag and Dram have said, you have to drag the vertex of the parallel light away from the center to make it directional. The light will project parallel to the line between that vertex and the light entity itself, so that can kind of tell you what it will look like (I need to add some screenshots to the wiki).

 

Another good idea as portrayed in that link is to create a parallel ambient light pointing in the opposite direction that doesn't cast shadows, it creates a nice ambient effect.

 

If you are still having trouble I could send you a test map I have that has moonlight set up, so hit me up if you need it an I'll email to you.

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

    • 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
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...