Print at Dec 19, 2025, 11:34:36 PM

Posted by enkonyito at May 13, 2020, 2:51:08 AM
Re: Several rendering engines in the same plugin
Changes made to version 1.1 of the YafaRay plug-in
if (this.sunDirection == null || !Arrays.equals(this.sunDirection, sunDirection)) {
if (this.sunDirection != null) {
try {
// Reinitialize renderer because Yafaray doesn't allow to modify or delete lights
dispose();
finalize();
init();
} catch (IOException ex) {
// Shouldn't happen since first initRenderer call worked
}
}
if (sunDirection [1] > -0.075f) {
...
}

this.sunDirection = sunDirection;
}

have an impact on variable light sources (daylight or automatic).

Their power is linked to sunDirection [1] which is initialized before the call to the exportLightSource method.
this.sunDirection = getSunDirection(this.compass, Camera.convertTimeToTimeZone(this.home.getCamera().getTime(), this.compass.getTimeZone()));


If I keep this initialization, the sky or the sun is no longer visible.

Automatic light off.


Automatic light on.


Do you have any advice to resolve this situation?
----------------------------------------
EnkoNyito