Unable to add Unity lights at runtime without crash
Posted: Tue Oct 01, 2019 9:02 pm
Hi again,
It seems, unless I'm missing something (very well could be), that it is not possible to add new lights to the scene while in Play Mode. without causing an 'All GPUs failed' error, forcing a full reinstall of the plugin. This, for one is very frustrating and the reinstall process makes iteration incredibly slow, but the whole thing seems to stem only from lights added to the scene AFTER entering Play Mode. I have also found that it doesn't matter if a render has started yet or not.
Example: If I add a directional light(sun) to the scene in Edit Mode, enter Play Mode and Render, it works like a charm. I can even then update individual properties of the light at runtime and it just rolls along smoothly updating the preview. However, if i were to tell a script to make an identical light on start or something or after a button click in Play Mode, it will crash the render.
As I noted above, The render will crash even if it hasn't been kicked off when the new lights are added. So if I had all of the lights created on start, no Render(or Preview) happening at all, and then clicked the Render Button on the PBRRenderTarget, it would crash.
This is a pretty big issue for us as all of the renders we need to do need to be done at runtime, and each new render will be an arbitrary space that we must calculate unique light placement for on the fly. Of course for the sun we can just embed and manipulate it, but for things like spot and area lights, we're essentially dead in the water. Below is a url to a vimeo video of the above issue taking place so you can see it in action in a very basic scene. Thank you in advance for any insight into this issue and what we might be able to do to remedy it.
Unity v2019.2.5f1
Octane Plugin v1.2.0.1376
Renderer v2019.1(6000100)
https://vimeo.com/363663280
It seems, unless I'm missing something (very well could be), that it is not possible to add new lights to the scene while in Play Mode. without causing an 'All GPUs failed' error, forcing a full reinstall of the plugin. This, for one is very frustrating and the reinstall process makes iteration incredibly slow, but the whole thing seems to stem only from lights added to the scene AFTER entering Play Mode. I have also found that it doesn't matter if a render has started yet or not.
Example: If I add a directional light(sun) to the scene in Edit Mode, enter Play Mode and Render, it works like a charm. I can even then update individual properties of the light at runtime and it just rolls along smoothly updating the preview. However, if i were to tell a script to make an identical light on start or something or after a button click in Play Mode, it will crash the render.
As I noted above, The render will crash even if it hasn't been kicked off when the new lights are added. So if I had all of the lights created on start, no Render(or Preview) happening at all, and then clicked the Render Button on the PBRRenderTarget, it would crash.
This is a pretty big issue for us as all of the renders we need to do need to be done at runtime, and each new render will be an arbitrary space that we must calculate unique light placement for on the fly. Of course for the sun we can just embed and manipulate it, but for things like spot and area lights, we're essentially dead in the water. Below is a url to a vimeo video of the above issue taking place so you can see it in action in a very basic scene. Thank you in advance for any insight into this issue and what we might be able to do to remedy it.
Unity v2019.2.5f1
Octane Plugin v1.2.0.1376
Renderer v2019.1(6000100)
https://vimeo.com/363663280