This topic is 4551 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, i m implementing the paper "a practical analytic model for daylight", currently, i've implemented the skylight code, however, I dont have the book "An introduction to solar energy", thus, i dont know how to implement the sunlight. would anybody here give me some reference material or any suggestion, so that i can finish the sunlight.

##### Share on other sites
You can render the sun as a directional light with some corona in front of it. Just combine it with "atmospheric scattering" to calculate some light boucing off particles in the air etc...
I don't think there's another solution to sunlight, unless you want to leave the word REALTIME...

##### Share on other sites
hi,actually, my intention is to implement the paper, not to render something in realtime. any other suggestion?

what is more, i m not so clear about what the last statement in the following function do and how i can implement the class RiColorXYZV.(it is from the source of the original paper)

Thanks...

RiSpectrum RiSunSky::GetSkySpectralRadiance(RiReal theta, RiReal phi) const
{
RiReal gamma = RiAngleBetween(theta,phi,thetaS,phiS);
// Compute xyY values
RiReal x = PerezFunction(perez_x, theta, gamma, zenith_x);
RiReal y = PerezFunction(perez_y, theta, gamma, zenith_y);
RiReal Y = PerezFunction(perez_Y, theta, gamma, zenith_Y);

RiSpectrum spect = ChromaticityToSpectrum(x,y);

// A simple luminance function would be more efficient.
return Y * spect / RiColorXYZV(spect).Y();
}

1. 1
Rutin
38
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 104
• 11
• ### Forum Statistics

• Total Topics
632977
• Total Posts
3009677
• ### Who's Online (See full list)

There are no registered users currently online

×