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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...