0

Hello a-Frame Users

I'm trying to play with light in a-Frame in order to create a scene that shows the Lunar (Moon) Phases.

Right now my problem is that I can't combine directional light with ambient light in a way that simulates the Sun, Earth and the Moon.

someone know how can I light the scene in the correct way?

1 Answers1

1

Two things are important here

1) make sure that the light actually is set up to cast shadows:

  <a-entity light="castShadow: true"></a-entity>

2) make sure your entities cast and receive shadows:

  <a-entity shadow="cast: true"></a-entity>
  <a-entity shadow="receive: true"></a-entity>

Check it out here.

Piotr Adam Milewski
  • 14,150
  • 3
  • 21
  • 42
  • Thank you for your help. I read the [light](https://aframe.io/docs/0.8.0/components/light.html#sidebar) and the Shadow System Properties section but the problem is with the all scene. check it [here](https://codepen.io/YonatanGazit/pen/pZzRMO?editors=1000). right now it looks good but I'm sure there is a better way to do it. – Jonatan Gazit Jul 11 '18 at 08:08
  • @JonatanGazit make the moon/earth cast and receive shadows, and make the sunlight cast a shadow. https://codepen.io/anon/pen/vaOyGg?editors=1000 – Piotr Adam Milewski Jul 12 '18 at 10:12
  • @JonatanGazit i'd recommend making the scene augmented only AFTER its working as expected ;) – Piotr Adam Milewski Jul 12 '18 at 10:14