Archived

This topic is now archived and is closed to further replies.

Lithic

Problem implementing cloud-color paper in FAQ

Recommended Posts

I recently implemented the most realistic cloud coloring paper found in the FAQ here (A Practical Analytic Model for Daylight). While my implementation of the paper looks extremely realistic, i have a problem at the top of the skydome where three distinct changes in color appear. I'm not sure what is happening here, but any tips would be helpful. At different times of day the lines become more distinguished, however they are always extremely bothersome. Any help would be appreciated. My guess is that there is some problem with my atan2(dome[vertice].x, dome[vertice].z) calculations of the phi angle near the top of the skydome. Possibly a loss of accuracy due to my use of floats. Here is a picture of the problem at the most visible time of day (during the end of a sunset). EDIT: Can't seem to upload pictures that everybody can link to. Tried geocities, but it only worked for me. Any reccomendations? --===LITHIC===-- --===WWW.Decimation.TK===-- [edited by - Lithic on November 16, 2003 7:56:54 PM]

Share this post


Link to post
Share on other sites
hmm... On further thought the problem could also be with how i calculate gamma (the angle between the sun vector and the view vector) I use two angles to calculate it: phi, the angle from the zenith, and theta, the angle west of south.

gamma = SQRT(SQR(ABS(thetaView - thetaSun)) + SQR(ABS(phiView - phiSun)));

--===LITHIC===--
--===WWW.Decimation.TK===--

[edited by - Lithic on November 16, 2003 7:38:00 PM]

Share this post


Link to post
Share on other sites
Nobody replied, but thanks anyways. It appears that i cannot find the angle between those vectors using the pythagorean theorem with their angles. I just converted the angles from the sun position into a normalized x/y/z using some trig and then found the angle between the vectors using:

acos(dotproduct/crossproduct)

looks pretty nice =)


--===LITHIC===--
--===WWW.Decimation.TK===--

Share this post


Link to post
Share on other sites