Re: Sunlight simulation and variable light source

by enkonyito » Fri Mar 24, 2023 10:24 pm

Taking into account the new values of [font=courier new]sunDirection[/font] at each frame, the light panel turns on automatically after sunset.

Now there are two problems.

Problem 1: With a new update method
By removing the previously created light panel from the renderer, the updated light panel loses its appearance while keeping its lighting.
If it is not removed from the renderer, the updated light panels are added to the previous one which weighs down and modifies the rendering.

Problem 2: With [font=courier new]updatedItems != null[/font]
When removing the previously created light panel from the renderer, there are the following messages:

Code: Select all

GEOM error: Geometry "object09c1d2eb-25b8-4875-8459-a2f1a1c61250-0" was not declared yet - instance is invalid
API error: Unable to update "object09c1d2eb-25b8-4875-8459-a2f1a1c61250-0.instance" - removing
API error: Unable to declare camera "camera", name is already in use
Then

Code: Select all

java.util.MissingFormatArgumentException: Format specifier '%s'