New Hosek and Wilkie sky model

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: jromang, tomb, zcott, coordinators

New Hosek and Wilkie sky model

Postby jeanphi » Sun Sep 16, 2012 3:23 pm

Hi,

I've just added a new sky2 light using the Hosek and Wilkie model. All the code is mine, but the model and the data is theirs.
Please test it and let me know what you think of it.
EDIT: the current code doesn't yet allow to specify the earth albedo, but that will be a natural extension if you like it.

Reference: http://cgg.mff.cuni.cz/projects/SkylightModelling/

Jeanphi
jeanphi
Developer
 
Posts: 7266
Joined: Mon Jan 14, 2008 7:21 am

Re: New Hosek and Wilkie sky model

Postby J the Ninja » Sun Sep 16, 2012 4:18 pm

EDIT: Wait a sec, I just tried that in my 1.0 build and it gave the same result.


Does this work with the sunsky light or no?
Last edited by J the Ninja on Sun Sep 16, 2012 4:23 pm, edited 2 times in total.
-Jason

Material DB Admin
User avatar
J the Ninja
Developer
 
Posts: 2461
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: New Hosek and Wilkie sky model

Postby B.Y.O.B. » Sun Sep 16, 2012 4:21 pm

Yay! Very cool :)
User avatar
B.Y.O.B.
 
Posts: 2173
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: New Hosek and Wilkie sky model

Postby cwichura » Sun Sep 16, 2012 7:55 pm

What visual differences should be expected between this model and the existing one in Lux? A pros/cons of the two models would be useful to know.
cwichura
 
Posts: 482
Joined: Sun Feb 12, 2012 11:31 pm

Re: New Hosek and Wilkie sky model

Postby J the Ninja » Sun Sep 16, 2012 8:11 pm

cwichura wrote:What visual differences should be expected between this model and the existing one in Lux? A pros/cons of the two models would be useful to know.


IIRC, new one gives much more realistic colors, especially when the sun is low on the horizon.
-Jason

Material DB Admin
User avatar
J the Ninja
Developer
 
Posts: 2461
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: New Hosek and Wilkie sky model

Postby J the Ninja » Sun Sep 16, 2012 9:32 pm

Ok, after a quick refresher on the light syntax courtesy of LordCrc, I've managed to get a proper test for this.

And....is this right? This doesn't look right:


Sky1 (matches Lux 1.0 result):
sunsky1 copy.jpg


Sky2:
sunsky2 copy.jpg
-Jason

Material DB Admin
User avatar
J the Ninja
Developer
 
Posts: 2461
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: New Hosek and Wilkie sky model

Postby jeanphi » Mon Sep 17, 2012 2:27 am

Hi,

It's indeed looking wrong. I have also found some situations where I get this greenish look, or a black zenith area. I have yet to figure out what's going on since it is otherwise mostly working. Maybe it's due to the different interpolation I'm doing or a wrong angle computation somewhere. I'll try to make some automatic testing and comparison with the original code.

Jeanphi
jeanphi
Developer
 
Posts: 7266
Joined: Mon Jan 14, 2008 7:21 am

Re: New Hosek and Wilkie sky model

Postby jeanphi » Mon Sep 17, 2012 3:27 pm

Hi,

There was indeed a silly typo in my implementation, the new sky light is now behaving as expected (at least to the extent of my testing).

Jeanphi
jeanphi
Developer
 
Posts: 7266
Joined: Mon Jan 14, 2008 7:21 am

Re: New Hosek and Wilkie sky model

Postby J the Ninja » Mon Sep 17, 2012 3:39 pm

Ah, great to hear! I'll repeat my test when I get home tonight. :)

Btw, are there plans for a "sunsky2" lamp as well? It would make the implementation in LuxBlend26 a lot simpler.
-Jason

Material DB Admin
User avatar
J the Ninja
Developer
 
Posts: 2461
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: New Hosek and Wilkie sky model

Postby jeanphi » Mon Sep 17, 2012 3:58 pm

Done :)

Jeanphi
jeanphi
Developer
 
Posts: 7266
Joined: Mon Jan 14, 2008 7:21 am

Next

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 1 guest