ladybug-tools / ladybug-web

Ladybug for web provides weather data visualization and analysis on the web
http://ladybug-tools.github.io/ladybug-web/
GNU General Public License v3.0
11 stars 7 forks source link

Status Update ~ 2016-03-25 ~ Multiple Lights #13

Closed theo-armour closed 8 years ago

theo-armour commented 8 years ago

image

Today's effort concerns generating a 'sun range' or Sun positions for a time-range - say 21 Dec, 9 to 5 pm.

There are several possible methods for creating such an effect. You can edit the colors of vertices in a mesh. Or Three.js has a new tool call Shadow mesh

Both these methods will be worth investigating. But first we thought to try the simplest method which is to add ten lights to a scene and see what happens.

The link below to Multiple Lights goes to the first experiment with this method. Although not perfect - as the screen capture above indicates, the multiple lights method seems a good place to start. And its great advantage is that its use will be quite familiar even to those with only a limited amount of Three.js experience.


Multiple Lights

Features

mostaphaRoudsari commented 8 years ago

@theo-armour I'm so used to your daily updates that I started to get worried about not seeing one of them during the last few days. I hope it's all good. :sunny:

theo-armour commented 8 years ago

@mostaphaRoudsari

Lots going on behind the scenes - but no fun screen captures. When it's like that I give up on updates for a while.

But if you look at the home page, you will spot some diffs

http://ladybug-analysis-tools.github.io/ladybug-web/

On Tue, Mar 29, 2016 at 6:05 PM Mostapha Sadeghipour Roudsari < notifications@github.com> wrote:

@theo-armour https://github.com/theo-armour I'm so used to your daily updates that I started to get worried about not seeing one of them during the last few days. I hope it's all good. [image: :sunny:]

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ladybug-analysis-tools/ladybug-web/issues/13#issuecomment-203177709

theo-armour commented 8 years ago

PS

You never responded to this one

https://github.com/ladybug-analysis-tools/ladybug-web/issues/13

So I thought you and your fiancee were off enjoying life somewhere. ;-)

On Tue, Mar 29, 2016 at 6:10 PM Theo Armour theo@evereverland.net wrote:

Lots going on behind the scenes - but no fun screen captures. When it's like that I give up on updates for a while.

But if you look at the home page, you will spot some diffs

http://ladybug-analysis-tools.github.io/ladybug-web/

On Tue, Mar 29, 2016 at 6:05 PM Mostapha Sadeghipour Roudsari < notifications@github.com> wrote:

@theo-armour https://github.com/theo-armour I'm so used to your daily updates that I started to get worried about not seeing one of them during the last few days. I hope it's all good. [image: :sunny:]

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ladybug-analysis-tools/ladybug-web/issues/13#issuecomment-203177709

mostaphaRoudsari commented 8 years ago

Hahaha! Not really. I checked the link and I saw the image below instead of your nice screen capture and I thought it is still a WIP so I didn't comment. :) I could never recreate multiple shadows on my machine.

image

theo-armour commented 8 years ago

@mostaphaRoudsari

Interesting! This looks and sounds like a hardware/WebGL issue.

Questions:

  1. Does the JavaScript console report any problems?
  2. Are you using latest Chrome browser?
  3. Do you know what type and model of GPU you have?
  4. Does the script work on you phone or tablet?

In any case, I will build R2 with a slider that enables you to select the number of lights to employ. This might help.

mostaphaRoudsari commented 8 years ago

Hi @theo-armour, I should have checked myself!

  1. Yes image
  2. Yes
  3. NVIDIA. I can check the details if you need more data but the issue seems to be something else.
  4. Works on my phone and it's beautiful! :tada:
theo-armour commented 8 years ago

@mostaphaRoudsari

Yes, looks like HW/WebGL issue.

Is your Nvidia card older than two or three years?

In any case, I hope that version with fewer lights will run.

Coming soon...

mostaphaRoudsari commented 8 years ago

@theo-armour my laptop is more than 6 years old now so the answer is yes. I hope so.

theo-armour commented 8 years ago

Adding and remove lights during runtime gets to be a bit tricky.

Since a computer six years old is a bit of a rarity, I have added a simple location.hash workaround.

Multiple Lights R2

Change the number of lights using location.hash:

1 light

2 lights

3 lights

4 lights

5 lights

For more lights, edit the location.hash, press enter and then reload. With no hash the default is ten lights.

mostaphaRoudsari commented 8 years ago

@theo-armour thank you for the update. Examples 1light-5lights works fine on my laptop but not the Multiple Lights R2.

theo-armour commented 8 years ago

http://ladybug-analysis-tools.github.io/ladybug-web/multiple-lights/index.html#6

Increment the number at the end of the above link then open the link.

Repeat.

Let's see how high you can go before trouble happens. ;-)

BTW, the default number is for 10 lights ( to cover 9am to 6pm) - so we know that your number must be lower

mostaphaRoudsari commented 8 years ago

Hi @theo-armour, My laptop stops working when the number of suns is 8 or more. It's good if we can have a catch to give a warning if it fails on their machine. I think the number will change if I load a simpler or more complicated scene (or is it?).

In any case, my old laptop should be the reference for testing this development. What do you think about merging all your under developments into a single page and ask for more people to test/comment? This is impressive work.