Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8048685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:33:27+00:00 2026-06-05T06:33:27+00:00

Is it possible to create shadows from a DirectionalLight ? If I use SpotLight

  • 0

Is it possible to create shadows from a DirectionalLight?

If I use SpotLight then I see a shadow, but if I use DirectionalLight it doesn’t work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:33:29+00:00Added an answer on June 5, 2026 at 6:33 am

    Yes, you most definitely can use directional lights to cast shadows. You need to make sure you are not using MeshBasicMaterial as they don’t support shadows. Use MeshLambertMaterial or MeshPhongMaterial instead.

    You need to enable shadows for the renderer with something along these lines:

    renderer.shadowMapEnabled = true;
    renderer.shadowMapSoft = true;
    
    renderer.shadowCameraNear = 3;
    renderer.shadowCameraFar = camera.far;
    renderer.shadowCameraFov = 50;
    
    renderer.shadowMapBias = 0.0039;
    renderer.shadowMapDarkness = 0.5;
    renderer.shadowMapWidth = 1024;
    renderer.shadowMapHeight = 1024;
    

    And then you must enable shadow casting and shadow receiving per object and per light so you would have

    dirLight.castShadow = true;
    object.castShadow = true;
    otherObject.receiveShadow = true;
    

    Then, if the light and objects are placed at appropriate positions. dirLight will cause the shadow of object to be cast against otherObject.

    [EDIT]: Here is a working demo for anyone looking to do something similar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Create an Iframe from a Drupal Website I'd like to use an
Is it possible to create shadows like the shadow of Apple's environment-information sheets with
Anyone know if its possible to yet create a css based drop shadow on
Is it possible to create a plot from List(Of Decimal) values in Excel with
Is it possible to create a 1 pixel shadow image (say shadow.jpg) in photoshop,
Is it possible to create a curved box-shadow with CSS3? Below is an image
is that possible create an abstract class from DbQuery and IDbSet? I'm trying to
Is it possible to hack someone's session variables and create a new shadow user?
Is it possible to create both an outer shadow for a 3D effect and
Possible Duplicate: How to use Quartz 2D to add drop shadow to an UIImage

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.