Re: Several rendering engines in the same plugin

by Puybaret » Sat Feb 08, 2020 4:25 pm

In [font=courier new]render[/font] method, you could create a camera with a different name for each rendered frame using a name equal to [font=courier new]UUID.randomUUID().toString()[/font]. For the background and the sun, I don't see any way in YafaRay to replace a light by another one, remove a light from the rendered scene or disable a light.
You could ensure that they are created only once but this would forbid to simulate sun moves during the day. You could also compare [font=courier new]sunDirection[/font] to its value during the previous call to [font=courier new]render[/font], and if it changed, delete the scene and environment with a call to [font=courier new]finalize()[/font] and create again the environment and the scene like in [font=courier new]YafarayRenderer[/font] constructor (this will slow down video creation process compared to SunFlow renderer, but changing time during a video is probably not a common use of the video creation tool).

Good luck!